Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. my $image = Image->new();
  2. $image->Read('my_2000x3000_image.jpg');
  3. $image = $image->[0];
  4. $image->Resize('geometry' => '968' . 'x' . '>');
  5. $image->Write('image_968_min_640.jpg');
  6.  
  7. # Thumbnail Dimensions
  8. my ($max_height, $max_width) = (60,60);
  9.  
  10. my $thumbImage = new Image::Magick;
  11. $thumbImage->Read($oldfile);
  12. $thumbImage->Scale(geometry => qq{${max_height}x${max_width}});
  13. $thumbImage->Write($newfile);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement