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
 Support for big bmp to jpg

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
levent Posted - Dec 13 2018 : 07:43:00
Hi, I'm a newbie here. Does imageen support to convert big bmp to jpg (for example 20000x20000 24bit)?If so How can I manage to do it in Delphi?
Thanks in advance.
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 17 2018 : 09:24:39
We have tested this:
aBmp := TIEBitmap.create;
aBmp.Location:=ieFile;
aBmp.ParamsEnabled := True;  
// A0 600 dpi 19866 x 28087
abmp.Width:=19866;
abmp.Height:=28087;
aBmp.Params.JPEG_Quality := 90;
aBmp.Write( 'C:\OutImage.jpeg' );
aBmp.free();


It worked well on our systems and saves an 8MB (black) jpeg file.

Is there enough free space on disk?


Example conversion code:
aBmp := TIEBitmap.create;
aBmp.ParamsEnabled := True;
aBmp.Read('c:\try20480.bmp');
aBmp.Params.JPEG_Quality := 90;
aBmp.Write( 'C:\OutImage.jpeg' );
aBmp.free;


Which also worked fine with big files.


FYI, to force ImageEn to use ieFile, even when the image can be contained in memory:
aBmp := TIEBitmap.create;
IEGlobalSettings().DefMinFileSize := -1;    // <<<<< add this
aBmp.MinFileSize := 0;                      // <<<<< add this
aBmp.Location:=ieFile;
...etc...



Nigel
Xequte Software
www.imageen.com
levent Posted - Dec 17 2018 : 02:09:29
Hi again. I attached an example file. There is no problem with the load of bitmap file but when I call write procedure Eoutofresources exception immediately raise..


I believe you can also get same error with the example code below

aBmp := TIEBitmap.create;
aBmp.Location:=ieFile;
aBmp.ParamsEnabled := True;
// A0 600 dpi 19866 x 28087
abmp.Width:=19866;
abmp.Height:=28087;
aBmp.Params.JPEG_Quality := 90;
aBmp.Write( 'C:\OutImage.jpeg' );

And My example file is here:
Download Attachment: 2018121714952_try20480.zip

Thanks in advance

Edit: My delphi vers. 10.2
Edit2: typo fixes...
xequte Posted - Dec 15 2018 : 05:12:06
Hi

Try changing the value of Location to ieFile:

https://www.imageen.com/help/TIEBitmap.Location.html

(Although it should be managed automatically).

If that fails, please upload the file somewhere so we can test it. Also, what version of Delphi are you using?



Nigel
Xequte Software
www.imageen.com
levent Posted - Dec 14 2018 : 05:26:18
Hi again,
thanks for answers but unfortunately, both solutions you offer gave outofresources errors. My example bmp file is 20480x20480 24bit and the file size is approx. 1.2 gb.

Any clue?
P.S. I' ve used trial vers.
xequte Posted - Dec 14 2018 : 03:13:51
You can also do it without a visual component using:

aBmp := TIEBitmap.create;
aBmp.ParamsEnabled := True; // Load params with the image
aBmp.Read( 'C:\MyImage.bmp' );
aBmp.Params.JPEG_Quality := 70;
aBmp.Write( 'C:\OutImage.jpeg' );
aBmp.Free;

(the large size does not matter, as TIEBitmap does not have the memory constraints of TBitmap).

Nigel
Xequte Software
www.imageen.com
yogiyang Posted - Dec 14 2018 : 01:45:03
Hello,

Yes!

Just load the file in ImageEn and save it the format you want.

For example:

  //Load file in ImageEn
  ImageEnView1.IO.LoadFromFileBMP('MyBMPFile');


  //Save File
  ImageEnView1.IO.Params.JPEG_Quality = 90;
  ImageEnView1.IO.SaveToFileJpeg('MyJPGFile');


HTH


Yogi Yang