Re: adding text to JPEGs, in bulk

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

 



On Sat, 16 Sep 2006 02:22:20 +0930, Tim wrote:

> Hi,
> 
> Is there an easy way to add some text to a collection of JPEGs?  For
> instance, I'd like to stamp the words "PROOF" across a collection of
> JPEGs I'm showing someone to pick out which ones they'll buy copies of,
> showing them a full sized, full quality, version of the images, but ones
> that they can't just nick.  I really don't want to have to hand modify
> each image in turn, there's about 300 of them.
> 
> -- 
> (Currently running FC4, occasionally trying FC5.)
> 
> Don't send private replies to my address, the mailbox is ignored.
> I read messages from the public lists.

This is what you do:

1) The "convert" program from ImageMagick can do all sorts of
image transformations, including writing text on top of an image.
I don't know the syntax off the top of my head, so you'll have to
look that up. A simple

convert -h 

will show you what it can do. You want to look at the -draw 
primitive. Better yet, look here:

http://www.imagemagick.org/script/convert.php

For instance 

convert -fill red -font Bookman-DemiItalic -pointsize 32 -draw "text 30,30 TEST" input.jpg output.jpg



2) Once you're happy with the results, do all jpgs in a for loop:

for file in *.jpg
do
	outputname=`basename $file .jpg`_out.jpg
	convert [drawing command] $file $outputname
done

You can do this directly at the prompt, or you can save it in
a bash script.

Command line comes in pretty handy, doesn't it?



-- 
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