pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allison, Timothy B." <talli...@mitre.org>
Subject RE: Extracting/rendering jp2?
Date Wed, 09 Nov 2016 20:52:59 GMT
Got it.  Thank you!

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Wednesday, November 9, 2016 3:38 PM
To: users@pdfbox.apache.org
Subject: Re: Extracting/rendering jp2?

Am 09.11.2016 um 21:26 schrieb Allison, Timothy B.:
>> what do you need? The image in any format (e.g. png), or the image in the original
JP2 compression?
> Ideally the original JP2 compression.
>
>> And if you're using ImageIOUtil.writeImage(), what is the parameter in suffix? If
it is JP2, then you'd need to have some plugin for it.
> jpx
>
>> So it may be better to get the raw file, see in ExtractImages how we do it for DCTFilter.
> Will do.  To confirm, you mean this?
>
>                          InputStream data = pdImage.createInputStream(JPEG);
>                          IOUtils.copy(data, out);
>                          IOUtils.closeQuietly(data);

Yes - that is the better solution. It makes no sense to decode a JP2 image to recode it in
JP2. Instead of JPEG, use this:

     private static final List<String> JP2 = Arrays.asList(COSName.JPX_DECODE);


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


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


Mime
View raw message