pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: How can I write JPEG2000 encoded images in PDF?
Date Thu, 31 Mar 2016 11:43:16 GMT

> On 31 Mar 2016, at 12:40, John Hewson <john@jahewson.com> wrote:
> 
> 
> 
> -- John
> On 30 Mar 2016, at 07:18, Costas Stergiou <ksterg@gmail.com> wrote:
> 
>>> PDF/A is for archiving, and while PDF/A-2 does support JPEG 2000, it's not
>> a good choice for an archival format, because most JPEG 2000 implementations
>> are broken in some way and many PDF viewers cannot correctly view such
>> files. It was essentially a failure as a file format and will be deprecated
>> in PDF 2.0. If the goal of archiving with PDF/A is to produce reliable
>> files, JPEG 2000 conflicts with that goal.
>> 
>> This is VERY interesting information, I have two questions, if you know:
>> 1. Do you have a link to the PDF 2.0 spec where it says that JPEG2000 will
>> be deprecated?
> 
> Apparently I'm wrong about this, the PDF 2.0 spec is still going through working groups
so I only hear rumours. Some things are definitely getting deprecated, such as FDF forms!

Of course what I meant to say was XFA, not FDF!

> 
>> 2. What would be your suggestion for non-lossy compression for color images
>> in PDF files? I know LZW is an answer, but the compression is much worst
>> than JPEG2000.
> 
> First of all I'd check if a maximum-quality JPEG isn't good enough. It usually is. If
you really need lossless (and as you're archiving you might well do) then PNG is simple and
reliable. There are ways to losslessly optimise the colour palette to reduce file size a bit.
Also make sure you use the right colour space - a b&w raster is 1/3 the size of an RGB
one.
> 
>> Can you think of a solution that brings a compression close
>> to that of JPEG2000 without losing information?
> 
> No, though it does depend on what's in your images. Black and white line art will compress
well with pretty much any approach - photographs not so much. If you have 1-bit images (literally
black and white) then your job is particularly easy.
> 
>> And of course I am not
>> considering re-encoding a JPEG image, this is pointless as you mentioned.
> 
> Ok, good!
> 
>> By the way: I read in the spec that JPEG2000 also works for b&w images, yet
>> adobe acrobat cannot read b&w jpeg2000 images encoded with jai... don't know
>> if this is because of jai or because of acrobat. Any idea?
> 
> Off the top of my head I don't know but PDF does allow JPX images to embed their own
colour space. PDF only supports the "baseline" JPX features - so you might want to check if
that includes b&w.
> 
> -- John
> 
>> Costas
>> 
>> 
>> ---------------------------------------------------------------------
>> 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