Now it's developed a different problem. My perl scripts that worked at least half well, though a little blue, with the older version of PerlMagick are now just making empty files. The .png files I'm trying to write come out with 0 bytes. I have below an example script that results in this lack of substance in the resulting file. It runs through just fine with no errors or dieing, all the way to the checkpoint at the end. Might anyone know what's going on?
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
use strict 'refs';
use Image::Magick;
my $image=Image::Magick->new(size=>'10x10');
$image->ReadImage('xc:white');
my @pixel;
$pixel[0]=.7;
$pixel[1]=.5;
$pixel[2]=0;
$image->SetPixel(channel=>"All",x=>0,y=>0,color=>\@pixel);
my @pixels;
@pixels = $image->GetPixel(x=>0,y=>0);
print "Pixel gotted: ($pixels[0],$pixels[1],$pixels[2])\n";
my $filename = "pixelTest.png";
open(IMAGE, ">$filename") || die "Can't open $filename: $!";
$image->Write(file=>\*IMAGE, filename=>$filename) || die "Couldn't write image using path of :$filename";
close(IMAGE);
print "Check point\n";
exit;
Code: Select all
$ ./pixelTest.pl
Pixel gotted: (0.699992370489052,0.500007629510948,0)
Check point