SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I've lost all my EXIF information ... is there anyway i can get it back?

    Hi

    I have a photo gallery with loads of pictures..i want to get the time that a photo was taken from my exif information; however, to my dismay, i see that in the process of uploading, resizing, watermarking and copying files i have lost the bulk of my useful exif information and am only left with:
    Code:
    (
        [FileName] => photo-s.jpg
        [FileDateTime] => 1179384110
        [FileSize] => 160654
        [FileType] => 2
        [MimeType] => image/jpeg
        [SectionsFound] => COMMENT
        [COMPUTED] => Array
            (
                [html] => width="640" height="480"
                [Height] => 480
                [Width] => 640
                [IsColor] => 1
            )
    
        [COMMENT] => Array
            (
                [0] => CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100
    
            )
    
    )
    I got a little excited when i saw that FileDateTime was kept..but less so when i saw that that is just the modification of the file..which is incorrect.

    Going forward i can be more clever about storing my exif information..however, is there any way find that missing data on my old files? or is it lost forever?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    exif info

    It seems that the PHP image functions may have not written the exif info to the new files. You may want to check out the "PHP Exif Library" (PEL) at sourceforge.

  3. #3
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah; the gd library in particular seems to strip our almost all the information leaving us only with the information above...and their annoying comment!

    But that said, Java also tends to strip out quite a lot of the information...so it would appear that most file manipulations below the OS level cause one to loose information. I think what i am going to do is just store the exif information i need into the database as soon as possible..

    Thanks for your help

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,408
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    If you have ImageMagick give that a go as it saves the EXIF data as long as you use resize and not thumbnail.

    Some details from one of my uploaded images.

    ExifateTime: 2006:07:29 16:10:30
    Exif:Make: FUJIFILM
    Exif:Model: FinePix E550
    Exif:Orientation: 1
    Exif:ResolutionUnit: 2
    Exif:Software: Digital Camera FinePix E550 Ver1.00
    Exif:XResolution: 72/1
    Exif:YCbCrPositioning: 2
    Exif:YResolution: 72/1

  5. #5
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Rubble.

    Thanks for the advice. I think i must take the time to actually get round to learning imageMagick

    Looking at my upload process its actually loosing the information right at the beginning with the uploader applet. Think if i can try and extract and save the exif information seperately right at the start it will prob be the best thing..

  6. #6
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,408
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    I think you may have a problem toasti; as I understand it you will not be able to access any of the image information with php until the image is on the server somewhere. By then it will be to late ?

    Out of interest I am rebuilding the ImageMagick part of my site with a lot more information not just the examples I had before. I am currently trying to incorperate my current examples into the new layout so as not to upset any links to them.
    I do not want to post a link here yet but if you are interested PM me and I will send you a tempory one.

    I find you can do so much more with ImageMagick, its a pitty I do not have a need for most of them.

  7. #7
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Or you could re-upload all of the images, but not change any information apart from the modify time.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  8. #8
    SitePoint Guru toasti's Avatar
    Join Date
    Feb 2004
    Location
    Grahamstown
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey guys.
    I think you may have a problem toasti; as I understand it you will not be able to access any of the image information with php until the image is on the server somewhere. By then it will be to late ?
    Nah. I can access the exif info with my uploader applet. Since all i am looking for is the dateTime, i am thinking of actually just using this as part of the name of the file when i upload it ...

    I would def be interested in learning imageMagick. I don't think the code will be a problem - its more the installation that is an issue...

    Will pm u for a link ...

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •