Am 22.09.2015 um 22:59 schrieb Kevin Ternes:
I see. For comparison, the CCITTFaxFilter and DCTFilter.encode() write
warnings instead of throwing Exceptions.
Are those also likely to not ever be implemented?
I will change it to an exception. Neither of them is implemented, but
for a different reason (explanations are for 2.0, the names are
different for 1.8):
- Instead of CCITTFaxFilter, you should use the CCITT factory class
which accepts a TIFF file as input
- Instead of DCTFilter, you should use the JPEG factory class which
accepts a JPEG file as input, but can also work from a BufferedImage
(and compresses it into JPEG).
So what is really missing?
- the possibility to create a CCITT encoded image from a bitonal
BufferedImage
- the possibility to create a JPX encoded image from a BufferedImage
The first could still be done by you, e.g. by writing your BufferedImage
into a TIFF stream and applying the correct compression parameters, or
use the ImageIOUtil package (but you need jai_imageio) and pass that
stream to the CCITT factory class.
The second is more difficult, put possible, by changing the JPEG factory
class. If you need that, provide a very good reason, and it shouldn't be
"my PDF files are 20% smaller".
If none of the above helps you, just tell what you want to acomplish and
what version you are using :-)
Tilman
-----Original Message-----
From: Tilman Hausherr [mailto:[email protected]]
Sent: Tuesday, September 22, 2015 2:31 PM
To: [email protected]
Subject: Re: JPXFilter encode() implementation
Am 22.09.2015 um 21:19 schrieb Kevin Ternes:
I am getting UnsupportedOperationException: JPX encoding not implemented from
JPXFilter.encode().
Is this simply a placeholder because no one has gotten around to finishing this
method yet?
Or is the method being left unimplemented permanently?
I doubt this will ever be implemented. We don't even have a decent JPX decoder,
some JPX images are rendered incorrectly.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]