We use imagemagick to extract a jpg preview and jpg thumbnail from a wide variety of image file types, using a standard convert command to perform the initial extraction from (eg) a TIF file to a jpg preview, and then a resize on the jpg to get a thumbnail. We have a dll that statically links IM code based on the ImageMagick-6.5.9 release. We build an 8-bit version as it was faster for most of the files we use.
Some files take a long time to process, and we have a time-out in our workflow. If the IM processing get stopped/aborted for any reason, such as a time-out, we end up with temporary files with names like magick-sDHFMNhK in the temp file location (eg in C:/windows/temp). In a particular case, processing a TIFF file with a size of 920 KB (942,956 bytes) generates a temp file of 4.19 GB (4,499,644,032 bytes). I see a similar phenomenon with large PSD files.
Is there any way of our calling code knowing these files are being created, to allow us to delete them if we detect an error condition? If we knew the filename, we could possibly remove(filename) in the destructor of the object that calls IM.
Thanks for any help,
Graeme