Save as Optimized JPEG 2000 issues

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
Timur Born
User
Posts: 874
Joined: Tue Jun 26, 2012 1:50 pm

Save as Optimized JPEG 2000 issues

Post by Timur Born »

Hello,

I just tested the various compression settings of Editor's "Save as Optimized" feature and it seems that most JPEG 2000 quality levels are broken.

- Minimum, low, medium and Maximum all create the very same file/image of maximum quality. The file size is even larger than anything I can create for the same image in Photoshop and there are no visible artifacts.

- High creates a blurry low resolution mess of an image, corresponding roughly to quality 8% (1024 grid) in Photoshop.

- Lossless seems to work properly.

On a side note: Quality 100% in X-Change Standard does not come close to the quality produces by "Save for Optimized", so even at 100% it compressed stronger (including visible artifacts). Unsurprisingly the image size is only about 40 kb, while "Save as Optimized" creates a 520 kb image.

PS: PDFill's "Flate" compression corresponds to Editor's JPEG2000 lossless, while Editor's Flate/ZIP produces a 36 mb image. I suspect that PDFill evokes the JPEG 2000 lossless encoder instead of Flate.
Attachments
mio_colors_xs_j2.pdf
(40.19 KiB) Downloaded 134 times
mio_colors_gs_pf_flate_Optimized_max.pdf
(520.53 KiB) Downloaded 128 times
mio_colors_gs_pf_flate_Optimized_min.pdf
(520.53 KiB) Downloaded 142 times
mio_colors_gs_pf_flate_Optimized_lossless.pdf
(185.2 KiB) Downloaded 128 times
mio_colors_gs_pf_flate_Optimized_high.pdf
(20.94 KiB) Downloaded 140 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Save as Optimized JPEG 2000 issues

Post by Tracker Supp-Stefan »

Hello Timur,

Thanks for the sample files.
I've asked a colleague working on image compressions to take a look and we will post some further comments here as soon as he has had a change to look at this!

Regards,
Stefan
Timur Born
User
Posts: 874
Joined: Tue Jun 26, 2012 1:50 pm

Re: Save as Optimized JPEG 2000 issues

Post by Timur Born »

Did anyone look at this yet?
Timur Born
User
Posts: 874
Joined: Tue Jun 26, 2012 1:50 pm

Re: Save as Optimized JPEG 2000 issues

Post by Timur Born »

So I checked this myself. Unfortunately it's quite a mess. I created a new document and tried different thing:

Insert original 16.8 mp image (182 kb PNG) as a content item

JPG2000 quality settings other than "High" do not create the same output anymore. But "Max" creates files smaller than "Low" with more artifacts, while "High" is still completely broken.

Min: 2462 kb
Low: 3249 kb
Med: 4084 kb
High: 21 kb
Max: 2921 kb


Lossless: 12253 kb

Insert downsampled 5.6 mp version (less compressible than original) of the image as content item

JPG2000 quality settings other than "High" do not create the same output anymore. All settings create file sizes as expected, with "Max" and "High" not being broken. So everything seems to be working correctly with this specific test-case.

Insert original 16.8 mp image as stamp

The output file size is fixed at 36589 kb regardless of compression type (J2K, JPG, ZIP) or compression strength. The uncompressed BMP size of the image is 49153 kb, a ZIP compressed TIF is 209 kb, so I have no idea what is happening. Curiously the size corresponds to the image being compressed via PNG without the use of compression filters.

Insert downsampled 5.6 mp version as stamp

The same thing (bug) happens as with the original image. The size of the output file is fixed at 11874 kb regardless of compression type and strength the size. Again the size corresponds to the image being compressed via PNG without the use of compression filters.

PS: X-Change Standard now seems to make proper use of the JPG quality setting, with its output roughly corresponding to non progressive (why?) YCbCr encoding using medium strong sub-sampling.
Attachments
16777216colors_small.png
16777216colors.png
User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1645
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: Save as Optimized JPEG 2000 issues

Post by Patrick-Tracker Supp »

The development team have asked me to create a medium-high master ticket for optimization improvements. These points have been added accordingly.

Thank you all for your patience and understanding!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Cheers,

Patrick Charest
Tracker Support North America
User avatar
Jensen Head
User
Posts: 412
Joined: Mon Sep 13, 2021 8:12 am

Re: Save as Optimized JPEG 2000 issues

Post by Jensen Head »

Patrick-Tracker Supp wrote: Fri Apr 27, 2018 10:55 pmThe development team have asked me to create a medium-high master ticket for optimization improvements.
I did not find any mention of a solution to this problem in Version History. It hasn't been solved (in six years)?

JPEG 2000 is a great format and I encourage its use in all situations where it produces better results than its alternatives.
Willy Van Nuffel
User
Posts: 2347
Joined: Wed Jan 18, 2006 12:10 pm

Re: Save as Optimized JPEG 2000 issues

Post by Willy Van Nuffel »

For reference, also these threads:
- viewtopic.php?p=170417
- viewtopic.php?p=165013

Regards.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Save as Optimized JPEG 2000 issues

Post by Tracker Supp-Stefan »

Hello Willy Van Nuffel,

Thanks for sharing those other two topics.
And this one had a post from 2018 before Jensen's- so yes - it seems like this has been ongoing for a while!
I will see to bump the priority of the tickets mentioned in the other topics.

Kind regards,
Stefan
Post Reply