From the other thread:
anthony wrote:
No junk /tmp files were left, and I get a good identify.
Maybe the reported behaviour shows only in Windows. (Snibgo could reproduce it in the other thread.)
Another example - with bigger images:
Code: Select all
convert -limit area 0 -debug resource -log "%m/%f/%l\n %e" -size 5000x10000 xc:blue TIFF:- | convert - null:
My debug output is:
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/AcquireMagickResource/262
Disk: 400MB/400MB/18.446744EB
resource.c/AcquireUniqueFileResource/441
resource.c/AcquireUniqueFileResource/472
R:/Temp/
magick-R3FJpZYE
resource.c/AcquireMagickResource/262
File: 1B/1B/1.54KB
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/AcquireUniqueFileResource/441
-
resource.c/AcquireUniqueFileResource/472
R:/Temp/
magick-eNsPKxhE
resource.c/RelinquishUniqueFileResource/834
R:/Temp/
magick-eNsPKxhE
resource.c/RelinquishMagickResource/801
File: 1B/0B/1.54KB
resource.c/RelinquishMagickResource/801
Disk: 400MB/0B/18.446744EB
resource.c/RelinquishUniqueFileResource/834
R:/Temp/
magick-R3FJpZYE
I've highlighted the temporary files - there are two of them in this example. (Well, there's a third one, probably for the metadata - that doesn't show up in the resource messages. But that one always gets deleted afterwards.) The second file ('magick-eNsPKxhE') holds the output data from the first convert command (here, a 5000x10000 TIFF file) and doesn't get deleted in the end. It's different if I write directly to file:
Code: Select all
convert -limit area 0 -debug resource -log "%m/%f/%l\n %e" -size 5000x10000 xc:blue TIFF:test.tif
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/AcquireMagickResource/262
Disk: 400MB/400MB/18.446744EB
resource.c/AcquireUniqueFileResource/441
resource.c/AcquireUniqueFileResource/472
R:/Temp/
magick-NfP9EInU
resource.c/AcquireMagickResource/262
File: 1B/1B/1.54KB
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/RelinquishMagickResource/801
File: 1B/0B/1.54KB
resource.c/RelinquishMagickResource/801
Disk: 400MB/0B/18.446744EB
resource.c/RelinquishUniqueFileResource/834
R:/Temp/
magick-NfP9EInU
No remaining temporary files. The same if I write to stdout again - this time as PNG:
Code: Select all
convert -limit area 0 -debug resource -log "%m/%f/%l\n %e" -size 5000x10000 xc:blue PNG:- | convert - null:
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/AcquireMagickResource/262
Disk: 400MB/400MB/18.446744EB
resource.c/AcquireUniqueFileResource/441
resource.c/AcquireUniqueFileResource/472
R:/Temp/
magick-R-iarSkt
resource.c/AcquireMagickResource/262
File: 1B/1B/1.54KB
resource.c/AcquireMagickResource/262
Area: 400MB/400MB/0B
resource.c/RelinquishMagickResource/801
File: 1B/0B/1.54KB
resource.c/RelinquishMagickResource/801
Disk: 400MB/0B/18.446744EB
resource.c/RelinquishUniqueFileResource/834
R:/Temp/
magick-R-iarSkt
No problem with that command. (But I'm not completely sure if the number of temporary files in the debug output hints to the problem. When I write JNG to stdout, there are also two temporary files in the debut output - but here, they get deleted.)
Anyway, the problem of the remaining junk files while writing to stdout appears with formats TIFF, BMP, JP2, PCX, MNG.. At least on my system (Windows).
anthony wrote:Code: Select all
convert rose: logo: BMP:- | identify -
Produces an error (convert: unable to write blob `-') so it may be the BMP coder can not handle stdout. It does leave 2 /tmp junk files.
The last message of "convert -debug all rose: logo: BMP:- | convert - null:":
Code: Select all
2010-07-14T19:21:34+02:00 0:00.234 0.063u 6.6.3 Policy Magick[1132]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Write; pattern="-" ...
That's probably the attempt of writing the second image to stdout. After that point, IM crashes on Windows.
But it's not BMP alone. On my system, other formats crash, too. The same with TIFF - when used with '+adjoin':
Code: Select all
convert rose: logo: +adjoin TIFF:- | identify -
Do you need the complete debug output?