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
 IEN file 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
whisper1980 Posted - Feb 05 2021 : 15:58:02
In my database, I save both a copy of the layers stream and a copy of the merged JPG image stream. The layers stream is huge compared to the merged jpg stream size. This is also true with files sizes.

In one example, a jpg image is 102.7KB, but the Layers stream is 756.6KB. Another example is where I have a jpg file that is 2.9MB but the IEN file is 45.8MB.

Is there a way to save the IEN/Layers stream in a smaller format? Are you saving the base image as a bitmap and not in the original image format such as JPG? If saving as a bitmap, can I save the base image as JPG instead?

The reason I need it smaller is that I do database backups of reports that have images. And they usually add annotations to images which creates a layers stream so that they can go back and make changes such as moving or removing previously added object layers. With this 7x or greater increase in size, the backups end up being too big to email for one thing, plus the database is growing rapidly. My customers are inspectors and can easily have over 100 edited images per report.

I use the following for saving streams:
ImageEnView1.LayersSaveMergedTo(fImageStream, fFileType); // ioJPEG usually
ImageEnView1.LayersSaveToStream(fLayersStream);

I use the following for saving files:
ImageEnView1.LayersSaveMergedTo(fImageFilename); // with .jpg extension
ImageEnView1.IO.SaveToFile(fLayerFilename); // with .ien extension

Thanks. Hopefully I simply overlooked something in saving of layers.

Eric
1   L A T E S T    R E P L I E S    (Newest First)
whisper1980 Posted - Feb 05 2021 : 16:28:58
Arg... just figured it out. Nevermind.

Save to stream:
ImageEnView1.IO.Params.IEN_Compression := fFileType; // i.e. ioJPEG
ImageEnView1.IO.SaveToStreamIEN(fLayersStream);

Save to File:
ImageEnView1.IO.Params.IEN_Compression := fFileType; // i.e. ioJPEG
ImageEnView1.IO.SaveToFileIEN(fLayerFilename);

Eric