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 Alps <al...@c-sam.co.in> on 2006/06/16 11:06:44 UTC
GIF Transcoding and Transcoding Hints.
Hi all,
I am using Batik for following purpose:
1. Transcoding to different possible formats like JPEG/PNG with Affine
transformation.
Is there some way to transcode existing SVG image to GIF format ? Also in
Java 2D graphics, i found several rendering hints used during image format
transformation like Rendering quality, color quality, anti aliasing,
dithering, Interpolation for scaling algorithms. I relate the transcoding to
image rendering but found such hints missing for a configurable transcoding.
Can we specify such hints specially like interpolation, quality, size using
Batik core modules or some other way.
Please correct me if i am wrong,
Thanks..Alps.
--
View this message in context: http://www.nabble.com/GIF-Transcoding-and-Transcoding-Hints.-t1797093.html#a4897257
Sent from the Batik - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: GIF .... + Image Size Compression and Quality Control.
Posted by Alps <al...@c-sam.co.in>.
Hi,
Thanks thomas for the reply,
As described, i m using Batik+java2D for transcoding SVG images to different
formats - JPEG/PNG/GIF/BMP. During process, i found the image (PNG &JPEG)
size increased badly and quality failed too. The images i am working on are
within RGB color space with some gradience. For maintaining the quality and
decrease optimal size, i tried the following approaches:
1. SVG document rendering properties - this did not proved useful in my case
2. java2D Rendering hints like INTERPOLATION, RENDERING - when applied to
BufferedImage creation from a SVG document, this helped in image size
reduction irrespective of further encoding params.
3. BufferedImage encoding params (JpegEncodeParam, PngEncodeParam) - i found
default encoder (PNGEncoder/JpegEncoder..) setting optimal. Setting explicit
encoding params for size reduction with quality control, did not work like
for e.g. unsetting chromaticity, pallete etc.
+ i found the java.awt.image encoder for PNG and JPEG optimal among
available codecs.
The requirement is to still look over the image (PNG/JPEG) size reduction
but maintaining quality. Are some other ways enabling in image size
reduction and compression along with above described alternatives,
Thanks..Alps
--
View this message in context: http://www.nabble.com/GIF-Transcoding-and-Transcoding-Hints.-t1797093.html#a4968876
Sent from the Batik - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: GIF...... + Trancoded Image Quality and Size.
Posted by Alps <al...@c-sam.co.in>.
Hi,
Thanks thomas for the reply,
As described, i m using Batik+java2D for transcoding SVG images to different
formats - JPEG/PNG/GIF/BMP. During process, i found the image (PNG &JPEG)
size increased badly and quality failed too. The images i am working on are
within RGB color space with some gradience. For maintaining the quality and
decrease optimal size, i tried the following approaches:
1. SVG document rendering properties - this did not proved useful in my case
2. java2D Rendering hints like INTERPOLATION, RENDERING - when applied to
BufferedImage creation from a SVG document, this helped in image size
reduction irrespective of further encoding params.
3. BufferedImage encoding params (JpegEncodeParam, PngEncodeParam) - i found
default encoder (PNGEncoder/JpegEncoder..) setting optimal. Setting explicit
encoding params for size reduction with quality control, did not work like
for e.g. unsetting chromaticity, pallete etc.
+ i found the java.awt.image encoder for PNG and JPEG optimal among
available codecs.
The requirement is to still look over the image (PNG/JPEG) size reduction
but maintaining quality. Are some other ways enabling in image size
reduction and compression along with above described alternatives,
Thanks..Alps
--
View this message in context: http://www.nabble.com/GIF-Transcoding-and-Transcoding-Hints.-t1797093.html#a4968037
Sent from the Batik - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: GIF Transcoding and Transcoding Hints.
Posted by th...@kodak.com.
Hi Alps,
Alps <al...@c-sam.co.in> wrote on 06/16/2006 05:06:44 AM:
> I am using Batik for following purpose:
> 1. Transcoding to different possible formats like JPEG/PNG with Affine
> transformation.
> Is there some way to transcode existing SVG image to GIF format ?
We don't provide one, if you have access to a library that saves
GIF from a Java2D BufferedImage it shouldn't be too hard to add (take
a look at the PNGImageTranscoder - which supports 8bit output).
> Also in Java 2D graphics, i found several rendering hints used during
> image format transformation like Rendering quality, color quality,
> anti aliasing, dithering, Interpolation for scaling algorithms. I
> relate the transcoding to image rendering but found such hints missing
> for a configurable transcoding. Can we specify such hints specially
> like interpolation, quality, size using Batik core modules or some
> other way.
All of these Java 2D rendering hints are set/controlled by the
SVG rendering hint attributes:
http://www.w3.org/TR/SVG11/painting.html#RenderingProperties
You can add/modify these attributes in the SVG document (probably
on the root element) before giving the Document to the Batik transcoder.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org