The deprecated use of Graphics::Magick has been eliminated. WebGUI uses
Image::Magick exclusively for all image processing functions once again.
This commit is contained in:
parent
04f2388ef8
commit
782a4396b5
4 changed files with 6 additions and 39 deletions
|
|
@ -19,15 +19,7 @@ use WebGUI::Test;
|
|||
use WebGUI::Session;
|
||||
use Test::More;
|
||||
use Test::Deep;
|
||||
my $graphicsClass;
|
||||
BEGIN {
|
||||
if (eval { require Image::Magick; 1 }) {
|
||||
$graphicsClass = 'Image::Magick';
|
||||
}
|
||||
elsif (eval { require Graphics::Magick; 1 }) {
|
||||
$graphicsClass = 'Graphics::Magick';
|
||||
}
|
||||
}
|
||||
use Image::Magick;
|
||||
use WebGUI::Asset::File::GalleryFile::Photo;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -17,23 +17,11 @@ use WebGUI::Macro::Thumbnail;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Image;
|
||||
use WebGUI::Storage;
|
||||
|
||||
use Image::Magick;
|
||||
use Test::More; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
plan tests => 9;
|
||||
|
||||
my $graphicsPackage;
|
||||
if (eval { require Graphics::Magick; 1 }) {
|
||||
$graphicsPackage = 'Graphics::Magick';
|
||||
}
|
||||
elsif (eval { require Image::Magick; 1 }) {
|
||||
$graphicsPackage = 'Image::Magick';
|
||||
}
|
||||
else {
|
||||
die "Unable to load Graphics::Magick or Image::Magick!\n";
|
||||
}
|
||||
pass "Load $graphicsPackage";
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
is(
|
||||
|
|
@ -98,7 +86,7 @@ SKIP: {
|
|||
|
||||
##Load the image into some parser and check a few pixels to see if they're blue-ish.
|
||||
##->Get('pixel[x,y]') hopefully returns color in hex triplets
|
||||
my $thumbImg = $graphicsPackage->new();
|
||||
my $thumbImg = Image::Magick->new();
|
||||
$thumbImg->Read(filename => $thumbFile);
|
||||
|
||||
cmp_bag([$thumbImg->GetPixels(width=>1, height=>1, x=>25, y=>25, map=>'RGB', normalize=>'true')], [0,0,1], 'blue pixel #1');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue