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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEN file size
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

whisper1980

USA
83 Posts

Posted - Feb 05 2021 :  15:58:02  Show Profile  Reply
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

whisper1980

USA
83 Posts

Posted - Feb 05 2021 :  16:28:58  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: