[KPhotoAlbum] Printing images with automatically added text

Joe josephj at main.nc.us
Wed Dec 12 22:46:42 CET 2012

Well, as your code does, convert can add the arbitrary text as a comment
in the file (or in a copy of it to keep things clean). Then, exiftool
-comment file.jpg will extract it for use in the script.  That's a
start, but I still don't know how to print them together (and I have the
path directly when i access the file from a script.)

display (from imagemagick) shows 14 characters of the "comment" field in
the lower right corner of the image, but that's not very helpful.

Another step closer:
composite <title-file.png> <base-file.jpg> <new-file.jpg>
puts the title file into the new image in the upper left corner.  Now, I
just have to convert the path into an image.

Another way that works better is:
convert -pointsize 20 -fill black -draw 'text 10,20 "TEST LABEL" '
test.jpg test2.jpg
but it puts the image in the picture instead of outside it somewhere and
it depends on the background contrasting with whatever color the text
is.  It will also take some advanced fiddling to get the file name
inside all those quotes in bash.

(found this one at

Putting this all together (but I'm not yet motivated enough to code it),
I could create an empty image with an opaque background like white and
use the convert to put the text somewhere near an edge.  Then, use
another convert to shrink the original picture so it will fit in the
"frame" of the first and then use composite to put it there.

This is more than a bit convoluted and would probably involve some hard
coding.  Hopefully, there's an easier way.


On 12/12/2012 02:06 PM, Risto H. Kurppa wrote:
> Hi Joe!
> Interesting idea!
> I think using something
> like http://gitorious.org/rhk/scripts/blobs/master/nef_julkaisija.sh but
> coupling it with KPA's 'open with external app' could be used at least
> to generate the initial images with texts on them. Then some command
> line magic needs to be added for the printing (see for
> example http://forums.anandtech.com/showthread.php?t=739845 )
> Risto
> On Wed, Dec 12, 2012 at 8:49 PM, Joe <josephj at main.nc.us
> <mailto:josephj at main.nc.us>> wrote:
>     I have a lot of scanned images and images/photos I'm working on with
>     multiple versions.  When I print them (using various programs), all I
>     get is the image and, often, it's difficult to tell which image came
>     from which file.  This is particularly frustrating with my (27K)
>     photos
>     when I have a print and want another copy and can't find it.  (The
>     photos are in KPhotoAlbum, so I can find the small minority :( that I
>     have actually tagged correctly.)  I could also add the scans to
>     KPhotoAlbum.
>     What I would like is  a utility that would print a bunch of images
>     (e.g.
>     doit *.jpg) and include an automatic (program generated) caption
>     (hopefully configurable) with something like the full path of the file
>     in it.
>     I need this while projects are in progress and for cleaning up
>     afterwards.  This is not for "final" images.
>     It would be cool (and economical) if I could also specify the
>     print size
>     of the image because, often, smaller "thumbnail" images (but not
>     necessarily the thumbnails that are already generated by KPhotoAlbum)
>     may be enough for organizing/cleaning up and they would save a
>     bunch of
>     time, paper, and ink/toner.
>     Is there anything in KPhotoAlbum or that can be used with it to
>     accomplish this?
>     TIA
>         Joe
>     _______________________________________________
>     KPhotoAlbum mailing list
>     KPhotoAlbum at mail.kdab.com <mailto:KPhotoAlbum at mail.kdab.com>
>     https://mail.kdab.com/mailman/listinfo/kphotoalbum
> -- 
> | risto h. kurppa
> | risto at kurppa dot fi
> | http://risto.kurppa.fi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kdab.com/pipermail/kphotoalbum/attachments/20121212/530f6900/attachment.html>

More information about the KPhotoAlbum mailing list