Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Digital Photography > How to ADD EXIF information to a JPEG photo

Reply
Thread Tools

How to ADD EXIF information to a JPEG photo

 
 
James Grady
Guest
Posts: n/a
 
      01-21-2014
I can strip EXIF data from a JPEG with jhead on Linux:
$ jhead -purejpg photo.jpg

But how can I ADD EXIF information to a JPEG on the
Linux (Ubuntu) command line?

For example, let's say I have photo1.jpg with EXIF data
that I want to also transfer to photo2.jpg.

Is there a Linux command to copy EXIF data from photo1
to photo2?

Something like:
$ copy-exif photo1.jpg photo2.jpg

 
Reply With Quote
 
 
 
 
sid
Guest
Posts: n/a
 
      01-21-2014
James Grady wrote:

> I can strip EXIF data from a JPEG with jhead on Linux:
> $ jhead -purejpg photo.jpg
>
> But how can I ADD EXIF information to a JPEG on the
> Linux (Ubuntu) command line?
>
> For example, let's say I have photo1.jpg with EXIF data
> that I want to also transfer to photo2.jpg.
>
> Is there a Linux command to copy EXIF data from photo1
> to photo2?
>
> Something like:
> $ copy-exif photo1.jpg photo2.jpg


exiftool

http://www.sno.phy.queensu.ca/~phil/exiftool/


--
sid
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-21-2014
James Grady wrote:
> I can strip EXIF data from a JPEG with jhead on Linux:
> $ jhead -purejpg photo.jpg
>
> But how can I ADD EXIF information to a JPEG on the
> Linux (Ubuntu) command line?
>
> For example, let's say I have photo1.jpg with EXIF data
> that I want to also transfer to photo2.jpg.
>
> Is there a Linux command to copy EXIF data from photo1
> to photo2?
>
> Something like:
> $ copy-exif photo1.jpg photo2.jpg
>


I believe you can use Image::ExifTool in Perl. I have only used it to
*read* EXIF data. I created a Perl script to dump camera media cards and
rename images to encode camera and date taken since most camera use
limited 8.3 file names. Since thise is a standalone frontend
<https://metacpan.org/pod/exiftool> which purports to write it you could
use that or write your own.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
James Grady
Guest
Posts: n/a
 
      01-21-2014
On Tue, 21 Jan 2014 21:09:03 +0000, sid wrote:

> exiftool


Thanks for that pointer.

I installed exiftool:
$ sudo apt-get install exiftool

Googling, I found this syntax, which seems to do the trick!
$ /usr/bin/exiftool -all= -tagsfromfile src.jpg -exif:all dst.jpg

I just realized I need to change just the date, so, I'll
see if exiftool can make the EXIF date the same as the
file creation date.
 
Reply With Quote
 
James Grady
Guest
Posts: n/a
 
      01-21-2014
On Tue, 21 Jan 2014 16:14:54 -0500, Jonathan N. Little wrote:

> Since thise is a standalone frontend
> <https://metacpan.org/pod/exiftool> which purports to write it you could
> use that or write your own.


Thanks. It looks like Exiftool is pretty powerful:
http://thomer.com/howtos/copy_exif.html

$ exiftool -TagsFromFile a.crw --Orientation a.jpg

And, from this, it looks like I can format the date also:
http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html

$ exiftool -xmp:dateTimeOriginal="2005:10:23 20:06:34.33-05:00" a.jpg

 
Reply With Quote
 
Dirk T. Verbeek
Guest
Posts: n/a
 
      01-22-2014
op 21-01-14 21:05 schreef James Grady:
> I can strip EXIF data from a JPEG with jhead on Linux:
> $ jhead -purejpg photo.jpg
>
> But how can I ADD EXIF information to a JPEG on the
> Linux (Ubuntu) command line?
>
> For example, let's say I have photo1.jpg with EXIF data
> that I want to also transfer to photo2.jpg.
>
> Is there a Linux command to copy EXIF data from photo1
> to photo2?
>
> Something like:
> $ copy-exif photo1.jpg photo2.jpg
>

