Are you using JPEG? Are you specifying any content-width|height for the
image? And source-resolution? When you say the image quality is lost how
do you see that?
JPEG images are compressed and that is the filter you see below. Setting
the filter to null means no further filter will be applied (and for
instance text "streams" will not be compressed). You can check that if
you set the filter to flate you will get a further filter applied to the
image.
Now, you can use a different image loader than the default for JPEG that
will result in a uncompressed image but the quality will not improve. In
the conf file add this, before the <renderers> element:
<image-loading>
<penalty value="INFINITE"
class="org.apache.xmlgraphics.image.loader.impl.ImageLoaderRawJPEG" />
</image-loading>
I doubt the quality will be any different but the image will be
uncompressed. If you are sure you see a loss in quality you can send us
your example image so that we can investigate.
On 1/30/13 12:48 PM, Neeraj wrote:
Hi,
I am using FOP 1.1 and generating a PDF through XML and XSL. I am
trying to stop DCTDecode compression for images. The following
snippet is from my PDF, Which has DCTDecode filter for image object,
even after adding filter value to null in config file.
/Name /Im1
/Type /XObject
/Length 13 0 R
/Filter /DCTDecode
/Subtype /Image
/Width 550
/Height 432
/BitsPerComponent 8
/ColorSpace /DeviceRGB
I tried following settings in my config file.
<renderer mime="application/pdf">
<filterList>
<value>null</value>
</filterList>
<filterList type="image">
<value>null</value>
<value>ascii-85</value>
</filterList>
and
<renderer mime="application/pdf">
<filterList>
<value>null</value>
</filterList>
But DCTDecode is still happening and because this is lossy
compression, the image quality is lost. Can DCTDecode be stopped for
images by doing any config setting?
Thanks
Neeraj
In Config file,