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
 Saving JPEG - 32bit vs 64bit - Creates different sizes?

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
cpstevenc Posted - May 25 2024 : 14:10:24
Using Delphi 11.3 and latest ImageEN as of today.

I have an issue, where please don't get hooked up on the why its an issue... it just is...... out of my control on the panic.

I reduce the code down to this, very simple.

Take any JPG input.

Save it back out.

Simple.

The "problem" is the file that is created in 32bit and 64bit don't match.

Example would be

input = 216,709 bytes
32bit output = 205,209 bytes
64bit output = 201,966 bytes

The issue is, everyone expects the file sizes on the output to be the same.
And it is not.

Again, on the high level, this doesn't seem like a big deal.
But we are dealing with a process among thousands of servers, millions ( maybe close to billions? ) of images now.
And for that process, this is an issue....

I know it sounds odd/dumb, but its the problem I am now tasked on figuring out.

procedure DoImage;
begin
 var
 Image := TImageEn.Create(nil);
 Image.io.LoadFromFile('in.jpg');
{$IFDEF WIN64}
 Image.io.SaveToFileJpeg('out-64.jpg');
{$ELSE}
 Image.io.SaveToFileJpeg('out-32.jpg');
{$ENDIF}
 Image.Free;
end;



Using C# to do similar code, 32bit vs 64bit, makes 1:1 files.
Exactly the same.

3   L A T E S T    R E P L I E S    (Newest First)
cpstevenc Posted - May 25 2024 : 21:55:46
Hmm ok... This I had zero clue on.

Up until now, everything has been 32bit.

So 64bit and ImageEN is a new thing we are working on.

xequte Posted - May 25 2024 : 21:42:21
Hi

Remember that ImageEn includes three JPEG engines:

- Native (32bit only)
- DLL (32 and 64bit)
- WIC (32 and 64bit)

By default, native is used on 32bit apps and DLL on 64bit apps (if the DLL is found, otherwise WIC).

So, ensure you are using the same engine on both 32bit and 64bit. The best method would be to include the ielib DLL in the same folder as your EXE (32 and 64bit versions):

https://www.imageen.com/help/TIEGlobalSettings.JPEGEngine.html
https://www.imageen.com/help/ImageEn_DLLs.html

Nigel
Xequte Software
www.imageen.com
cpstevenc Posted - May 25 2024 : 21:22:34
I found that I am NOT on the latest ImageEN.

Also this could be Embedded ICC profile related?

Using this site @ https://processing.compress-or-die.com/analyze-process

All the images made with 64bit is missing Embedded ICC Profile,
While all images made with 32bit has this defined.

Waiting on email to get the latest download link and will report back.