How to ADD EXIF information to a JPEG photo

Discussion in 'Digital Photography' started by James Grady, Jan 21, 2014.

  1. James Grady

    James Grady Guest

    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
    James Grady, Jan 21, 2014
    #1
    1. Advertising

  2. James Grady

    sid Guest

    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
    sid, Jan 21, 2014
    #2
    1. Advertising

  3. 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
    Jonathan N. Little, Jan 21, 2014
    #3
  4. James Grady

    James Grady Guest

    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.
    James Grady, Jan 21, 2014
    #4
  5. James Grady

    James Grady Guest

    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
    James Grady, Jan 21, 2014
    #5
  6. 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.
    Dirk T. Verbeek, Jan 22, 2014
    #6
  7. James Grady

    Dave Guest

    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
    Dave, Jan 22, 2014
    #7
  8. James Grady

    croy Guest

    On Tue, 21 Jan 2014 21:05:38 +0000 (UTC), 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


    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
    croy, Jan 23, 2014
    #8
  9. James Grady

    nospam Guest

    In article <>, croy
    <> 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.
    nospam, Jan 23, 2014
    #9
  10. James Grady

    croy Guest

    On Thu, 23 Jan 2014 16:32:42 -0500, nospam
    <> wrote:


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


    Ugh--sorry. Back under my rock.

    croy
    croy, Jan 25, 2014
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Morgan Ohlson

    IPTC, Exif, Jpeg-comment - are they reliable?

    Morgan Ohlson, Dec 13, 2003, in forum: Digital Photography
    Replies:
    2
    Views:
    656
    Morgan Ohlson
    Dec 14, 2003
  2. BluDog

    Add EXIF Tag to JPEG

    BluDog, Jun 15, 2004, in forum: Digital Photography
    Replies:
    6
    Views:
    12,365
    Keith Sheppard
    Jun 18, 2004
  3. BluDog

    Add EXIF Tag to JPEG

    BluDog, Jun 15, 2004, in forum: Digital Photography
    Replies:
    8
    Views:
    8,907
    mphanke
    Jun 15, 2004
  4. aurelien

    Updating EXIF information in jpeg file

    aurelien, Aug 31, 2004, in forum: Digital Photography
    Replies:
    14
    Views:
    1,299
    =?ISO-8859-1?Q?BenOne=A9?=
    Sep 2, 2004
  5. PGPS

    How to add GPS data to a JPEG file (Exif)

    PGPS, Jun 8, 2007, in forum: Digital Photography
    Replies:
    3
    Views:
    2,486
    Ron Hunter
    Jun 10, 2007
Loading...

Share This Page