I am using the Exif View 2.9.a plug-in with a gallery running:
Piwigo 2.10.0
Operating system: Linux
PHP: 7.3.10 (Show info) [2019-10-11 19:58:35]
MySQL: 5.5.5-10.2.27-MariaDB-cll-lve [2019-10-11 15:58:35]
Graphics Library: GD bundled (2.1.0 compatible)
When I click the "Show File Metadata" button, I get this error message on some, but not all photos:
Notice: A non well formed numeric value encountered in /home/gallery/public_html/bokeh/plugins/exif_view/main.inc.php on line 152
Notice: A non well formed numeric value encountered in /home/gallery/public_html/bokeh/plugins/exif_view/main.inc.php on line 158
Notice: A non well formed numeric value encountered in /home/gallery/public_html/bokeh/plugins/exif_view/main.inc.php on line 164
Notice: A non well formed numeric value encountered in /home/gallery/public_html/bokeh/plugins/exif_view/main.inc.php on line 172
The line numbers in the above error correspond to flash values in bold type below.
// flash
if (!(strpos($key, 'Flash') === FALSE)) {
// 1st bit is fired/did not fired
if (($value & 1) > 0) {
$retValue = l10n('yes');
} else {
$retValue = l10n('no');
}
// 2nd+3rd bits are return light mode
$returnLight = $value & (3 << 1);
switch ($returnLight) {
case 2 << 1: $retValue .= ', '.l10n('exif_value_flash_return_light_not_detected');break;
case 3 << 1: $retValue .= ', '.l10n('exif_value_flash_return_light_detected');break;
}
// 4th+5th bits are mode
$mode = $value & (3 << 3);
switch ($mode) {
case 0: $retValue .= ', '.l10n('exif_value_flash_mode').': '.l10n('exif_value_flash_mode_unknown');break;
case 1 << 3: $retValue .= ', '.l10n('exif_value_flash_mode').': '.l10n('exif_value_flash_mode_compulsory');break;
case 2 << 3: $retValue .= ', '.l10n('exif_value_flash_mode').': '.l10n('exif_value_flash_mode_supress');break;
case 3 << 3: $retValue .= ', '.l10n('exif_value_flash_mode').': '.l10n('exif_value_flash_mode_auto');break;
}
// 6th bit is red eye function
if (($value & (1 << 6)) > 0) {
$retValue .= ', '.l10n('exif_value_red_eye');
}
return $retValue;
}
I have not checked every photo, but it seems like the exif data in photos taken with a Sony DSC-RX100 are the problem. Other than disabling Exif View, is there a way to correct this problem?
Offline
try installing the imagemagick php graphics library.
Also, I think there have also been issues with certain GPS metadata causing problems. You can search the forum for that.
Offline
I use GD because the thumbnails load slow, or not at all when I use imagemagick.
I did go into the LocalFiles Editor and changed $conf['graphics_library'] = 'gd'; to $conf['graphics_library'] = 'imagick'; When I did that, the error message still appeared, and the image loading problem came back.
I will search the forum for meta data issues as you suggested. From the error messages, it seems like only the camera flash metadata is causing the problem, so rather than fighting it, I will tell Piwigo not to display any info about the camera's flash unit.
Thanks for the ideas on this.
Offline
Run into this with old photos/images where exif is not present or minimized
To fix change line 150 in Exif's main.inc.php as this
if (is_numeric($value) && (!(strpos($key, 'Flash') === FALSE))) {
this will safe wrap the internal checks of $value where it will otherwise fail in higher versions of PHP
Last edited by Serge D (2019-11-15 05:28:55)
Offline
Serge D - thank you very much for this solution. I had many photos that were taken with the Sony DSC-RX100, the camera that produced the EXIF data that the Exif View plug-in could not display. This will be a big help. Thanks again.
Offline
kc27 & Serge D - also thanks!
I was having this annoying problem for a while until I figured out it had to do with images shot with the Sony DSC-RX100
Offline
Still valid solution for Piwigo 11.5.0. Thank you!
Offline
I still haven't found where this plugin displays the information? I installed it, but everything remains the same. I do not understand where to look for it?
Piwigo 13.8.0
Offline
When viewing an individual image on my Piwigo installations, EXIF info will display if you click on the information button.
Last edited by kc27 (2023-07-08 15:30:46)
Offline
kc27 wrote:
When viewing an individual image on my Piwigo installations, EXIF info will display if you click on the information button.
Thank you for your reply.
I don't have an info button. And I disabled the "show meta data" button because I installed the "always show meta data" plugin. And now the page only displays images:
Make
FUJIFILM
Model
X-T5
DateTimeOriginal
2023:07:07 19:34:24
ApertureFNumber
f/1.6
And that's it. That's without the "Exif View" plugin. When I install "Exif View" nothing changes.
Offline