Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Coppermine not reading EXIF from Sony or Sanyo Cameras  (Read 3782 times)

0 Members and 1 Guest are viewing this topic.

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Coppermine not reading EXIF from Sony or Sanyo Cameras
« on: May 28, 2013, 11:58:11 pm »

Hi,  I noticed that EXIF data is not being read from either Sony or Sanyo digital cameras.  EXIF data is being read by Ipad2 jpgs' however.  Is this a bug?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #1 on: May 29, 2013, 10:00:01 am »

Please attach some example pictures so we can test it ourselves.
Logged

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #2 on: May 29, 2013, 02:47:33 pm »

It appears that when Coppermine resizes down larger images to the max allowed size then the EXIF data is removed from the resized file.  If you upload a resolution smaller than the max allowed then the EXIF remains in tact.

I have verified that EXIF reading is enabled in PHP.  Also have tried some pictures from an Ipad2 and those EXIF data are read.

Is there a way to keep the EXIF data for large pictures when they are resized???
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #3 on: May 29, 2013, 02:56:31 pm »

I'm not sure if this also applies to ImageMagick, but if you process (resize, rotate, etc.) images with GD2, any meta data is lost. However, as we already read IPTC data before we process images, that should also be possible with EXIF data. In this case, the data is still removed from the image, but it has been already stored in the database at this point. We plan to save the EXIF data before we process images and then write it back afterwards, but there's no progress yet, it's currently just an idea.
Logged

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #4 on: May 29, 2013, 03:22:20 pm »

Hi Andre,

Thank you for the feedback.  Yes, it appears that the only way to keep EXIF data is to set the max width/length resolution in Coppermine config to a larger value than the pictures you are uploading.

I originally set the value to 2048 to conserve disk space, however pictures larger than 2048 are resized and the EXIF is lost.  It has not been my experience that the EXIF data is ever written to the database before the image is resized upon uploading.

It would be fantastic to keep the original EXIF data on the resized pictures.  I have a windows program "BatchPhoto" that allows you to resize images and retain the original EXIF data.  It is just an extra step that I would prefer not to go through.

Most registered users are just uploading the pictures directly from their cameras and those are often very high resolutions.  2048 seems to be more than enough to look at the picture on a monitor though.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #5 on: May 29, 2013, 03:29:55 pm »

You could try to use ImageMagick instead of GD2 as resizing method in Coppermine. As I said, I currently don't know if it will work with ImageMagick, but it's maybe the easiest solution without any coding effort nor extra steps before the upload.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #6 on: May 29, 2013, 03:30:54 pm »

Imagemagik does apparently keep the Exif data but I have not tested it to be sure.

Other packages do sort of get around this by reading the Exif data then write the important merged data to the IPTC-marker. This way most products including Adobe can still read the data.

http://php.net/manual/en/function.iptcembed.php
http://php.net/manual/en/function.iptcparse.php

Logged
It is a mistake to think you can solve any major problems just with potatoes.

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #7 on: May 30, 2013, 02:29:54 am »

I had my host company install imagemagick on the server and will report back if this retains the EXIF data on resize.  Unfortunately, they won't reboot the server until this weekend for me to try it.
Logged

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #8 on: June 10, 2013, 03:15:55 pm »

Hi Guys,

Got Imagemagick installed on the shared server, however have been running into issues.

I have verified all the settings are correct from the FAQ, ie permissions set correctly and absolute path to Imagemagick correctly entered.

This is the specific error when running the debug mode upon uploading a file:

Critical error
The file 'albums/userpics/10001/SANY0282.JPG' can't be inserted in the album

Error executing ImageMagick - Return value: -1

Cmd line :
"C:/ImageMagick/convert" -quality 80 -geometry 2048x1536 "E:/CustomerData/webspaces/webspace_00101714/webapps/Coppermine-1440/htdocs/albums/userpics/10001/SANY0282.JPG" "E:/CustomerData/webspaces/webspace_00101714/webapps/Coppermine-1440/htdocs/albums/userpics/10001/SANY0282.JPG"

The convert program said:

File: E:\CustomerData\webspaces\webspace_00101714\webapps\Coppermine-1440\htdocs\db_input.php - Line: 699


I came across some obscure threads that related to Imagemagick having problems with virtual cores on shared servers.  They recommended using a line of code:

putenv("MAGICK_THREAD_LIMIT=1")

Where would I place this line of code???
Logged

EstebanDime

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #9 on: June 10, 2013, 03:51:19 pm »

Also came across this link that is the exact error I am getting:

http://wentsch.me/2012/07/keep-exif-data-drupal-using-imagemagick-instead-gd
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Coppermine not reading EXIF from Sony or Sanyo Cameras
« Reply #10 on: August 20, 2013, 02:52:08 pm »

Where would I place this line of code???

Try to add it above
Code: [Select]
$output = array();in include/picmgmt.inc.php.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.