PNG to PDF to PNG: from 1.5MB to 37.5MB

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

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

Post Reply
claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by claude vidal » Wed Jan 11, 2017 7:49 pm

Steps taken for this issue:
  • From the directory holding the file, right click and 'Open with PDFXChange Editor'
  • In PDFXChange Editor, save as a PDF: PDF is now 12.5MB
  • Open just saved PDF, export to image (32bpp, compression level 10, 150x150dpi, PNG): image saved is now 37.5MB
Original JPG file attached.

How can an image file go from 1.5MB to 37.5B?
Attachments
Test image.zip
(1.47 MiB) Downloaded 59 times

User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1668
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by Patrick-Tracker Supp » Wed Jan 11, 2017 9:06 pm

Hi Claud,

Thank you for the email. I have reproduced this behaviour in the latest build. Could you please try optimising your PDF before re-converting it to an image?

Please also note that the Editor is not designed to be used as an image type converter. I noticed that the image you sent is a jpg, and you have specified to export to png. May I ask why you are converting this from an image to PDF, then back to an image?

Thanks!
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

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by claude vidal » Thu Jan 12, 2017 5:51 pm

Patrick-Tracker Supp wrote:Hi Claud,

Thank you for the email. I have reproduced this behaviour in the latest build. Could you please try optimising your PDF before re-converting it to an image?

Please also note that the Editor is not designed to be used as an image type converter. I noticed that the image you sent is a jpg, and you have specified to export to png. May I ask why you are converting this from an image to PDF, then back to an image?

Thanks!
You are right: optimizing when saving the PDF resulting from loading a JPG does bring down the size significantly.

I'm still puzzled though by the difference in size when saving from an optimized PDF as JPG (2MB) versus PNG (20MB, even with a compression ratio of 10). I tried exporting a text based PDF document (328KB) as a PNG image: the image size was 928KB.

I'll admit going JPG-PDF-PNG is not a typical usage of the editor, so no big deal.

Ivan - Tracker Software
Site Admin
Posts: 3630
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by Ivan - Tracker Software » Thu Jan 12, 2017 9:50 pm

First of all, your original image is in JPEG format, not PNG.

This image has dimension 3264 x 2448 pixels with 72 dpi and 24bpp, i.e. about 45.33 x 34 inches. Uncompressed size of this image is about 23.9 MB.
When you open this image with the editor, it creates PDF document with such page dimension and adds this image using ZIP compression to prevent data loss.
And this PDF has about 13 MB due to ZIP compression.
To have a control over compression of the image during conversion you can use New Document -> From Images...
With default settings for compression with your image, created PDF file will have just about 700KB, because JPEG but not ZIP compression will be used.

Now about exporting to PNG.

When you export to PNG with 150 dpi, 32bpp, you will got an image with dimension 6800 x 5100 pixels, and its uncompressed size is 138.7 MB.
So 37.5MB in PNG is not so bad :)
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

User avatar
Bhikkhu Pesala
User
Posts: 1774
Joined: Tue May 29, 2007 9:29 am
Location: East London
Contact:

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by Bhikkhu Pesala » Thu Jan 12, 2017 9:57 pm

claude vidal wrote:
Patrick-Tracker Supp wrote:I'm still puzzled though by the difference in size when saving from an optimized PDF as JPG (2MB) versus PNG (20MB, even with a compression ratio of 10)
PNG compression is lossless, i.e. no information from the original is discarded.

JPG compression is lossy, i.e. image information is discarded. With photographic images, a lot of information can be discarded before the quality of the image is degraded.

Your 1.5 Mbyte image could be compressed to 232 Kbytes (15% of the size) using JPG compression and still be acceptable for web use. PNG compression is typically much more efficient if used for images of text, and can often be smaller than a JPG image without any loss of the original image information at all.

Zoom in and compare the images in the attachment with your original and compare the JPG and PNG versions of a screen shot of this web page. Use an image editor like IrfanView to compress images.
Windows 10 64-bit • AMD A10-6800K, 8 Gbyte RAM
Review: http://www.softerviews.org/PDF-XChange.html

User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1668
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by Patrick-Tracker Supp » Thu Jan 12, 2017 10:16 pm

Hi Bhikkhu,

Thank you for adding this information. It is very helpful in understanding what is happening here.

Cheers :D
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

claude vidal
User
Posts: 132
Joined: Wed Mar 09, 2016 12:47 am

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by claude vidal » Fri Jan 13, 2017 5:43 pm

Lots of valuable information here, thank you all!

User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1668
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island
Contact:

Re: PNG to PDF to PNG: from 1.5MB to 37.5MB

Post by Patrick-Tracker Supp » Fri Jan 13, 2017 10:37 pm

:D
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

Post Reply