List Info

Thread: Image Magick can not write a file




Image Magick can not write a file
country flaguser name
China
2007-05-06 21:41:23
Hi,
As the Project's need, we choose use to use
Image-Magick6.3.3(PermlMagic&ActivePerl5.8.8) under
linux platform. but
when I run the a pl, we always encounter a wrong, the pl
script listed
as below:

sub image_resize {
	my ( $file, $globe_x, $globe_y ) = _;
	my ( $status ) = "resize_ok";
	my $i = Image::Magick->new;
	$i->Read($file);

	$geometry = "geometry";
	$i->Scale(geometry=>$geometry, width=>$globe_x,
height=>$globe_y);

#	print "Content-type: image/gifnn";
#	binmode(STDOUT);

#	$i->Write("gif:-");
	$i->Write($file);

	if( $! ){ $status = "resize_err" }
	return $status ;
}

We got the error message below:

Can't locate object method "Write" via package
"Exception 410: no images
defined `Image::Magick'" (perhaps you forgot to load
"Exception 410: no
images defined `Image::Magick'"?) at
/dev/config/OEM/perl_module/image_resize.pl line 143.

The line 143 code is :  $i->Write($file);

As a new one to the perl, I have no idea to deal it and it
wastes us too
long times, thanks!

_______________________________________________
Magick-developers mailing list
Magick-developersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/m
agick-developers

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )