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 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?
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?
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.