How to insert text in a picture

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to insert text in a picture

Martin Blank
Hallo everybody,

I can insert a text in a picture by using the watermark function. But
how can I define a text which insert the year of the create field in
exif data? How can I create a time stamp like some cameras do?

I am using digiKam 2.2.0 with opensuse 12.1

Thanks,

mb

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: How to insert text in a picture

Jean-François Rabasse

On Fri, 8 Jun 2012, Martin Blank wrote:

> Hallo everybody,
>
> I can insert a text in a picture by using the watermark function. But
> how can I define a text which insert the year of the create field in
> exif data? How can I create a time stamp like some cameras do?

Hello Martin,

Could you explicit a bit more, not what you wish to do, seems clear, but
*how* you wish to do that ?

1. Do you plan to do that from inside Digikam, probably using the batch
    system ?

2. Do you plan to setup a command line script to do that directly in
    your images folders ?

If answer is 1, I personaly don't know. Probably experienced DK users
could help you.

If answer is 2, it's always possible to write a small shell script,
extracting the image date with a metadata reader such as exiftool.
In your case, something like :
  IDATE=`exiftool -exif:datetimeoriginal <Imagefile> | awk '{print $4}'`
will set you a shell variable with full date in format YYYY:MM:DD
(you can tweak that with some 'sed' processing.)

After that, the best way to write text onto an image is probably to use
the Imagemagick convert program, inside your script.
  convert <OriginalImage> ... label-with ${IDATE} ... <AnnotatedImage>

Concert syntax is not always trivial, but there are dozens of examples
you can read and adapt. See http://www.imagemagick.org/Usage/annotating/


Hope this could help,
Jean-François
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
pob
Reply | Threaded
Open this post in threaded view
|

Re: How to insert text in a picture

pob
Am 10.06.2012 12:09, schrieb Jean-François Rabasse:

>
> On Fri, 8 Jun 2012, Martin Blank wrote:
>
>> Hallo everybody,
>>
>> I can insert a text in a picture by using the watermark function. But
>> how can I define a text which insert the year of the create field in
>> exif data? How can I create a time stamp like some cameras do?
>
> Hello Martin,
>
> Could you explicit a bit more, not what you wish to do, seems clear, but
> *how* you wish to do that ?
>
> 1. Do you plan to do that from inside Digikam, probably using the batch
>    system ?
>
> 2. Do you plan to setup a command line script to do that directly in
>    your images folders ?
>
> If answer is 1, I personaly don't know. Probably experienced DK users
> could help you.
>
> If answer is 2, it's always possible to write a small shell script,
> extracting the image date with a metadata reader such as exiftool.
> In your case, something like :
>  IDATE=`exiftool -exif:datetimeoriginal <Imagefile> | awk '{print $4}'`
> will set you a shell variable with full date in format YYYY:MM:DD
> (you can tweak that with some 'sed' processing.)
>
> After that, the best way to write text onto an image is probably to use
> the Imagemagick convert program, inside your script.
>  convert <OriginalImage> ... label-with ${IDATE} ... <AnnotatedImage>
>
> Concert syntax is not always trivial, but there are dozens of examples
> you can read and adapt. See http://www.imagemagick.org/Usage/annotating/
>
I hope it go from inside DK, e.g. select file, add them to batch queue
and execute a function like watermark.

if there is not anyone who knows a DK built-in solution, I start writing
a script. But it does more work to select files.

btw identify shows the image size. It could be used to scale the text
automaticly.

Thank you.

Martin
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: How to insert text in a picture

Martin Blank
In reply to this post by Jean-François Rabasse
Am 10.06.2012 12:09, schrieb Jean-François Rabasse:

>
> On Fri, 8 Jun 2012, Martin Blank wrote:
>
>> Hallo everybody,
>>
>> I can insert a text in a picture by using the watermark function. But
>> how can I define a text which insert the year of the create field in
>> exif data? How can I create a time stamp like some cameras do?
>
> Hello Martin,
>
> Could you explicit a bit more, not what you wish to do, seems clear, but
> *how* you wish to do that ?
>
> 1. Do you plan to do that from inside Digikam, probably using the batch
>    system ?
>
> 2. Do you plan to setup a command line script to do that directly in
>    your images folders ?
>
> If answer is 1, I personaly don't know. Probably experienced DK users
> could help you.
>
> If answer is 2, it's always possible to write a small shell script,
> extracting the image date with a metadata reader such as exiftool.
> In your case, something like :
>  IDATE=`exiftool -exif:datetimeoriginal <Imagefile> | awk '{print $4}'`
> will set you a shell variable with full date in format YYYY:MM:DD
> (you can tweak that with some 'sed' processing.)
>
> After that, the best way to write text onto an image is probably to use
> the Imagemagick convert program, inside your script.
>  convert <OriginalImage> ... label-with ${IDATE} ... <AnnotatedImage>
>
> Concert syntax is not always trivial, but there are dozens of examples
> you can read and adapt. See http://www.imagemagick.org/Usage/annotating/

I hope it go from inside DK, e.g. select file, add them to batch queue
and execute a function like watermark. if there is not anyone who knows
a DK built-in solution, I start writing a script. But it does more work
to select files.

Btw. identify shows the image size. It could be used to scale the text
automaticly.

Thank you.

Martin

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: How to insert text in a picture

Martin Blank
In reply to this post by pob
Sorry about this double mailing. I have some trouble with my local
deliver system.

Martin

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users