exiv2 is in the repo's.
 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      01-22-2014
On Tue, 21 Jan 2014 22:08:48 +0000, James Grady wrote:

> On Tue, 21 Jan 2014 16:14:54 -0500, Jonathan N. Little wrote:
>
>> Since thise is a standalone frontend
>> <https://metacpan.org/pod/exiftool> which purports to write it you
>> could use that or write your own.

>
> Thanks. It looks like Exiftool is pretty powerful:
> http://thomer.com/howtos/copy_exif.html
>
> $ exiftool -TagsFromFile a.crw --Orientation a.jpg
>
> And, from this, it looks like I can format the date also:
> http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html
>
> $ exiftool -xmp:dateTimeOriginal="2005:10:23 20:06:34.33-05:00" a.jpg


Exiv2 is also a good tool for exif,IPTC,XMP.
http://www.exiv2.org/index.html

Dave

--
Registered Linux User #444770
Mint 13LTS
 
Reply With Quote
 
croy
Guest
Posts: n/a
 
      01-23-2014
On Tue, 21 Jan 2014 21:05:38 +0000 (UTC), James Grady
<(E-Mail Removed)> wrote:

>I can strip EXIF data from a JPEG with jhead on Linux:
> $ jhead -purejpg photo.jpg
>
>But how can I ADD EXIF information to a JPEG on the
>Linux (Ubuntu) command line?
>
>For example, let's say I have photo1.jpg with EXIF data
>that I want to also transfer to photo2.jpg.
>
>Is there a Linux command to copy EXIF data from photo1
>to photo2?
>
>Something like:
> $ copy-exif photo1.jpg photo2.jpg


Have you looked into the EXIF workings of Irfanview? I'm
not sure that I understand your need, but Irfanview has been
a favorite (and trusted) tool of image-mongers for many
years. You might even find the batch features appealing.

--
croy
 
Reply With Quote
 
nospam
Guest
Posts: n/a
 
      01-23-2014
In article <(E-Mail Removed)>, croy
<(E-Mail Removed)> wrote:

> >I can strip EXIF data from a JPEG with jhead on Linux:
> > $ jhead -purejpg photo.jpg
> >
> >But how can I ADD EXIF information to a JPEG on the
> >Linux (Ubuntu) command line?
> >
> >For example, let's say I have photo1.jpg with EXIF data
> >that I want to also transfer to photo2.jpg.
> >
> >Is there a Linux command to copy EXIF data from photo1
> >to photo2?
> >
> >Something like:
> > $ copy-exif photo1.jpg photo2.jpg

>
> Have you looked into the EXIF workings of Irfanview? I'm
> not sure that I understand your need, but Irfanview has been
> a favorite (and trusted) tool of image-mongers for many
> years. You might even find the batch features appealing.


irfanview is a windows app.

he asked about using the command line in linux.
 
Reply With Quote
 
croy
Guest
Posts: n/a
 
      01-25-2014
On Thu, 23 Jan 2014 16:32:42 -0500, nospam
<(E-Mail Removed)> wrote:


>irfanview is a windows app.
>
>he asked about using the command line in linux.


Ugh--sorry. Back under my rock.

croy
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get JSON values and how to trace sessions?? webmaster@terradon.nl Python 2 04-25-2013 02:12 PM
How to add GPS data to a JPEG file (Exif) PGPS Digital Photography 3 06-10-2007 10:52 AM
Updating EXIF information in jpeg file aurelien Digital Photography 14 09-02-2004 09:11 PM
Add EXIF Tag to JPEG BluDog Digital Photography 6 06-18-2004 09:26 AM
Add EXIF Tag to JPEG BluDog Digital Photography 8 06-15-2004 02:30 PM



Advertisments