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
 TImageEnView.Proc.Resample "Out of memory"
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Oct 04 2016 :  00:36:24  Show Profile  Reply
How do I get around "Out of memory" issues when resample images? I am actually trying to resample an image that is too large to a smaller size, but I get "Out of memory" issues. Any way to get around this?

Thanks in advance.

Andy

xequte

38615 Posts

Posted - Oct 04 2016 :  02:55:25  Show Profile  Reply
Hi Andy

Is LegacyBitmap set to false?

What is ImageEnView1.Bitmap.Location set to?

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

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Oct 06 2016 :  02:10:00  Show Profile  Reply
Hi Nigel,

Thanks for the tip. Setting the IEBitmap.Location to ieFile seems to help a little.

But I ran into other memory issues where I have to get a HGDIOBJ from a file. Are there functions in ImageEn that can load a graphic file and output a HGDIOBJ value?

Thanks Nigel.

Andy
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Oct 06 2016 :  02:13:34  Show Profile  Reply
Also when using Proc.Resample I get the "out of memory" consistently if I set a resample filter like rfLanczos3, but setting filter to rfNone helps a little. Any way to get around this?

Thanks again Nigel.

Andy
Go to Top of Page

xequte

38615 Posts

Posted - Oct 06 2016 :  12:01:36  Show Profile  Reply
Hi Andy

Can you supply an example file and code to reproduce the "out of memory" error when resampling?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Oct 08 2016 :  00:21:42  Show Profile  Reply
Hi Nigel,

Here is the sample file. I am trying to resample the file when it is over 8000 pixels for width and/or height, but I am also performing the resampling 4 times with 4 different files, similar to this one, in the same process. That's when I get the "out of memory" error.



Is there a way to use ImageEn to output to a System.PByte value? Right now, I am using standard bitmap to do this and I think this is one of my bottlenecks with memory.

Thanks Nigel.

Andy
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Oct 08 2016 :  00:33:37  Show Profile  Reply
Oops, sorry I forgot to include the download link for the sample file:

https://1drv.ms/u/s!AnMHJDW3UXY8hbUa8xNKD9Pb20C4KQ

Andy
Go to Top of Page

xequte

38615 Posts

Posted - Oct 08 2016 :  04:05:53  Show Profile  Reply
Hi Andy

Thanks, I'll investigate when I am back in the office next week.

There is not a method to output to a System.PByte

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: