Annonce

Écrire une réponse

Veuillez écrire votre message et l'envoyer

Cliquez dans la zone sombre de l'image pour envoyer votre message.

Retour

Résumé de la discussion (messages les plus récents en premier)

quixote
2008-12-15 05:50:06

I just found this thread: http://forum.phpwebgallery.net/viewtopi … 70&p=1 where I found how to get at the metadata.  Slowly, I learn! :-)
part of the metadata.php output:

Code:

no IPTC information

EXIF Fields in sample.jpg

Array
(
    [FileName] => sample.jpg
    [FileDateTime] => 1229315052
    [FileSize] => 182652
    [FileType] => 2
    [MimeType] => image/jpeg
    [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, COMMENT, EXIF, INTEROP, MAKERNOTE
    [COMPUTED] => Array
        (
            [html] => width="800" height="600"
            [Height] => 600
            [Width] => 800
            [IsColor] => 1
            [ByteOrderMotorola] => 0
            [CCDWidth] => 1mm
            [ApertureFNumber] => f/3.5
            [UserComment] => 
            [UserCommentEncoding] => UNDEFINED
            [Thumbnail.FileType] => 2
            [Thumbnail.MimeType] => image/jpeg
        )

    [Make] => Canon
    [Model] => Canon PowerShot G9
    [Orientation] => 1
    [XResolution] => 124/1
    [YResolution] => 124/1
    [ResolutionUnit] => 2
    [DateTime] => 2008:12:12 21:27:06
    [YCbCrPositioning] => 1
    [Exif_IFD_Pointer] => 184
    [THUMBNAIL] => Array
        (
            [Compression] => 6
            [XResolution] => 180/1
            [YResolution] => 180/1
            [ResolutionUnit] => 2
            [JPEGInterchangeFormat] => 3508
            [JPEGInterchangeFormatLength] => 2935
        )

    [COMMENT] => Array
        (
            [0] => Putting it back together, and trying to figure out where the two leftover screws should have gone.
        )

So, apparently it is called "comment" not caption.  Or UserComment?  Or COMMENT?  Or what?  I'm confused.  I tried "Comment" and "UserComment" instead of "Caption" in the show-exif-fields part.  No comment-related field shows up in the Synchronize window, however, so I'm not doing that right.

When I tried adding to use-exif-mapping:

Code:

$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal',
  'caption' => 'UserComment'                               //changed.  line added. pwg blew up
  );

The gallery blew up rather spectacularly.  (At that point the show_exif_fields did have " 'UserComment',").  So, obviously, that line is necessary for something to happen.  It just needs to be right ... :D

quixote
2008-12-15 04:58:46

Postscript: my hosting service does have exif support enabled in php.  Output of exif section of phpinfo:
exif
EXIF Support     enabled
EXIF Version     1.4 $Id: exif.c,v 1.173.2.5.2.25 2008/03/12 17:33:14 iliaa Exp $
Supported EXIF Version     0220
Supported filetypes     JPEG,TIFF

quixote
2008-12-15 04:42:58

Sorry to be barging in with English in a French thread.  I can understand French, but you wouldn't want to read my attempts at writing it!  :-(

I've been struggling with the caption issue and getting nowhere.  I must be doing something stupid wrong, and I hope one of you can tell me what it is.

This is the metadata part of my config_local.inc.php (with commented lines mostly removed):

Code:

// +-----------------------------------------------------------------------+
// |                               metadata                                |
// +-----------------------------------------------------------------------+

// show_iptc: Show IPTC metadata on picture.php if asked by user
//                        -------------------------not using IPTC -------------------
$conf['show_iptc'] = false;

$conf['show_iptc_mapping'] = array(
  'iptc_keywords'        => '2#025',
  'iptc_caption_writer'  => '2#122',
  'iptc_byline_title'    => '2#085',
  'iptc_caption'         => '2#120'
  );

$conf['use_iptc'] = false;

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

// show_exif: Show EXIF metadata on picture.php (table or line presentation
// avalaible)                         ---------------using EXIF-----------------------
$conf['show_exif'] = true;  

$conf['show_exif_fields'] = array(
  'Caption',
//  'Make',                               // changed.  these 3 commented out, 'Caption' added
//  'Model',
  'DateTimeOriginal',
//  'COMPUTED;ApertureFNumber'
  );

// use_exif: Use EXIF data during database synchronization with files
// metadata
$conf['use_exif'] = true;

// use_exif_mapping: same behaviour as use_iptc_mapping
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal'
  );

I'm not sure what the database name for the "Caption" field is.  It says "Caption" in digikam, but who knows.  I have a feeling I should be adding something in the last "use-exif_mapping" section, but I don't know what. Also, even though DateTimeOriginal is not commented out, it also does not appear.  It says "NA" at the line for "Creation Date" under the picture.

Would I maybe be better off setting IPTC to "true" and trying to do this via IPTC metadata?

And is there any way to get the caption to appear ABOVE the picture rather than below?

Thanks for any help you can give me!

VDigital
2008-09-13 18:36:06

$conf['show_exif'] = false;
=>  $conf['show_exif_fields'] est inutile

De même,
$conf['use_exif'] = false;
=> $conf['use_exif_mapping'] ?


Mais avant de coder $conf['use_exif'] = false; Je vous invite à réfléchir 2mn.
Pour ceux qui débutent uniquement, qui nous pourrait expliquer avec ses mots à quoi sert de coder:

$conf['use_exif'] = true;
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal'
  );

Pour info, ceux qui ne comprennent pas peuvent passer à coté de quelque chose d'important.

8-)

nedimimre
2008-09-13 14:45:02

// +-----------------------------------------------------------------------+
// |                               metadata                                |
// +-----------------------------------------------------------------------+

// show_iptc: Show IPTC metadata on picture.php if asked by user
$conf['show_iptc'] = true;

// show_iptc_mapping : is used for showing IPTC metadata on picture.php
// page. For each key of the array, you need to have the same key in the
// $lang array. For example, if my first key is 'iptc_keywords' (associated
// to '2#025') then you need to have $lang['iptc_keywords'] set in
// language/$user['language']/common.lang.php. If you don't have the lang
// var set, the key will be simply displayed
//
// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
  'Légende'  => '2#120',
  'Ville'    => '2#090',
  'Pays'         => '2#101',
  'Photographe'        => '2#080'
  );

// use_iptc: Use IPTC data during database synchronization with files
// metadata
$conf['use_iptc'] = true;

// use_iptc_mapping : in which IPTC fields will PhpWebGallery find image
// information ? This setting is used during metadata synchronisation. It
// associates a phpwebgallery_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'caption'          => '2#120',
  'city'            => '2#090',
  'country'         => '2#101',
  'photographer'              => '2#080'
  );

// show_exif: Show EXIF metadata on picture.php (table or line presentation
// avalaible)
$conf['show_exif'] = false;

// show_exif_fields : in EXIF fields, you can choose to display fields in
// sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add
// 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields']
//
// The key displayed in picture.php will be $lang['exif_field_Make'] for
// example and if it exists. For compound fields, only take into account the
// last part : for key 'COMPUTED;ApertureFNumber', you need
// $lang['exif_field_ApertureFNumber']
//
// for PHP version newer than 4.1.2 :
// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
//
$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'DateTimeOriginal',
  'COMPUTED;ApertureFNumber'
  );

// use_exif: Use EXIF data during database synchronization with files
// metadata
$conf['use_exif'] = false;

// use_exif_mapping: same behaviour as use_iptc_mapping
$conf['use_exif_mapping'] = array(
  'date_creation' => 'DateTimeOriginal'
  );

Et ouala

ddtddt
2008-09-13 14:23:02

nedimimre a écrit:

