Setting JPEG 2000 to workaround 359 image corruption bug
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Re: Setting JPEG 2000 to workaround 359 image corruption bug
"Image customisation options"?? "through"??
I'll try again.
Is there any option to set JPEG 2000 to be used for all image encoding done by the Explorer "Combine in..." command on PNGs?
Yes or No will do fine, thanks.
Thanks.
I'll try again.
Is there any option to set JPEG 2000 to be used for all image encoding done by the Explorer "Combine in..." command on PNGs?
Yes or No will do fine, thanks.
Thanks.
-
- User
- Posts: 2393
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
When selecting two or more PNG-files in Windows File Explorer, followed by a right-mouse-click and "Combine in PDF-XChange Editor", there are no "Options..." to define the compression method of these images in the new PDF. After clicking "OK", and verifying the result, it seems to be "ZIP" by default.
But, something that helps to change the compression method of all the (color and grayscale) images in the PDF, is the File > Save As Optimized option.
In the "Optimize PDF"-dialog-box, you can only mark/check the "Images"-option and set the desired compression to JPEG2000.
Make sure to uncheck "Optimize images only if there is a reduction in size" and click "OK" to start the process.
When opening the resulting pdf, the images are indeed compressed with JPEG2000 (tested with build 368.0).
Does that help?
Kind regards.
>
But, something that helps to change the compression method of all the (color and grayscale) images in the PDF, is the File > Save As Optimized option.
In the "Optimize PDF"-dialog-box, you can only mark/check the "Images"-option and set the desired compression to JPEG2000.
Make sure to uncheck "Optimize images only if there is a reduction in size" and click "OK" to start the process.
When opening the resulting pdf, the images are indeed compressed with JPEG2000 (tested with build 368.0).
Does that help?
Kind regards.
>
Re: Setting JPEG 2000 to workaround 359 image corruption bug
> When selecting two or more PNG-files in Windows File Explorer, followed by a right-mouse-click and "Combine in PDF-XChange Editor", there are no "Options..." to define the compression method of these images in the new PDF.
Sounds like No. Thanks.
> But, something that helps to change the compression method of all the (color and grayscale) images in the PDF, is the File > Save As Optimized option.
Thanks. I'll try it.
Sounds like No. Thanks.
> But, something that helps to change the compression method of all the (color and grayscale) images in the PDF, is the File > Save As Optimized option.
Thanks. I'll try it.
- TrackerSupp-Daniel
- Site Admin
- Posts: 8593
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello, all
Thanks willy for the answer and potential workaround, I hope it helps Chris to some degree.
Kind regards,
Thanks willy for the answer and potential workaround, I hope it helps Chris to some degree.
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Setting JPEG 2000 to workaround 359 image corruption bug
I take it that should read "checking the result".
How may I do that, please?
I'd hoped image Properties, but no:
Thanks.
- TrackerSupp-Daniel
- Site Admin
- Posts: 8593
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello, chrisjj
If you right click on the image (with the "Edit" tool enabled) and choose "recompress images" you can see which form of compression that particular image is using.
Kind regards,
If you right click on the image (with the "Edit" tool enabled) and choose "recompress images" you can see which form of compression that particular image is using.
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Thanks. That works:
Since no-one can reasonably be expected to search for this there, could you pass on my suggestion that image property being included in image Properties? Thanks.
Also note that "Compressed image" here:
is not very clear, given both image "states" are compressed, and Before and After would be clearer.
Since no-one can reasonably be expected to search for this there, could you pass on my suggestion that image property being included in image Properties? Thanks.
Also note that "Compressed image" here:
is not very clear, given both image "states" are compressed, and Before and After would be clearer.
-
- User
- Posts: 2393
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
@chrisjj
It seems like you are using an older version of PDF-XChange Editor than build 362.
In the 'Version History' of build 9.4.362, I see the following:
"Added showing, in Properties Pane, the compression method used in images. (T# 6099)".
@Tracker Support
It might be useful to also have "DPI" and "Size" in the Properties Pane.
Kind regards.
>
It seems like you are using an older version of PDF-XChange Editor than build 362.
In the 'Version History' of build 9.4.362, I see the following:
"Added showing, in Properties Pane, the compression method used in images. (T# 6099)".
@Tracker Support
It might be useful to also have "DPI" and "Size" in the Properties Pane.
Kind regards.
>
Re: Setting JPEG 2000 to workaround 359 image corruption bug
I am. Sorry if the "359" in the title was unclear.Willy Van Nuffel wrote: ↑Tue Jun 06, 2023 7:00 am It seems like you are using an older version of PDF-XChange Editor than build 362.
Excellent. Thanks.Willy Van Nuffel wrote: ↑Tue Jun 06, 2023 7:00 am In the 'Version History' of build 9.4.362, I see the following:
"Added showing, in Properties Pane, the compression method used in images. (T# 6099)".
Agreed. Or better, adopt as a principle that Properties include all properties.Willy Van Nuffel wrote: ↑Tue Jun 06, 2023 7:00 am It might be useful to also have "DPI" and "Size" in the Properties Pane
-
- User
- Posts: 2393
- Joined: Wed Jan 18, 2006 12:10 pm
- TrackerSupp-Daniel
- Site Admin
- Posts: 8593
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Setting JPEG 2000 to workaround 359 image corruption bug
This is PDF-Tools issue, but I'm reporting in this thread because the objective is workaround the issue of this thread.
On this PDF image:
which shows corruption on Acrobat X, this tool which is an attempt to workaround by converting to JPEG 2000:
fails to convert to JPEG 2000:
Any ideas?
On this PDF image:
which shows corruption on Acrobat X, this tool which is an attempt to workaround by converting to JPEG 2000:
fails to convert to JPEG 2000:
Any ideas?
Re: Setting JPEG 2000 to workaround 359 image corruption bug
This failed:
and likewise:
and likewise:
giving:
Any ideas for a one-operation solution for the whole document?
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Sanitise with this option:
suffers the same problem, through compressing to JPEG.
How do I change it to use JPEG 2000?
suffers the same problem, through compressing to JPEG.
How do I change it to use JPEG 2000?
-
- User
- Posts: 2393
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Like I mentioned before, please uncheck "Optimize images only if there is a reduction in size" and (for preference) only check "Images" in the column at the left. In that manner, other things in your PDF's will be left untouched.
Kind regards and keep us posted if it works correctly in this way.
>
Kind regards and keep us posted if it works correctly in this way.
>
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Oops. Sorry - I overlooked that. Yes, that works EDIT: with no downsampling:Willy Van Nuffel wrote: ↑Wed Jun 28, 2023 6:25 amLike I mentioned before, please uncheck "Optimize images only if there is a reduction in size
albeit at the penalty of a huge increase in file size.
Last edited by chrisjj on Thu Jun 29, 2023 9:20 pm, edited 1 time in total.
-
- User
- Posts: 2393
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Setting JPEG 2000 to workaround 359 image corruption bug
@chrisjj
I am glad to read that the recompression via "Save As Optimized" now works correctly for "all" the images in your PDF.
In your screenshots, I see that you are using down-sampling. However earlier in this thread, you looked for a manner to NOT change DPI. Did something made changing your mind about this?
@Tracker Support
1) In comparisons between JPG and JPG2000 I read that compression rates of JPG2000 should be higher than JPG. However (mostly) the resulting file size of images after recompression (from JPG to JPG2000 in PDF-XChange Editor) is higher. Is that normal? Maybe the compression of existing JPG-artifacts are taking up additional space in JPG2000?
2) Earlier in this thread, there was a question from David.P about "up-sampling". Did something happen with this question?
Maybe a feature request?
Kind regards.
I am glad to read that the recompression via "Save As Optimized" now works correctly for "all" the images in your PDF.
In your screenshots, I see that you are using down-sampling. However earlier in this thread, you looked for a manner to NOT change DPI. Did something made changing your mind about this?
@Tracker Support
1) In comparisons between JPG and JPG2000 I read that compression rates of JPG2000 should be higher than JPG. However (mostly) the resulting file size of images after recompression (from JPG to JPG2000 in PDF-XChange Editor) is higher. Is that normal? Maybe the compression of existing JPG-artifacts are taking up additional space in JPG2000?
2) Earlier in this thread, there was a question from David.P about "up-sampling". Did something happen with this question?
Maybe a feature request?
Kind regards.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello Willy Van Nuffel,
I will ask our devs to take a look at the differences between JPEG and JPEG2000, however we would need to generate a raster from the original compressed JPEG, and then process that to JPEG2000. The JPEG has already added noise, so when recompressing the 'noisier' result - it is expected that any further compression will introduce more noise, and noise takes more space to compress (if it can be compressed at all) compared with e.g. a fully while image that can be compressed to just a few bytes
I will also ask if anything has been done with regards upsampling - though again this will effectively be a lossy operation and will not result in a better image quality.
Kind regards,
Stefan
I will ask our devs to take a look at the differences between JPEG and JPEG2000, however we would need to generate a raster from the original compressed JPEG, and then process that to JPEG2000. The JPEG has already added noise, so when recompressing the 'noisier' result - it is expected that any further compression will introduce more noise, and noise takes more space to compress (if it can be compressed at all) compared with e.g. a fully while image that can be compressed to just a few bytes
I will also ask if anything has been done with regards upsampling - though again this will effectively be a lossy operation and will not result in a better image quality.
Kind regards,
Stefan
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Thanks for spotting that error. Now corrected.Willy Van Nuffel wrote: ↑Thu Jun 29, 2023 8:22 amIn your screenshots, I see that you are using down-sampling.
In my example, 54KB -> 291KB, so definitely does not look right.Willy Van Nuffel wrote: ↑Thu Jun 29, 2023 8:22 am (mostly) the resulting file size of images after recompression (from JPG to JPG2000 in PDF-XChange Editor) is higher. Is that normal?
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello chrisjj,
Please make sure to also check the actual image quality.
I took your original image - made it on purpose very small in "physical" terms - and then asked the Editor to Optimize the file once with JPEG2000 and once with JPEG compression. Both times "Medium" was selected as the preset - however the results are clearly different: The JPEG2000 file is bigger - but I would say that it is also with better quality than the much blurrier JPEG.
So the "Medium" for JPEG is not really comparable with the Medium of JPEG2000.
Kind regards,
Stefan
Please make sure to also check the actual image quality.
I took your original image - made it on purpose very small in "physical" terms - and then asked the Editor to Optimize the file once with JPEG2000 and once with JPEG compression. Both times "Medium" was selected as the preset - however the results are clearly different: The JPEG2000 file is bigger - but I would say that it is also with better quality than the much blurrier JPEG.
So the "Medium" for JPEG is not really comparable with the Medium of JPEG2000.
Kind regards,
Stefan
Re: Setting JPEG 2000 to workaround 359 image corruption bug
I did. As expected, I saw no material change.Tracker Supp-Stefan wrote: ↑Fri Jun 30, 2023 8:16 am Please make sure to also check the actual image quality.
Please pass on my suggestion this be fixed. Particular care will be needed in retaining existing stored settings.Tracker Supp-Stefan wrote: ↑Fri Jun 30, 2023 8:16 amthe "Medium" for JPEG is not really comparable with the Medium of JPEG2000.
Thanks.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello chrisjj,
Certainly - will pass that to our devs for review!
Kind regards,
Stefan
Certainly - will pass that to our devs for review!
Kind regards,
Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello all,
Below comparison animation shows the quality difference (after clicking on the image):
Regarding the second topic:
David.P
For easier reference, this question/request was about automatically increasing (color) resolution first, and only then converting to black+white (when converting and upsampling), in order to maximize the resulting black+white image/drawing resolution:Willy Van Nuffel wrote: ↑Thu Jun 29, 2023 8:22 am 2) Earlier in this thread, there was a question from David.P about "up-sampling". Did something happen with this question?
Maybe a feature request?
Below comparison animation shows the quality difference (after clicking on the image):
David.P wrote: ↑Wed Oct 12, 2022 9:07 amA use case for me is as follows. I often have (scanned) PDF files with line drawings in e.g. 300 dpi grayscale. I normally need these drawings in pure black and white. If I simply convert the images directly to black and white, part of the image information, or optical resolution, of the original image is lost. The black and white images then become rather pixelated.
Therefore, it would be useful to be able to e.g. double the resolution of the grayscale images first (using "Recompress Images") to 600 dpi, and only then to generate 600 dpi black-and-white images from the upsampled images. When the black-and-white images are then compressed using JBIG, for example, the file size of these high-resolution black-and-white images is still tiny and negligible.
Regarding the second topic:
This has been discussed here, and should be fixed in my opinion:Willy Van Nuffel wrote: ↑Thu Jun 29, 2023 8:22 am In comparisons between JPG and JPG2000 I read that compression rates of JPG2000 should be higher than JPG. However (mostly) the resulting file size of images after recompression (from JPG to JPG2000 in PDF-XChange Editor) is higher. Is that normal?
Thanks & best regardsDavid.P wrote: ↑Sat Nov 26, 2022 4:44 pmAlso, the compression quality with JPEG2000 seems to be way too high in all quality settings of JPEG2000. [...]
It would be great if the Devs could have a look at the JPEG2000 quality settings and distribute the percentages between "Minimum" and "Maximum" quality to a broader range somewhere between 10% and 95% image quality.
This way, files with lots of color images could be compressed more effectively, using the better compression that JPEG2000 offers over JPEG.
David.P
David.P
PDF-XChange Pro
PDF-XChange Pro
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Thanks for that link David. I see the ticket is two years old. I hope my vote for the fix might hasten it.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Setting JPEG 2000 to workaround 359 image corruption bug
Hello chrisjj, David and all,
We've just asked our devs for an update on those J2K tickets, and will update the topics as soon as there is any further feedback!
Kind regards,
Stefan
We've just asked our devs for an update on those J2K tickets, and will update the topics as soon as there is any further feedback!
Kind regards,
Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17910
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: