diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fc1070bc3..8157955b0 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -12,6 +12,7 @@ - fixed a bug where no Payment Gateway labels show up when checking out. - fixed #9511: Subcategories displayed incorrectly (Henry Tang, Long Term Results B.v.) - fixed #4137: Calendar Search page has head tags in body + - reverted #9386: Gallery: "Image resolutions" issue. This is a feature of the Galley. - fixed: HTTP Proxy doesn't serve new content to visitors - fixed: Exporting to static files can leak large amounts of memory diff --git a/lib/WebGUI/Asset/File/GalleryFile/Photo.pm b/lib/WebGUI/Asset/File/GalleryFile/Photo.pm index 3afe1dbc2..0bcdfb544 100644 --- a/lib/WebGUI/Asset/File/GalleryFile/Photo.pm +++ b/lib/WebGUI/Asset/File/GalleryFile/Photo.pm @@ -22,7 +22,6 @@ use Image::ExifTool qw( :Public ); use JSON qw/ to_json from_json /; use URI::Escape; use Tie::IxHash; -use List::MoreUtils; use WebGUI::DateTime; use WebGUI::Friends; @@ -361,19 +360,14 @@ sub makeResolutions { my $storage = $self->getStorageLocation; $self->session->errorHandler->info(" Making resolutions for '" . $self->get("filename") . q{'}); - my $filename = $self->get('filename'); - RESOLUTION: for my $res ( @$resolutions ) { + for my $res ( @$resolutions ) { # carp if resolution is bad if ( $res !~ /^\d+$/ && $res !~ /^\d*x\d*/ ) { carp "Geometry '$res' is invalid. Skipping."; - next RESOLUTION; + next; } - ##Only resize images if the image is too big! - my ($imageX, $imageY) = $storage->getSizeInPixels($filename); - my @resolutions = split /x/, $res; - next RESOLUTION if List::MoreUtils::any { $imageX < $_ && $imageY < $_ } @resolutions; my $newFilename = $res . ".jpg"; - $storage->copyFile( $filename, $newFilename ); + $storage->copyFile( $self->get("filename"), $newFilename ); $storage->resize( $newFilename, $res, undef, $self->getGallery->get( 'imageDensity' ) ); } }