(J'ai peut être fait une erreur de Syntaxe quelque part....)

Si ca vous parle......

Pour pouvoir te répondre à cette question il serrai préférable que tu mettes l'intégralité du fichier :)

nedimimre
2008-09-13 14:18:06

Tout bien vérifié c'est moi qui n'ai pas recopié l'intégralité du code à ce niveau là.
Dans le fichier config_local.inc.php tout va bien....

nedimimre
2008-09-13 14:16:12

oui mais je n'ai pas copié l'intégralité de la séquence,
Je vérifie tout de suite

ddtddt
2008-09-13 14:11:02

nedimimre a écrit:

$conf['show_exif_fields'] = array(

Je dirais bien qu'il manque quelque chose à la fin de la ligne ?

nedimimre
2008-09-13 13:59:28

Bon j'ai réussi à force de petites magouilles à gérer mon affichage, j'ai enfin viré l'EXIF et remplacé par l'IPTC.
Par contre j'ai toujours ce même message au moment de la synchronisation des méta données.... (J'ai peut être fait une erreur de Syntaxe quelque part....)

Si ca vous parle......

nedimimre
2008-09-13 11:36:53

Bon allez je relance le dossier sur ce fil....

Voici donc après quelques recherches et tentatives ce que j'obtiens à la synchro des Métadonnées...
   

INSERT INTO phpwebgallery_images_1221298592261901
    (id,filesize,width,height,high_filesize,caption,city,country,photographer,date_metadata_update)
     VALUES('30','91','387','500',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim IMRE','2008-09-13 11:36:32')
    , ('29','133','500','329',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim IMRE','2008-09-13 11:36:32')
    , ('3','108','500','332',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim IMRE','2008-09-13 11:36:32')
    , ('2','56','500','332',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim

(J'ai effacé quelques lignes pour éviter une surcharge.....)

, ('78','135','500','335',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim IMRE','2008-09-13 11:36:32')
    , ('79','98','500','374',NULL,'OpŽration Chebec, manoeuvre Franco Marocaine simulant une intervention de sauvetage ˆ la suite d\'un sŽ•sme','Marseille','France','Nedim IMRE','2008-09-13 11:36:32')
;
[mysql error 1054] Champ 'caption' inconnu dans field list

  UPDATE phpwebgallery_images AS t1, phpwebgallery_images_1221298592261901 AS t2
    SET t1.filesize = t2.filesize
    , t1.width = t2.width
    , t1.height = t2.height
    , t1.high_filesize = t2.high_filesize
    , t1.caption = t2.caption
    , t1.city = t2.city
    , t1.country = t2.country
    , t1.photographer = t2.photographer
    , t1.date_metadata_update = t2.date_metadata_update
    WHERE t1.id = t2.id
  ;
[mysql error 1054] Champ 't1.caption' inconnu dans field list

De plus lorsque je clique sur le bouton pour afficher les IPTC rien ne se passe.

Pour info, au travaers de Local Files Editor j'ai passé les lignes concernées à :

$conf['show_iptc'] = false;

puis

$conf['show_iptc_mapping'] = array(
  'iptc_caption'  => '2#120',
  'iptc_city'    => '2#090',
  'iptc_country'         => '2#101',
  'iptc_photographer'        => '2#080'

Ensuite

$conf['use_iptc'] = true;

Suivit de

$conf['use_iptc_mapping'] = array(
  'caption'          => '2#120',
  'city'            => '2#090',
  'country'         => '2#101',
  'photographer'              => '2#080'

$conf['show_exif'] = false;

$conf['show_exif_fields'] = array(

$conf['use_exif'] = false;

Voilà j'espère que je présente bien le problème...

Si besoin je peux donner un accès à la galerie (qui est en 1.7.2...)

VDigital
2008-07-31 23:12:45

Merci, Pierrick...
8-)

LTBG a écrit:

pour VDigital

Bonsoir
Petite remarque

la modif que tu as faites pour limiter le champ IPTC à la largeur de la photo ne fonctionne pas en mode diaporama. Les petites vignettes gauche droite ne s'affichent pas non plus

@ +

"Tu me rappelles que...": Je crois que j'avais deviné depuis le 4 juillet dernier.
Par contre, tu sais très bien faire fonctionner tes cellules grises, non?

Certes "Aucune question n'est stupide, ...", de qui que ce soit d'ailleurs, cependant obliger quelqu'un après quelques questions, de bien vouloir formuler des réponses de temps en temps, n'est pas forcément dépourvu de bon sens.

Alors revenons à nos questions, effectivement il n'y a aucune miniature de navigation en mode diaporama, pourquoi à ton avis?
Merci. Je suis convaincu que tu as une idée de la réponse, déjà.
On en reparlera.

8-)

LTBG
2008-07-31 22:56:23

merci à Zorglub pour son témoignage

@ +

plg
2008-07-31 22:12:35

LTBG a écrit:

Je te rappelle que je ne suis pas informaticien ni développeur !

Moi ça m'intéresse justement ce genre de profil. C'est un reproche qu'on fait parfois à PhpWebGallery : difficile d'accès pour un non informaticien. Dans l'équipe, on est effectivement majoritairement des informaticiens et certaines difficultés nous échappent. Nous ouvrir les yeux sur ces points faibles nous aident à choisir quoi améliorer.

LTBG a écrit:

PWG est indigeste et impossible à utiliser pour un novice sans l'aide de spécialiste !

Un poil exagéré je pense :-) PWG est sans doute difficile à personnaliser à l'exactitude sans l'aide d'un spécialiste. Mais c'est possible quand même, et ça c'est important à noter. Possible parce qu'il y a une communauté prête à aider et à conseiller. Possible parce que le socle technique le permet.

On notera que des milliers de galeries PWG tournent, sans l'aide d'aucun spécialiste. Sans doute parce que les utilisateurs prennent juste "l'existant".

LTBG a écrit:

Alors désolé si je pose des questions qui te semblent stupides !

Aucune question n'est stupide, surtout pas celles venant d'un utilisateur, un photographe pro qui plus est.

plg
2008-07-31 21:55:01

Oulà, dérapage (des 2 parties selon moi). On reprend ses esprits, on respire tranquillement, tout va bien :-)

Pied de page des forums

Propulsé par FluxBB

github twitter newsletter Faire un don Piwigo.org © 2002-2024 · Contact