Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $image = Image->new();
- $image->Read('my_2000x3000_image.jpg');
- $image = $image->[0];
- $image->Resize('geometry' => '968' . 'x' . '>');
- $image->Write('image_968_min_640.jpg');
- # Thumbnail Dimensions
- my ($max_height, $max_width) = (60,60);
- my $thumbImage = new Image::Magick;
- $thumbImage->Read($oldfile);
- $thumbImage->Scale(geometry => qq{${max_height}x${max_width}});
- $thumbImage->Write($newfile);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement