Rolling back rev 9142. The gallery is supposed to upscale graphics.
This commit is contained in:
parent
16452c0677
commit
3e0f449c46
2 changed files with 4 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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' ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue