Ignore:
Timestamp:
2021-02-26T19:39:51+13:00 (3 years ago)
Author:
anupama
Message:

Committing the improvements to EmbeddedMetaPlugin's processing of Keywords vs other metadata fields. Keywords were literally stored as arrays of words rather than phrases in PDFs (at least in Diego's sample PDF), whereas other meta fields like Subjects and Creators stored them as arrays of phrases. To get both to work, Kathy updated EXIF to a newer version, to retrieve the actual EXIF values stored in the PDF. And Kathy and Dr Bainbridge came up with a new option that I added called apply_join_before_split_to_metafields that's a regex which can list the metadata fields to apply the join_before_split to and whcih previously always got applied to all metadata fields. Now it's applied to any *Keywords metafields by default, as that's the metafield we have experience of that behaves differently to the others, as it stores by word instead of phrases. Tested on Diego's sample PDF. Diego has double-checked it to works on his sample PDF too, setting the split char to ; and turning on the join_before_split and leaving apply_join_before_split_to_metafields at its default of .*Keywords. File changes are strings.properties for the tooltip, the plugin introducing the option and working with it and Kathy's EXIF updates affecting cpan/File and cpan/Image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cpan/Image/ExifTool/Sanyo.pm

    r24107 r34921  
    1515use Image::ExifTool::Exif;
    1616
    17 $VERSION = '1.14';
     17$VERSION = '1.16';
    1818
    1919my %offOn = (
     
    3434    0x0100 => {
    3535        Name => 'SanyoThumbnail',
     36        Groups => { 2 => 'Preview' },
    3637        Writable => 'undef',
    3738        WriteCheck => '$self->CheckImage(\$val)',
     
    351352        },
    352353    },
    353     0xfd => {
    354         Name => 'ThumbnailLength',
     354    0xf1 => {
     355        Name => 'Thumbnail',
    355356        Condition => '$$self{SanyoSledder0xd1}',
    356         Format => 'int32u',
    357     },
    358     0xfe => {
    359         Name => 'ThumbnailLength',
     357        SubDirectory => {
     358            TagTable => 'Image::ExifTool::Sanyo::Thumbnail',
     359            Base => '$start',
     360        },
     361    },
     362    0xf2 => {
     363        Name => 'Thumbnail',
    360364        Condition => '$$self{SanyoSledder0xd2}',
    361         Format => 'int32u',
    362     },
    363     0x101 => {
    364         Name => 'ThumbnailOffset',
    365         Condition => '$$self{SanyoSledder0xd1}',
    366         IsOffset => 1,
    367         Format => 'int32u',
    368         RawConv => '$val + 0xf1',
    369     },
    370     0x102 => {
    371         Name => 'ThumbnailOffset',
    372         Condition => '$$self{SanyoSledder0xd2}',
    373         IsOffset => 1,
    374         Format => 'int32u',
    375         RawConv => '$val + 0xf2',
    376     },
    377 );
     365        SubDirectory => {
     366            TagTable => 'Image::ExifTool::Sanyo::Thumbnail',
     367            Base => '$start',
     368        },
     369    },
     370);
     371
     372# thumbnail image information found in MP4 videos (similar in Olympus,Samsung,Sanyo)
     373%Image::ExifTool::Sanyo::Thumbnail = (
     374    PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
     375    GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
     376    FIRST_ENTRY => 0,
     377    FORMAT => 'int32u',
     378    1 => 'ThumbnailWidth',
     379    2 => 'ThumbnailHeight',
     380    3 => 'ThumbnailLength',
     381    4 => { Name => 'ThumbnailOffset', IsOffset => 1 },
     382);
     383
    378384
    379385#------------------------------------------------------------------------------
     
    414420=head1 AUTHOR
    415421
    416 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
     422Copyright 2003-2021, Phil Harvey (philharvey66 at gmail.com)
    417423
    418424This library is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.