Re: adding text to JPEGs, in bulk

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

 



Amadeus W. M. a écrit :
> 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?

All these answers about adding comment text to jpeg are interresting but
the result is "binary". I have been seeking for a while (and did not
find an answer) on how to annotate an image with a "grep readable"
annotation. If I use Gimp or ImageMagick, to write the comment "foo" in
an image, grep foo image.jpg returns "binary file image.jpg matches".

Is there a way to add a comment in ascii characters in an image? And to
be able to use grep to find the images with a particular string in it?

To be more clear: I am working with image of manuscripts and I want to
able to add a commentary to each image like "in this image the subjet is
..." Then I could use grep to find out what are the images which contain
a particular subject.

There is some tool like this with gThumb, but the commentaries are in
separates files, written in xml (cannot use grep!) and this is quite
tricky to maintain a synchronisation between several computers (using
rsync for instance).

Thanks.

-- 
François Patte
UFR de mathématiques et informatique
Université Paris 5 - Paris
http://www.math-info.univ-paris5.fr/~patte

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