Re: Resizing pictures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-11-28 at 10:20 +0900, John Summerfield wrote:
> Matthieu wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> >    Hello,
> > 
> > I am looking for a software that would allow me to resize
> > automatically a bunch of JPEG pictues, while letting me choose the
> > compression rate and keeping the EXIF informations. Waht could provide
> > that?
> 
I have a crude script for "some" of this.

As it stands it overwrites the originals !!!

John

naxos bin 816# cat image_reduce_size
#!/usr/bin/perl -w
#Reduce size of all *.jpg files in a directory
#Parameter 50% say
#cd correct_dir; image_reduce_size 50% *.jpg
$size = shift @ARGV;
print $size,"\n";

while(@ARGV){
        $file = shift @ARGV;
        ($bfile = $file) =~ s#.*/##s;
       print $file,"   ",$bfile,"\n";
                `convert -resize $size $file /tmp/$bfile`;
                `mv -f /tmp/$bfile $file`;
        }
naxos bin 817#                                  


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux