[EMAIL PROTECTED] wrote on 11/21/2007 05:59:28 PM:
> On Wed, 2007-11-21 at 17:21 -0500, Robert W Weaver wrote:
> > Is there a way to force imagemagick to flush output and release the
file
> > handle?
Thanks to Ron Savage and Duc Sequere for the information and the
suggestions to try undef $image. (Tried that, and tried newing the pointer
again, no joy.) Ron, you were correct, it wasn't precisely the problem.
The problem seems to be that imagemagick won't let go of the file.
my $filename = new File::Temp(UNLINK => 0, SUFFIX => '.png');
$rv = $image->Write($filename);
die $rv if $rv;
print "wrote image to $filename\n" if $opts{'d'};
print "DEBUG0", `ls -l $filename`;
undef $image;
print "DEBUG1: please check to see if $filename is still on hold.\n";
my $pause = <>;
Its not a flush problem -- the ls -l shows that the file exists and has a
good size. However, at the pause, if I turn to process explorer, it shows
that my perl image still has a handle open to that temp file there, and
also later after $filename has gone out of context and all I'm trying to do
is read in the file into Excel. I can probably try some sort of
work-around by copying the contents into a file that imagemagick has never
heard of, but this seems really clumsy.
--
Dr. Robert "Woody" Weaver Security, Privacy, Wireless, and IT
Governance
IT Security Architect Phone: 240-782-4260
--
"I would rather spend 10 hours reading someone else's source code than
10 minutes listening to Musak waiting for technical support which isn't."
(By Dr. Greg Wettstein, Roger Maris Cancer Center)
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users