beginnings of thumbnail generation test
This commit is contained in:
parent
f408538cb5
commit
8b973604cd
1 changed files with 12 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ our $todo;
|
||||||
|
|
||||||
use WebGUI::Test;
|
use WebGUI::Test;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
|
use WebGUI::Image;
|
||||||
use WebGUI::Storage::Image;
|
use WebGUI::Storage::Image;
|
||||||
|
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
|
|
@ -110,6 +111,16 @@ foreach my $extTest ( @{ $extensionTests } ) {
|
||||||
is( $imageStore->isImage($extTest->{filename}), $extTest->{isImage}, $extTest->{comment} );
|
is( $imageStore->isImage($extTest->{filename}), $extTest->{isImage}, $extTest->{comment} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
####################################################
|
||||||
|
#
|
||||||
|
# generateThumbnail
|
||||||
|
#
|
||||||
|
####################################################
|
||||||
|
my $thumbStore = WebGUI::Storage::Image->create($session);
|
||||||
|
my $square = WebGUI::Image->new($session, 500, 500);
|
||||||
|
$square->setBackgroundColor('#FF0000');
|
||||||
|
$square->saveToStorageLocation($thumbStore, 'square.png');
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
#
|
#
|
||||||
# getSizeInPixels
|
# getSizeInPixels
|
||||||
|
|
@ -127,7 +138,7 @@ TODO: {
|
||||||
|
|
||||||
END {
|
END {
|
||||||
foreach my $stor (
|
foreach my $stor (
|
||||||
$imageStore,
|
$imageStore, $thumbStore,
|
||||||
) {
|
) {
|
||||||
ref $stor eq "WebGUI::Storage::Image" and $stor->delete;
|
ref $stor eq "WebGUI::Storage::Image" and $stor->delete;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue