ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 PNG Compression

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
shackers Posted - Jan 20 2020 : 08:07:59
I am extracting images/pages from a pdf file using PDFIUM. They are rendered to bitmap and I then save them to PNG.

Getting the maximum compression/file size is extremely important.

I have used a opensource product called PDFToPNG to carry out the same exercise.

It achieves precisely the same quality of png (same dimensions, same bitdepth) but at broadly 25% of the file size achieved by ImageEnIO.


I have looked at the suggestions in this topic:
https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=2878

They don't help much.

I am currently extracting the bitmap from the PDF and then processing as follows:

ImageEnIO.LoadFromFileAuto(OpenDialog1.FileName);               
ImageEnIO.params.PNG_Filter := ioPNG_FILTER_ALL;
ImageENIO.params.ResetInfo;
ImageEnIO.params.PNG_Compression := 9;
ImageEnIO.SaveToFilePng(FileName);


Do you have any idea what more I can do to achieve anything close to the file size achieved by PDFToPNG?
2   L A T E S T    R E P L I E S    (Newest First)
shackers Posted - Feb 13 2020 : 09:32:56
Hi,

I'm afraid I can't confirm that. PDFToPng is a command line app that produces a PNG without access to any intermediate PDF.

Mark
xequte Posted - Jan 21 2020 : 20:00:34
Hi

There are two conversions being performed here:

1. PDF -> Bitmap
2. Bitmap -> PNG

Are you able to confirm that it is step 2, ImageEn's step, that causes the larger file?

I.e. is the Bitmap generated by PDFIUM and PDFtoPNG identical?

Nigel
Xequte Software
www.imageen.com