Hi Vinodh,

Vinodh r Chandra NONLILLY <[EMAIL PROTECTED]> wrote on 
03/31/2006 05:01:14 AM:

> I tried rendering an svg image to jpeg and it didnt create the image
> exactly as can see in a svg viewer from browser.

   I assume you mean the Adobe SVG Viewer?

> For eg,
>  i have a rectangle of height "0.0005.....". This rect appears as small
> line in the viewer, but if i save it as jpeg, it doesn't appear.

   This is a _very_ small rectangle, assuming it covers the full width of
a pixel it has a coverage of that pixel = 0.0005 or 5/10,0000.  Even if
the rectangle was full contrast, say black over white, given the 
compositing
rules:
        rgbOut = rgbDest*(1-coverage)+rgbSrc*coverage

   You will get rgbDest*(.9995)+rgbSrc*(0.0005)

   If rgbDest is white=255 and rgbSrc = 0
   The result is:   254.8725  which quite safely 'rounds' to 255.

   The Adobe rendering engine tends to 'over emphasize' small objects,
this is good in some cases (like perhaps yours) and bad in other cases.

> I believe that its because, the image renderer might be expecting some
> 'INT' value instead of 'DOUBLE' value that too less than 0.

   No, we do most math in float/double but the generated image uses int's
for the various color values (as does every renderer I am aware of). 
It really comes down to a difference in how the rendering engine treats 
small features.

> But is there some way that i can have this work.

   Well I think your content is depending on the quirk of a particular
rendering engine it wouldn't surprise me if it looked poor in many 
other viewers (like say Opera or FireFox with SVG support).

> I am sorry, if i am taking a wrong channel to have this doubt cleared.
> 
> But it would be really helpful, if you can.

   The only suggestion I can make is that you investigate ways to
make such small features 'larger', the simplest way would be to add
stroke.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to