I'm going through a bunch of files looking for differences:
# read the (next) file
@$Image = (); # clear out the old image
$status = $Image->Read($file);
warn "$status" if "$status";
# downsize it 50%
$status = $Image->AdaptiveResize('50%');
warn "$status" if "$status";
# label that image
$LabelText = sprintf("DrivewayCam.GeekHo.com 20%s-%s-%s %s:%s:%s",[stuff]);
$status = $Image->Annotate(text=>$LabelText,undercolor=>'black',fill=>'white',font=>'Times-Roman',pointsize=>15,gravity=>'SouthWest');
warn "$status" if "$status";
# see how much it changed since the last one
@$Difference = ();
$Difference = $Image->Compare(image=>$Previous, metric=>'PSNR');
$SNRdelta = $Difference->Get('error');
printf ("[ %f ]",$SNRdelta);
but on certain files, the Read doesn't throw an exception but the I get the following warnings:
Exception 410: no images defined `AdaptiveResize' @ Magick.xs/XS_Image__Magick_Mogrify/6910 at drivewaycam.pl line 115.
Exception 410: no images defined `Annotate' @ Magick.xs/XS_Image__Magick_Mogrify/6910 at drivewaycam.pl line 139.
Can't locate object method "Get" via package "Exception 410: no images defined `Image::Magick' @ Magick.xs/XS_Image__Magick_Compare/3071" (perhaps you forgot to load "Exception 410: no images defined `Image::Magick' @ Magick.xs/XS_Image__Magick_Compare/3071"?) at drivewaycam.pl line 146.
And then it reads the _next_ file, which is OK, and at $SNRdelta = $Difference->Get('error'); I'm back at the shell prompt with no error messages.
One of the offending files is at
http://geekho.com/~wpns/WebCam-5_09-11- ... -27-85.jpg
and a good one is at
http://geekho.com/~wpns/WebCam-5_09-11- ... -07-91.jpg
if that helps.
Yeah, I know I should do something with the warnings, and get the camera to stop writing garbage files (and I'm working on those issues), but shouldn't ->Get('error') throw an error? And/Or shouldn't the ->Read on the broken file tell me something's wrong?
I'm running ImageMagick-6.5.7-4 from yesterday. 8*)
Thanks!
Weird .jpg causes Exception 410: no images defined
Re: Weird .jpg causes Exception 410: no images defined
We can reproduce the problem you posted and will have a fix for it in the next point release of ImaegMagick. Thanks.