coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: banono on June 22, 2004, 03:16:29 AM

Title: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: banono on June 22, 2004, 03:16:29 AM
Hi there!

I'm running CPG 1.3 stable. EXIF is not enabled in my server's PHP compilation, thus I rely on version 1.3's ability to read EXIF data from my pics. My problem is that the EXIF info on each image lacks two things: Aperture and ISO.

Below is a snippet from my displayimage.php file:

if (isset($exif) && is_array($exif)) {
       if (isset($exif['Camera'])) $info[$lang_picinfo['Camera']] = $exif['Camera'];
       if (isset($exif['DateTaken'])) $info[$lang_picinfo['Date taken']] = $exif['DateTaken'];
       if (isset($exif['Aperture'])) $info[$lang_picinfo['Aperture']] = $exif['Aperture'];
   if (isset($exif['ISO'])) $info[$lang_picinfo['ISO']] = $exif['ISO'];   
       if (isset($exif['ExposureTime'])) $info[$lang_picinfo['Exposure time']] = $exif['ExposureTime'];
       if (isset($exif['FocalLength'])) $info[$lang_picinfo['Focal length']] = $exif['FocalLength'];
       if (@strlen(trim($exif['Comment'])) > 0 ) {
               $info[$lang_picinfo['Comment']] = trim($exif['Comment']);
       }
   }

But the file info display only gives me the ff data (see attached file).


Can anyone help me display the Aperture and ISO settings?

Thank you very much, God bless!

[attachment deleted by admin]
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Tarique Sani on June 22, 2004, 04:22:17 AM
Search the board for EXIF and ISO I have posted a hack, also please post a link to a sample picture - Aperture should be displayed by default....
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: banono on June 22, 2004, 05:11:13 AM
Thanks for your reply. I have found this thread on EXIF and ISO:

http://forum.coppermine-gallery.net/index.php?topic=5572.0

I did as you said:

1) "Open file lang/english.php (or your fav language) to the lang_picinfo array add   'ISO'=>'ISO', " - Done
2) "Open file include/exif_php.inc.php, after lines ...." - I use version 1.3 and no EXIF feature compiled in my server's PHP - I did not bother doing this. I found though exifReader.inc.php - should I edit this?
3) "Open file displayimage.php  after line " - it was already there when I opened the file...

Still no aperture and no exif. Link to sample is http://nonoandtuna.felipe.ph/gallery/thumbnails.php?album=11
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: banono on June 22, 2004, 05:24:31 AM
I don't know what I did, now it works! http://nonoandtuna.felipe.ph/gallery/displayimage.php?album=2&pos=4

How do I empty the exif tables for all my images and then re-read them all?

Thanks!!! God bless you!!!
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Tarique Sani on June 22, 2004, 06:41:33 AM
Quote from: banono on June 22, 2004, 05:24:31 AM
How do I empty the exif tables for all my images and then re-read them all?
Either use a tool like phpMyAdmin and empty the exif table (it will be named something like cpg130_exif) or you can edit the pictures tick the checkbox re-read EXIF information and it will be re-read when you update...
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: banono on June 22, 2004, 07:21:27 AM
I tried ticking the "re-read EXIF Info" box on the image property box, but it does not give me the full-exif. I will resort to emptying the table using myPhpAdmin. How do I mass re-read the exif info for ALL images? Or does it happen automatically after I empty the table?
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Tarique Sani on June 22, 2004, 07:41:49 AM
Quote from: banono on June 22, 2004, 07:21:27 AM
Or does it happen automatically after I empty the table?
The table will be filled for a given picture the first time the picture is view - so just empty the table and leave it at that....
Title: Re: Canon EXIF Data - Missing Aperture & ISO Info
Post by: banono on June 22, 2004, 02:40:51 PM
Thank you very much!

God bless!
Title: Re: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: khayman on June 22, 2004, 11:02:03 PM
Is there anything special I have to do? I look in the cpg130_exif folder and in the exifData column I see 'a:0:{}' - I've wiped the table, and yes the exif information gets rewritten when the image is viewed - but nothing displays as exif information when the image is viewed. I've attached an image of my image properties (in windows). And yup I have Read EXIF data in JPEG enabled.

[UPDATE] Weirdness, reuploaded the images (been playing with some watermarking stuff) and the EXIF info displays.

Cheers,
~jb

[attachment deleted by admin]
Title: Re: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Tarique Sani on June 23, 2004, 03:52:10 AM
Nice to know it works - just a note to everyone, there are more softwares out there which destroy the EXIF data than preserve it (it is slowly changing though) Sof if you edit your picture in any such software before uploading the EXIF info is lost :(
Title: Re: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Joachim Müller on June 23, 2004, 05:11:36 AM
For Windows users, I greatly recommend "Exifer (http://www.friedemann-schmidt.com/software/exifer/)": with it, you can back up your EXIF/IPTC data - if the data gets lost by maniulation of the pic with an editor that doesn't take EXIF into account, you can easily restore the previously saved EXIF info. Exifer comes as "CardWare" (you only have to write a postcard to the author), so it's more or less free.

Features:GauGau


Title: Re: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Tarique Sani on June 23, 2004, 07:16:42 AM
From the EXIFER website in the section known problems
" There is some software (e.g. Thumbs+, PhotoThumb, PHP functions) which doesn't recognize the EXIF data after modifying with Exifer anymore."

Does this affect CPG (inturn the EXIFrw class)?
Title: Re: [Solved]: Canon EXIF Data - Missing Aperture & ISO Info
Post by: Joachim Müller on June 23, 2004, 09:29:27 AM
no, as afar as I can tell Coppermine works fine with the EXFIF data from Exifer, that's why I recommend the software - I use it myself - see my private homepage, e.g. http://gaugau.de/galerie/displayimage.php?pos=-6565
I use Corel Photo Paint 9 (yeah, I know, there is better software available, but I paid for it and I don't see the point in using Adobe Photoshop just to touch up some snapshots) that removes all EXIF data from pics, so I re-add the EXIF backup data created by Exifer and upload to coppermine.

GauGau