Announcement

#1 2015-10-18 20:26:18

TheDoc
Member
Munich / Germany
2015-10-18
173

Issues in Exif parsing

Hi,

I have observed a few issues with Exif parsing & showing. Sorry, if that has already been discussed previously but I didn't find anything...

- other progs (e.g. ExitToolGUI) are showing the exif info correctly without error messages

- latitude in table images is "-99.999999" for all images; longitude seems to be fine, e.g. "0.184099"

- local config is

$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'ISOSpeedRatings',
  'FocalLength',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  );

- Values seem to be "shifted" in piwigo as compered to exiftool, e.g. "Make" shows the value from "Software" and so on (see screenshots)

- Error message when viewing pictures (not always): Warning: strip_tags() expects parameter 1 to be string, array given in /homepages/33/d23615136/htdocs/piwigo/include/functions_metadata.inc.php on line 205

Any tips?

Thanks,
Thomas

Piwigo version:
PHP version: 2.74
MySQL version: 5.5.30
Piwigo URL: http://www.feuster.com/piwigo

Last edited by TheDoc (2015-10-18 20:27:35)

Offline

 

#2 2015-10-23 23:20:18

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issues in Exif parsing

Bump :-)

I have found a discussion about how exif makernotes can break php's exif_read_data:

http://u88.n24.queensu.ca/exiftool/foru … 8ktnjfsqi7

So I'll try the solution from there.

In case it doesn't work: How are lat and lon calculated from the exif values? Are they simply

1) hours + minutes/60  +seconds/3600
2) sign based on N/S and E/W

or something more sophisticated?

Thanks,
Thomas

Offline

 

#3 2015-10-23 23:34:03

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Issues in Exif parsing

TheDoc wrote:

In case it doesn't work: How are lat and lon calculated from the exif values? Are they simply

1) hours + minutes/60  +seconds/3600
2) sign based on N/S and E/W

or something more sophisticated?

[Github] Piwigo file include/functions_metadata.inc.php@L213-L239

Offline

 

#4 2015-10-24 17:32:18

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issues in Exif parsing

Would it be possible to replace the php exif function by something that actually works????????

- Removed makernotes with exiftool: 17 of 22 images now OK

- Removing xmp, makernotes, iptc with exiftool: piwigo hangs when trying to resync with only exif block

- Remaining images don't have makernotes or xmp - so I would need to check each attribute to find the one that breaks php???

Wouldn't it be possible to switch to exiftool and retire the php function? Since I can't code in php I could only offer my support as tester...

Offline

 

#5 2015-10-25 02:50:09

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: Issues in Exif parsing

This would be nice... so much metadata is missing as a result of using the php function...

Does anyone know why the advancedmetadata plugin is not compatible anymore?

Wonder how hard it would be to intercept the exif reading and replace it with exiftool or something?

Offline

 

#6 2015-10-25 08:52:52

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: Issues in Exif parsing

Using exiftool would be nice BUT it would also means that many hosting won't be compatible: exiftool is not installed everywhere :-/

Offline

 

#7 2015-10-25 10:23:51

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Issues in Exif parsing

Offline

 

#8 2015-10-25 12:04:46

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issues in Exif parsing

I'm not sure why depending on exiftool would be such an issue? I know a view other pieces of (commercial) software that do so... AND I think that once a perfectly fine, well documented, well maintained piece of software exists we shouldn't try to re-invent the wheel ourselves.

There was at least one attempt so far to use exiftool out of php: https://github.com/romainneutron/PHPExiftool - so it shouldn't be an impossible task.

Last edited by TheDoc (2015-10-25 12:05:19)

Offline

 

#9 2015-10-25 12:10:39

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Issues in Exif parsing

exactly what plg said: exiftool is not available everywhere, actually it's almost never available on shared hosts

Offline

 

#10 2015-10-25 12:22:04

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issues in Exif parsing

For once I - as a simple windows user - am better off :-) No install required, simply ship the exiftool.exe with your application...

Last edited by TheDoc (2015-10-25 12:22:50)

Offline

 

#11 2015-10-25 14:17:42

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: Issues in Exif parsing

Or simply make it an option if exiftool is available, then allow piwigo to use it instead...

(This is the behavior of many gallery type software I've used previously)

Offline

 

#12 2015-10-25 16:06:44

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issues in Exif parsing

+1 for that idea

Offline

 

#13 2015-10-25 16:20:36

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Issues in Exif parsing

So double the developement ?

I think we will stick with one and only one library.

Offline

 

#14 2015-10-25 17:32:49

jnashpiwigo
Piwigo Team
2014-10-21
254

Re: Issues in Exif parsing

mistic100 wrote:

So double the developement ?

I think we will stick with one and only one library.

That's too bad.   Do you think the capabilities of hooking this up via an extension are possible?  If you believe that the extension capabilities are good enough to do so, I think that would be a via alternative then.

-note- I've also hacked in the exiftool capability in to the functions_metadata.inc.php pretty easily.  It was fairly easy with about 10 lines of code changes (mostly because I'm not a programmer!). So, from what I could gather, it's not that big of challenge.

Last edited by jnashpiwigo (2015-10-25 19:20:24)

Offline

 

#15 2015-10-25 17:36:56

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Issues in Exif parsing

What is too bad ? seriously I don't understand the whole point here....

I said in my ticket on Github (did you read it ?) that I would like to use PEL, which seems to do everything.
So what's the problem ?

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact