Huge image memory management
Posted: 2008-04-07T08:55:14-07:00
Hello,
I don't manage to open a 20000x20000 picture. I've tried to set the environment variables as described in the help, but that still doesn't work. (error : Cache ressource exhausted) I would like to set the variables so as the maximum used Ram memory is 100 Mb, the maximum MemoryMapFile memory is 1 Gb, and the max hard drive used is 10 Gb. To do this in my c code, is the following correct? :
SetMagickResourceLimit(AreaResource, 100000); //Size of Max Ram memory used in byte?
SetMagickResourceLimit(FileResource, 33000); //Max number of pixels in RAM so
// AreaResource/3 if I'm in 24 bit/pixels?
SetMagickResourceLimit(MemoryResource, 100000); //I don't see the difference with
//AreaResource?
SetMagickResourceLimit(MapResource, 1000000);//1 Gb in MemoryMapFile memory
SetMagickResourceLimit(DiskResource, 10000000); //Max 10 Gb on hard drive
What am I misunderstanding?
Thank you very much in advance.
Best regards.
Bob
I don't manage to open a 20000x20000 picture. I've tried to set the environment variables as described in the help, but that still doesn't work. (error : Cache ressource exhausted) I would like to set the variables so as the maximum used Ram memory is 100 Mb, the maximum MemoryMapFile memory is 1 Gb, and the max hard drive used is 10 Gb. To do this in my c code, is the following correct? :
SetMagickResourceLimit(AreaResource, 100000); //Size of Max Ram memory used in byte?
SetMagickResourceLimit(FileResource, 33000); //Max number of pixels in RAM so
// AreaResource/3 if I'm in 24 bit/pixels?
SetMagickResourceLimit(MemoryResource, 100000); //I don't see the difference with
//AreaResource?
SetMagickResourceLimit(MapResource, 1000000);//1 Gb in MemoryMapFile memory
SetMagickResourceLimit(DiskResource, 10000000); //Max 10 Gb on hard drive
What am I misunderstanding?
Thank you very much in advance.
Best regards.
Bob