Announcement

#1 2024-05-14 18:22:07

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
13

[resolved] Writing EXIF:ImageDescription to the MySQL database pw_images:comment

How can I transfer the EXIF:ImageDescription to the MySQL database piwigo_images:comment instead of the IPTC field:2=120?

So far I have transferred the IPTC Fields:2=120 to the MySQL database piwigo_images:comment.

The ‘Plugin Read Metadata’ shows the difference.
The plugin shows
IPTC Fields:2=120 shows a maximum of 1974 characters. This is also a maximum size defined in the IPTC specification.
EXIF Fields:ImageDescription shows 2934 characters. The specification for EXIF:ImageDescription is much larger. My maximum is 3400 characters.

So far, I have set the following in local/config/config.inc.php

Code:

<?php

Code:

$conf['use_iptc'] = true;

$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'author'          => '2#080',
  'name'            => '2#005',
  'comment'         => '2#120'
  );

$conf['show_exif'] = false;
$conf['show_iptc'] = true;

$conf['show_iptc_mapping'] = array(
  'Title'       => '2#005',
  'Copyright'   => '2#116'
  );

?>

Last edited by Otto_Riehl (2024-05-14 18:24:05)


Description of my installation: Bildarchiv

Offline

 

#2 2024-05-14 20:31:02

erAck
Only trying to help
2015-09-06
2091

Re: [resolved] Writing EXIF:ImageDescription to the MySQL database pw_images:comment

Remove the comment mapping so use_iptc_mapping is

Code:

$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'author'          => '2#080',
  'name'            => '2#005'
  );

and add

Code:

$conf['use_exif'] = true;

$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal',
  'comment'       => 'ImageDescription'
  );

Untested, but should work. However, note that Exif ImageDescription is defined to hold only ASCII characters, other maybe Latin-1 subset characters might work only by chance, and complying software may write the content to the UserComment area instead, which can hold defined encodings ASCII, JIS and Unicode, and undefined PC local encodings (see Exif v2.32 standard), and may not be properly supported when reading plain through PHP exif_read_data() (see docs) but might work with [extension by ddtddt] Read Metadata or [extension by plg] Exiftool Keywords, didn't try.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2024-05-14 21:58:53

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
13

Re: [resolved] Writing EXIF:ImageDescription to the MySQL database pw_images:comment

erAck wrote:

Remove the comment

Many thanks for the tip.

I am on my way. I'll be home on Thursday. Then I will test the suggestion and report the result. Thank you.

Otto


Description of my installation: Bildarchiv

Offline

 

#4 2024-05-16 18:35:42

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
13

Re: [resolved] Writing EXIF:ImageDescription to the MySQL database pw_images:comment

erAck wrote:

Remove

Works wonderfully.
Thank you


Description of my installation: Bildarchiv

Offline

 

#5 2024-05-17 01:46:23

erAck
Only trying to help
2015-09-06
2091

Re: [resolved] Writing EXIF:ImageDescription to the MySQL database pw_images:comment

Glad to have helped, thanks.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

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