PIL question: keeping metadata

Discussion in 'Python' started by Ivan Herman, Jun 29, 2005.

  1. Ivan Herman

    Ivan Herman Guest

    A question on using the PIL library. If I take a jpg file then, say, resize it and save it
    somewhere else, all metadata that is part of the jpg file is lost. This is a pity: digital
    cameras routinely add metainformation, so does, for example, Photoshop.

    Is there any way of keeping this info in PIL? Alternatively, is there a simple image
    processing package that does it?

    Ivan
    Ivan Herman, Jun 29, 2005
    #1
    1. Advertising

  2. > Is there any way of keeping this info in PIL?

    I don't think so... when I investigated in the past, I think I
    discovered that the PIL can't write EXIF data (I might be wrong,
    though, or my information might be outdated).

    > Alternatively, is there a simple image
    > processing package that does it?


    Try jpegtran:
    http://sylvana.net/jpegcrop/jpegtran/

    You might also be interested in jhead:
    http://www.sentex.net/~mwandel/jhead/


    Will.
    Will McCutchen, Jun 29, 2005
    #2
    1. Advertising

  3. "Will McCutchen" <> writes:

    >> Is there any way of keeping this info in PIL?

    >
    > I don't think so... when I investigated in the past, I think I
    > discovered that the PIL can't write EXIF data (I might be wrong,
    > though, or my information might be outdated).


    There is this:

    http://mail.python.org/pipermail/image-sig/2004-September/002931.html

    --
    Ilpo Nyyssönen # biny # /* :) */
    Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=, Jul 3, 2005
    #3
  4. Ivan Herman

    Jarek Zgoda Guest

    Ilpo Nyyssönen napisa³(a):

    >>>Is there any way of keeping this info in PIL?

    >>
    >>I don't think so... when I investigated in the past, I think I
    >>discovered that the PIL can't write EXIF data (I might be wrong,
    >>though, or my information might be outdated).

    >
    > There is this:
    >
    > http://mail.python.org/pipermail/image-sig/2004-September/002931.html


    It would be nice to have general EXIF module, the one that is able to
    read and write image metadata. Consider such case: you want to rotate
    some image from digital camera, but don't want to remove completely the
    whole EXIF metadata -- modifying one field would be sufficient.

    --
    Jarek Zgoda
    http://jpa.berlios.de/
    Jarek Zgoda, Jul 3, 2005
    #4
    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. Brett Selleck

    Schema Metadata not a Metadata Schema

    Brett Selleck, Sep 4, 2003, in forum: XML
    Replies:
    1
    Views:
    397
    Andy Dingley
    Sep 4, 2003
  2. Replies:
    15
    Views:
    450
    Dave Thompson
    Mar 27, 2006
  3. Sverre
    Replies:
    2
    Views:
    3,516
    Sverre
    Dec 17, 2009
  4. Replies:
    0
    Views:
    355
  5. Jose Trevino
    Replies:
    2
    Views:
    156
    Pete Forman
    Jan 10, 2013
Loading...

Share This Page