4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/perl -w
use strict;
use Image::Magick;
my $img = Image::Magick->new;
my $filename="";
my $num_frames=0;
my (@pfad,$pfad);
foreach (@ARGV) {
@pfad = split("/",$_);
$filename = pop(@pfad);
$pfad = join("/",@pfad);
$img->Read($pfad."/".$filename);
$num_frames = scalar @$img;
print "Number of frames: $num_frames\n";
$#$img = 0;
my ($w,$h) = $img->Get("width","height");
print "Width: $w\nHeight: $h\n";
my $x=$w/80;
if(($h/$x) > 80) {
$x = $h/80;}
print "New size:\nWidth: ".($w/$x)."\nHeight: ".($h/$x)."\n";
$img->Resize(width=>($w/$x),height=>($h/$x));
$img->Write($pfad."/thm_".$filename);
}
4 Einträge, 1 Seite |