• Resolved marcomadruga

    (@marcomadruga)


    I’m trying to use the comments on the image in Windows as a caption in WordPress… but I can’t.
    In the CAPTION rule I put the EXIF/Template value: Comments and the result is the text with strange characters:
    “exif:Comments => B?o?l?s?o?-?J?e?a?n?s?,?-?A?n?n?s?-?8?0?.?-?J ?e?a?n?s?,?-?L?a? -?r?o?s?a?-?e?-?M?i?s?s?a?n?g?a ?s?-?t?r?a?s?p?a?r?e?n?t?e?s?-e? …

    I tried using other values like “0x9c9c” / “XPComment”, the result comes empty. I found your support in a similar case, I read and tried to use: “template:([+xmp:comments+])” but it didn’t solve it…

    What value for EXIF/Template should I use? Can you help?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for including a specific example; very helpful.

    Some image editing tools put 16-bit Unicode values in metadata fields. It looks like this may be happening in your example. If you can post a link to one or more image files with the problem I can investigate further. You can also contact me at my web site and send images by email.

    On the Media/Edit Media screen, just below the “Attachment Metadata” box there should be another box labeled “Attachment File Metadata”. In this box you should see all of the metadata values in your file with the name MLA would use to extract them. Perhaps you can find an alternative value with more common 8-bit encoding.

    I will leave this topic unresolved for now and I hope to see one or more example files that will let me give you more specific help. Thanks for your interest in the plugin.

    Thread Starter marcomadruga

    (@marcomadruga)

    Thanks for your quick reply.
    I send a link with an image, that was saved for web in Photoshop, in which all the metadata was introduced using Windows (11) and I also send a screenshot with the image and the metadata in the Windows explorer:
    Link to image: https://fromsmash.com/-D2DqS3e4b-ct

    I uploaded this image to the media library.
    The EXIF/Template Value for Caption is “Comments”.

    Sending part of the Attachment File Metadata:

    exif:Artist => Marco Madruga
    exif:Exif_IFD_Pointer => 2314
    exif:Title => MLA Image
    exif:Comments => L?o?r?e?m? ?i?p?s?u?m? ?d?o?l?o?r? ?s?i?t? ?a?m?e ?t?,? ?c?o?n?s?e?c?t?e?tu?r? ?a?d?i?p?i?s?c?i?n?g? e?l?i?t?.? ?C?u?r?a?b?i?t?u?r? ?v?i?t?a?e? ?a?u?g?u?e ? s?u?s?c?i?p?i?t?,? ?u?l?t?r?i?c?i?e?s? ?e?r?a?t? ?e ?g?e?t?,? ?m?a?l?e?s?u?a?d?a? ?n?e?que?u?e?.? m?u?s? s?i?t? ?a?m?e?t? ?t?o?r?t?o?r? ?p?h?a?r?e?t?r? a?,? ?p?e?l?l?e?n?t?e?s?u?e? ?d?u?i? ?a?,? ?t?i?n?c? i?d?u?n?t? ?a?u?g?u?e?.???
    exif:Author => M?a?r?c?o? ?M?a?d?r?u?g?a???
    exif:Subject => MM Image Subject
    exif:ExifVersion => 0220
    exif:ExifImageWidth => 474
    exif:ExifImageLength => 474
    exif:Company => Ducky
    exif:Info =>
    exif:WINXP.Title => ?????????
    exif:WINXP.Comments => ???????????????????????????????????????????? ???????????????????????????????????????????????????? ???????????????????????????????????????????????????? ???????????????????????????????????????????????????? ????
    exif:WINXP.Author => ?????????????
    exif:WINXP.Subject => ????????????????

    • This reply was modified 1 year, 3 months ago by marcomadruga.
    Plugin Author David Lingren

    (@dglingren)

    Thank you for sending the image file. I was able to reproduce and correct the problem.

    The metadata editor used in the Microsoft Windows File Explorer Properties/Details dialog box adds binary zeroes to text in the Title, Keywords, Subject, Comments and Author fields. I have updated MLA to correct the problem in the Comments and Author fields; the other fields were already corrected in earlier MLA versions.

    I have uploaded a new MLA Development Version dated 20230806 that corrects the problem. You can find step-by-step instructions for using the Development Version in this earlier topic:

    How to download & install the current development version of MLA

    Once the Development Version is installed you can retest the handling of exif:Comments and exif:Author values.

    The fix will be part of my next MLA version, but in the interim it would be great if you could install the Development Version and let me know if it works for you. Thanks for alerting me to this MLA defect.

    Thread Starter marcomadruga

    (@marcomadruga)

    Hi David,
    thank you very much, it worked with the new version, just one problem, the accents and cedillas don’t work (the text I’m putting in is in Portuguese, and those characters are used), instead of those characters, rectangles and lozenges appear with a “? “.
    I think it’s important for this fabulous plugin to be able to accept languages other than English.
    But being up and running is fantastic.

    I send a link with screenshots of the media library, and Windows explorer and a test image:
    https://fromsmash.com/qLn9Cm6w_h-ct


    Sending part of the Attachment File Metadata:


    exif:DateTime => 2023:08:04 14:50:36
    exif:Artist => Rosário Carneiro
    exif:Exif_IFD_Pointer => 2432
    exif:Title => Test title
    exif:Comments => Bolso Jeans, Anos 80. Jeans, La Here should be two rectangles, because the text is L? rosa e Missangas transparentes e prateadas, 17×12 cm.
    Jeans Pocket, 1980s. Jeans, pink Wool, and silver and transparent Beads; 17×12.5 cm
    exif:Author => Ros?rio Carneiro
    exif:Subject => Text of subject
    exif:THUMBNAIL.Compression => 6
    exif:THUMBNAIL.XResolution => 72/1
    exif:THUMBNAIL.YResolution => 72/1
    exif:THUMBNAIL.ResolutionUnit => 2
    exif:THUMBNAIL.JPEGInterchangeFormat => 5090
    exif:THUMBNAIL.JPEGInterchangeFormatLength => 7898
    exif:ExifVersion => 0231
    exif:ColorSpace => 65535
    exif:ExifImageWidth => 474
    exif:ExifImageLength => 474
    exif:WINXP.Title => ??????????
    exif:WINXP.Comments => ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    exif:WINXP.Author => ????????????????
    exif:WINXP.Subject => ???????????????

    • This reply was modified 1 year, 3 months ago by marcomadruga.
    • This reply was modified 1 year, 3 months ago by marcomadruga.
    Plugin Author David Lingren

    (@dglingren)

    Thanks for trying the Development Version and for the details on your remaining issue. I have done more research and found a more complete solution.

    The root cause is that the file explorer is filling the fields with “little endian” 16-bit Unicode characters, without the byte order mark that usually indicates a Unicode string, I have added code that will fully translate these strings to the more common UTF-8 encoding; UTF-8 works well in WordPress.

    I have uploaded a new Development Version dated 20230807 that correctly formats the accented characters in the sample image you provided. It would be great if you could try the new version and see how it works on a wider sample of accented strings. Thanks for your patience and your help.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your latest post, which looks like it went to the wrong topic:

    How to download & install the current development version of MLA

    You wrote:

    Is P E R F E C T !! Everything working fine.
    Thank you very much. I send part of the Attachment File Data, where everything is fine: exif:Artist => Rosário Carneiro
    exif:Exif_IFD_Pointer => 2432
    exif:Title => Test title
    exif:Comments => Bolso Jeans, Anos 80. Jeans, L? rosa e Missangas transparentes e prateadas, 17×12 cm.
    Jeans Pocket, 1980s. Jeans, pink Wool, and silver and transparent Beads; 17×12.5 cm
    exif:Author => Rosário Carneiro
    exif:Subject => Text of subject
    exif:THUMBNAIL.Compression => 6
    exif:THUMBNAIL.XResolution => 72/1
    exif:THUMBNAIL.YResolution => 72/1
    exif:THUMBNAIL.ResolutionUnit => 2
    exif:THUMBNAIL.JPEGInterchangeFormat => 5090
    exif:THUMBNAIL.JPEGInterchangeFormatLength => 7898
    exif:ExifVersion => 0231
    exif:ColorSpace => 65535
    exif:ExifImageWidth => 474
    exif:ExifImageLength => 474
    exif:WINXP.Title => ??????????
    exif:WINXP.Comments => ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    exif:WINXP.Author => ????????????????
    exif:WINXP.Subject => ???????????????

    I am happy to see the accents are working for you. Thanks for taking the time to try the Development Version and confirming the fix.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 3.10, which contains the enhancements required for this topic.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding MLA’s support for Unicode characters in image metadata. Thanks for inspiring this MLA improvement.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘image Comments as Caption’ is closed to new replies.