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
 Calculate JPEG save size

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
jwcarney Posted - Jun 25 2022 : 12:35:03
I noticed in the demo apps, the TSaveImageEnDialog has an advanced option, which when selected shows a screen
with the picture and it's original file size, when you select compression quality and press preview, it shows the compressed size. How do I get that value directly in code so I can check file size before saving. If the size is too large I'll reset the quality and process again (I'll use the assign options to reuse the original file loaded, applying compression to a second tiebitmap that will be the one saved). Seems simple but I can't find the property in the docs. I Currently have the trial version running in Delphi 10.43 and Delphi 11.1 (need both for clients).



Joseph W Carney
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 30 2022 : 00:25:21
Hi Joseph

If you are still waiting for your registration, please check your spam folder, and email us if you have not received it.

Nigel
Xequte Software
www.imageen.com
jwcarney Posted - Jun 28 2022 : 07:26:22
Thank you.
Also, just purchased license. anyway to get my registration before Wed?
Joseph W Carney
xequte Posted - Jun 27 2022 : 17:50:28
Hi Joseph

Here is an example:

// Show a preview and compressed size for a JPEG
ienSource.IO.Params.JPEG_QUALITY := JPEGQuality;
ienSource.IO.Params.JPEG_COLORSPACE := JPEGPhotometric;
ienSource.IO.Params.JPEG_DCTMETHOD := JPEGDCTMethod;
ienSource.IO.Params.JPEG_OPTIMALHUFFMAN := JPEGOptimalHuffman;
ienSource.IO.Params.JPEG_SMOOTH := JPEGSmooth;
ienSource.IO.Params.JPEG_PROGRESSIVE := JPEGProgressive;
ienSource.IO.SaveToStreamJpeg(mf);
mf.position := 0;
ienPreview.IO.LoadFromStreamJpeg(mf);
lblSaveSize.caption := IEBytesToStr2( mf.size );


Nigel
Xequte Software
www.imageen.com