Re: Automatic Picture Sizing and Renaming

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

 



On Mon, 2006-12-11 at 22:55 -0500, Thom Paine wrote:
> I have several hundred pictures I'd like to resize to 800x600 and I'd
> also like to randomize their names to have them shuffle on a computer
> screen for a screensaver.
> 
> I've been reading a bit and have some of a command figured out.
> 
> #convert -interlace NONE -geometry 800x600
> /home/workgroup/pics/image1.jpg
> /home/workgroup/pics/image1.resized.jpg
> 
> I'm not sure how to get this to work on a whole directory full of pictures.
> Should I run this in some sort of a while do loop? I'm a rookie with
> bash, but have been reading a bit trying to understand it.
> 
> Since I want them all to be random, is it better to rename them all
> first with a random number between 1000 and 1999 with pic in front or
> should I resize them first, delete the bigger original (because it
> will be a copy) and then rename them? And what happens if I happen to
> already have a picture named that?
> 
> Can anyone give me some help with scripting this up to work automatically?
> 
> Preferably I'd like these features.
> 
> 1. Take all images in a source directory and convert them to 800x600 resolution.
> 2. Rename all images in said source directory to a random number
> between 1000 and 1999 and then have the image name come out something
> like pic1717.jpg
> 3. Delete the images in the source directory making room for another
> batch to convert and display.
> 
> Thanks.
> 
> -- 
> -=/>Thom
> 

Convert is part of ImageMagick and thus it's manual is useful.  There is
a way to have the files converted and renamed.  Look at mogrify instead.


http://www.linbox.com/ucome.rvt?file=/any/doc_distrib/ImageMagick-5.1.1/www/tools.html

Examples
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux