You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Bala Bharathan <Ba...@Essentium.com> on 2001/10/12 15:00:59 UTC

JPEG - image color

Hello -

Is there any control over the color characteristics of the JPEG generated
from SVG ?  I find the generated image has the color depth of 24bits.
However, JPEG standards could have different color depth such as 1bit,
8bits.

 -- Bala

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JPEG - image color

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "VH" == Vincent Hardy <vi...@sun.com> writes:

VH> Bala, Bala Bharathan wrote:
>>  Hello -
>> 
>> Is there any control over the color characteristics of the JPEG
>> generated from SVG ?

VH> There is no simple way today. [...]

>> I find the generated image has the color depth of 24bits.  However,
>> JPEG standards could have different color depth such as 1bit,
>> 8bits.

   Hmm, while what you say above may be strictly true, my guess is
that you are confusing formats.  JPEG as is widely available on the
net has _no_ 1bit per pixel (or sample) version.  There is something
called JBIG (related to JPEG) that is used in some very specialized
areas (I'm mostly familiar with medical) that is lossless and might
support 1Bit but this is certainly not a standard thing.

   JPEG does support 8bit but only for grayscale images.  Now GIF on
the other hand has 1bit and 8bit color support (although no true color
support).  However most SVG content would not convert to GIF really
well due to anti-aliasing, instead PNG is used for line-art
applications.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: JPEG - image color

Posted by Vincent Hardy <vi...@sun.com>.
Bala,

Bala Bharathan wrote:
> 
> Hello -
> 
> Is there any control over the color characteristics of the JPEG generated
> from SVG ?  

There is no simple way today. The JPEG encoding control is made in
the org.apache.batik.transcoder.image.JPEGTranscoder and it does not
give anyway to control the encoding operation today. I have entered
a bug in Bugzilla for that:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4161

In the meanwhile, you can extend the JPEGTranscoder class and 
set the JPEGEncodeParam the way you like: this will let you set
the JPEG encoding the way you want. See:

http://java.sun.com/j2se/1.3/docs/guide/2d/api-jpeg/index.html

Thanks,
Vincent.

> I find the generated image has the color depth of 24bits.
> However, JPEG standards could have different color depth such as 1bit,
> 8bits.
> 
>  -- Bala
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org