Hi everybody,
I'm using Magick++ to obtain information about large number of very big images. I'm using ping method, from Magick::Image. My problem is that although I'm just pinging images, ImageMagick creates temporary files in temp folder, and after pinging large amount of files, I run out of space (Temp folder reaches 50GB). I tried limiting disk usage with MagickCore::SetMagickResourceLimit(MagickCore::DiskResource, 0); but then I get the "cache resource exhausted" exception. Is there any way I could disable caching ? Any help would be welcome.
Thanks, and please excuse my lousy English .
Ping large amount of images
Re: Ping large amount of images
With most formats, pinging is lightweight. However, a few require that they first be cached to disk. Which image formats are you pinging? Can you post a small as possible Magick++ source code that illustrates the problem?
Re: Ping large amount of images
Thanks for quick reply .
I'm working with 1bit tiff files. Here's output of identify for one of them, they should all be of same size. There's around 700 of such images.
Here's a snippet of trimmed down code of what I'm doing:
while the loop executes ImageMagick creates large number of magick-* files in Temp directory. Each file is 213M big. This continues until I run out of space..
I ping each file exactly once, so I don't need to keep cache for all of them, any way I can achieve this ? Thanks.
I'm working with 1bit tiff files. Here's output of identify for one of them, they should all be of same size. There's around 700 of such images.
Code: Select all
a4b2.tif TIFF 9449x5906 9449x5906+0+0 1-bit Bilevel DirectClass 777kb 0.344u 0:01
identify.exe: incorrect count for field "DateTime" (11, expecting 20); tag ignored. `a4b2.tif'.
identify.exe: a4b2.tif: unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory'.
identify.exe: a4b2.tif: unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory'.
Code: Select all
for ( recursive_directory_iterator iter(imagesPath); iter != endIter; iter++ )
{
Magick::Image image_loader = Magick::Image();
path image_file = iter->path();
try
{
image_loader.ping(imageFile.string());
}
catch(...)
{
//Exception Handling...
}
}
I ping each file exactly once, so I don't need to keep cache for all of them, any way I can achieve this ? Thanks.
Re: Ping large amount of images
We can reproduce the problem you posted and will have a fix for it in the ImageMagick Subversion trunk within a day or two. The patch will be available in the next point release as well. Thanks.
Re: Ping large amount of images
Thanks If there's anything I can do to help, just say it.