exiftool_vendored 12.22.0 → 12.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +50 -0
  3. data/bin/MANIFEST +11 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +44 -43
  7. data/bin/config_files/acdsee.config +193 -6
  8. data/bin/config_files/cuepointlist.config +70 -0
  9. data/bin/exiftool +45 -44
  10. data/bin/lib/Image/ExifTool.pm +85 -26
  11. data/bin/lib/Image/ExifTool.pod +61 -50
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +1 -1
  13. data/bin/lib/Image/ExifTool/Canon.pm +3 -2
  14. data/bin/lib/Image/ExifTool/DjVu.pm +6 -5
  15. data/bin/lib/Image/ExifTool/Exif.pm +16 -7
  16. data/bin/lib/Image/ExifTool/FujiFilm.pm +18 -8
  17. data/bin/lib/Image/ExifTool/JPEG.pm +6 -2
  18. data/bin/lib/Image/ExifTool/JSON.pm +24 -3
  19. data/bin/lib/Image/ExifTool/Jpeg2000.pm +361 -16
  20. data/bin/lib/Image/ExifTool/MRC.pm +341 -0
  21. data/bin/lib/Image/ExifTool/MWG.pm +3 -3
  22. data/bin/lib/Image/ExifTool/MXF.pm +1 -1
  23. data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
  24. data/bin/lib/Image/ExifTool/Microsoft.pm +5 -3
  25. data/bin/lib/Image/ExifTool/Nikon.pm +3 -2
  26. data/bin/lib/Image/ExifTool/NikonSettings.pm +10 -1
  27. data/bin/lib/Image/ExifTool/PNG.pm +2 -2
  28. data/bin/lib/Image/ExifTool/Panasonic.pm +14 -1
  29. data/bin/lib/Image/ExifTool/PhaseOne.pm +4 -3
  30. data/bin/lib/Image/ExifTool/QuickTime.pm +102 -44
  31. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +88 -29
  32. data/bin/lib/Image/ExifTool/RIFF.pm +83 -11
  33. data/bin/lib/Image/ExifTool/Samsung.pm +2 -1
  34. data/bin/lib/Image/ExifTool/Sony.pm +98 -24
  35. data/bin/lib/Image/ExifTool/TagLookup.pm +56 -15
  36. data/bin/lib/Image/ExifTool/TagNames.pod +388 -173
  37. data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -0
  38. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +37 -12
  39. data/bin/lib/Image/ExifTool/WriteXMP.pl +6 -2
  40. data/bin/lib/Image/ExifTool/Writer.pl +1 -0
  41. data/bin/lib/Image/ExifTool/XMP.pm +20 -7
  42. data/bin/perl-Image-ExifTool.spec +42 -42
  43. data/lib/exiftool_vendored/version.rb +1 -1
  44. metadata +6 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2862287affdad95022ad8df06fd1b420c2861e28f5daefa50c627c42db2e396
4
- data.tar.gz: 90b7804c201830e6cacc5b28b9ba29ef4a5fff7bb6a1cb26db1fce970495769e
3
+ metadata.gz: 04f93501e7bd28d806651831606ad1d1822fd9fc430e73f47c54a8c6be3fd025
4
+ data.tar.gz: 2be10f782f703d5880106603936d5f00a508db219958a50d7dc66f29102c7ba3
5
5
  SHA512:
6
- metadata.gz: 85a74e99266a89cf019066af0227b8d6515b153d2d5612814afa1bac1faffa874e6defa7aa524577a4031154cc81f0b74277136476cf35c6bb2aa9cc35e1148f
7
- data.tar.gz: 42911ad4e1f2c03ff6a95cc25f3fcb47f8fbda099d6cfb669e72fefa9c743b002865225d872d179654dc79f3958d6e94feb20d7bfb317e3006c7b8bdee195e98
6
+ metadata.gz: 232066a679e6b866faad15144b640b047cf8cb9bfe67f3b5954f72c015b9b57f59662b0bb4e336f9ef2edaedf449012d4e8ab066e39a181e7c3bdb04b1f16b3f
7
+ data.tar.gz: '0585582d9a4c8a050982bec0e3e11cfaf7b702f733eff2338dbbdca3f49f73c5cccf73084c6cac300791d43baaccd7cdbcd3e5fa4bfa143facdd3a8e000e9c69'
data/bin/Changes CHANGED
@@ -7,6 +7,56 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 12.16. (Other versions are
8
8
  considered development releases, and are not uploaded to MetaCPAN.)
9
9
 
10
+ Apr. 22, 2021 - Version 12.25
11
+
12
+ - JPEG XL support is now official
13
+ - Added read support for Medical Research Council (MRC) image files
14
+ - Added ability to write a number of 3gp tags in video files
15
+ - Added a new Sony PictureProfile value (thanks Jos Roost)
16
+ - Added a new Sony LensType (thanks LibRaw)
17
+ - Added a new Nikon LensID (thanks Niels Kristian Bech Jensen)
18
+ - Added a new Canon LensType
19
+ - Decode more GPS information from Blackvue dashcam videos
20
+ - Decode a couple of new NikonSettings tags (thanks Warren Hatch)
21
+ - Decode a few new RIFF tags
22
+ - Improved Validate option to add minor warning if standard XMP is missing
23
+ xpacket wrapper
24
+ - Avoid decoding some large arrays in DNG images to improve performance unless
25
+ the -m option is used
26
+ - Patched bug that could give runtime warning when trying to write an empty
27
+ XMP structure
28
+ - Fixed decoding of ImageWidth/Height for JPEG XL images
29
+ - Fixed problem were Microsoft Xtra tags couldn't be deleted
30
+
31
+ Apr. 13, 2021 - Version 12.24
32
+
33
+ - Added a new PhaseOne RawFormat value (thanks LibRaw)
34
+ - Decode a new Sony tag (thanks Jos Roost)
35
+ - Decode a few new Panasonic and FujiFilm tags (thanks LibRaw and Greybeard)
36
+ - Patched security vulnerability in DjVu reader
37
+ - Updated acdsee.config in distribution (thanks StarGeek)
38
+ - Recognize AutoCAD DXF files
39
+ - More work on experimental JUMBF read support
40
+ - More work on experimental JPEG XL read/write support
41
+
42
+ Apr. 1, 2021 - Version 12.23
43
+
44
+ - Added support for Olympus ORI files
45
+ - Added experimental read/write support for JPEG XL images
46
+ - Added experimental read support for JUMBF metadata in JPEG and Jpeg2000
47
+ images
48
+ - Added built-in support for parsing GPS track from Denver ACG-8050 videos
49
+ with the -ee option
50
+ - Added a some new Sony lenses (thanks Jos Roost and LibRaw)
51
+ - Changed priority of Samsung trailer tags so the first DepthMapImage takes
52
+ precedence when -a is not used
53
+ - Improved identification of M4A audio files
54
+ - Patched to avoid escaping ',' in "Binary data" message when -struct is used
55
+ - Removed Unknown flag from MXF VideoCodingSchemeID tag
56
+ - Fixed -forcewrite=EXIF to apply to EXIF in binary header of EPS files
57
+ - API Changes:
58
+ - Added BlockExtract option
59
+
10
60
  Mar. 17, 2021 - Version 12.22
11
61
 
12
62
  - Added a few new Sony LensTypes and a new SonyModelID (thanks Jos Roost and
data/bin/MANIFEST CHANGED
@@ -19,6 +19,7 @@ config_files/acdsee.config
19
19
  config_files/age.config
20
20
  config_files/bibble.config
21
21
  config_files/convert_regions.config
22
+ config_files/cuepointlist.config
22
23
  config_files/depthmap.config
23
24
  config_files/example.config
24
25
  config_files/fotoware.config
@@ -104,6 +105,7 @@ html/TagNames/MOI.html
104
105
  html/TagNames/MPC.html
105
106
  html/TagNames/MPEG.html
106
107
  html/TagNames/MPF.html
108
+ html/TagNames/MRC.html
107
109
  html/TagNames/MWG.html
108
110
  html/TagNames/MXF.html
109
111
  html/TagNames/MacOS.html
@@ -326,6 +328,7 @@ lib/Image/ExifTool/MOI.pm
326
328
  lib/Image/ExifTool/MPC.pm
327
329
  lib/Image/ExifTool/MPEG.pm
328
330
  lib/Image/ExifTool/MPF.pm
331
+ lib/Image/ExifTool/MRC.pm
329
332
  lib/Image/ExifTool/MWG.pm
330
333
  lib/Image/ExifTool/MXF.pm
331
334
  lib/Image/ExifTool/MacOS.pm
@@ -601,6 +604,9 @@ t/JSON_2.out
601
604
  t/JVC.t
602
605
  t/JVC_2.out
603
606
  t/JVC_3.out
607
+ t/JXL.t
608
+ t/JXL_2.out
609
+ t/JXL_3.out
604
610
  t/Jpeg2000.t
605
611
  t/Jpeg2000_2.out
606
612
  t/Jpeg2000_3.out
@@ -647,6 +653,8 @@ t/MOI.t
647
653
  t/MOI_2.out
648
654
  t/MP3.t
649
655
  t/MP3_2.out
656
+ t/MRC.t
657
+ t/MRC_2.out
650
658
  t/MWG.t
651
659
  t/MWG_2.out
652
660
  t/MWG_3.out
@@ -760,6 +768,7 @@ t/QuickTime_13.out
760
768
  t/QuickTime_14.out
761
769
  t/QuickTime_15.out
762
770
  t/QuickTime_16.out
771
+ t/QuickTime_17.out
763
772
  t/QuickTime_2.out
764
773
  t/QuickTime_3.out
765
774
  t/QuickTime_4.out
@@ -1002,6 +1011,7 @@ t/images/InDesign.indd
1002
1011
  t/images/JSON.json
1003
1012
  t/images/JVC.jpg
1004
1013
  t/images/JVC2.jpg
1014
+ t/images/JXL.jxl
1005
1015
  t/images/Jpeg2000.j2c
1006
1016
  t/images/Jpeg2000.jp2
1007
1017
  t/images/Kodak.jpg
@@ -1013,6 +1023,7 @@ t/images/MIE.mie
1013
1023
  t/images/MIFF.miff
1014
1024
  t/images/MOI.moi
1015
1025
  t/images/MP3.mp3
1026
+ t/images/MRC.mrc
1016
1027
  t/images/MWG.jpg
1017
1028
  t/images/MXF.mxf
1018
1029
  t/images/MacOS.macos
data/bin/META.json CHANGED
@@ -47,5 +47,5 @@
47
47
  }
48
48
  },
49
49
  "release_status" : "stable",
50
- "version" : "12.22"
50
+ "version" : "12.25"
51
51
  }
data/bin/META.yml CHANGED
@@ -28,4 +28,4 @@ recommends:
28
28
  Time::HiRes: 0
29
29
  requires:
30
30
  perl: 5.004
31
- version: 12.22
31
+ version: 12.25
data/bin/README CHANGED
@@ -14,47 +14,47 @@ supported by ExifTool (r = read, w = write, c = create):
14
14
 
15
15
  File Types
16
16
  ------------+-------------+-------------+-------------+------------
17
- 360 r/w | DPX r | ITC r | ODP r | RIFF r
18
- 3FR r | DR4 r/w/c | J2C r | ODS r | RSRC r
19
- 3G2 r/w | DSS r | JNG r/w | ODT r | RTF r
20
- 3GP r/w | DV r | JP2 r/w | OFR r | RW2 r/w
21
- A r | DVB r/w | JPEG r/w | OGG r | RWL r/w
22
- AA r | DVR-MS r | JSON r | OGV r | RWZ r
23
- AAE r | DYLIB r | K25 r | ONP r | RM r
24
- AAX r/w | EIP r | KDC r | OPUS r | SEQ r
25
- ACR r | EPS r/w | KEY r | ORF r/w | SKETCH r
26
- AFM r | EPUB r | LA r | OTF r | SO r
27
- AI r/w | ERF r/w | LFP r | PAC r | SR2 r/w
28
- AIFF r | EXE r | LNK r | PAGES r | SRF r
29
- APE r | EXIF r/w/c | LRV r/w | PBM r/w | SRW r/w
30
- ARQ r/w | EXR r | M2TS r | PCD r | SVG r
31
- ARW r/w | EXV r/w/c | M4A/V r/w | PCX r | SWF r
32
- ASF r | F4A/V r/w | MACOS r | PDB r | THM r/w
33
- AVI r | FFF r/w | MAX r | PDF r/w | TIFF r/w
34
- AVIF r/w | FITS r | MEF r/w | PEF r/w | TORRENT r
35
- AZW r | FLA r | MIE r/w/c | PFA r | TTC r
36
- BMP r | FLAC r | MIFF r | PFB r | TTF r
37
- BPG r | FLIF r/w | MKA r | PFM r | TXT r
38
- BTF r | FLV r | MKS r | PGF r | VCF r
39
- CHM r | FPF r | MKV r | PGM r/w | VRD r/w/c
40
- COS r | FPX r | MNG r/w | PLIST r | VSD r
41
- CR2 r/w | GIF r/w | MOBI r | PICT r | WAV r
42
- CR3 r/w | GPR r/w | MODD r | PMP r | WDP r/w
43
- CRM r/w | GZ r | MOI r | PNG r/w | WEBP r
44
- CRW r/w | HDP r/w | MOS r/w | PPM r/w | WEBM r
45
- CS1 r/w | HDR r | MOV r/w | PPT r | WMA r
46
- CSV r | HEIC r/w | MP3 r | PPTX r | WMV r
47
- CZI r | HEIF r/w | MP4 r/w | PS r/w | WTV r
48
- DCM r | HTML r | MPC r | PSB r/w | WV r
49
- DCP r/w | ICC r/w/c | MPG r | PSD r/w | X3F r/w
50
- DCR r | ICS r | MPO r/w | PSP r | XCF r
51
- DFONT r | IDML r | MQV r/w | QTIF r/w | XLS r
52
- DIVX r | IIQ r/w | MRW r/w | R3D r | XLSX r
53
- DJVU r | IND r/w | MXF r | RA r | XMP r/w/c
54
- DLL r | INSP r/w | NEF r/w | RAF r/w | ZIP r
55
- DNG r/w | INSV r | NRW r/w | RAM r |
56
- DOC r | INX r | NUMBERS r | RAR r |
57
- DOCX r | ISO r | O r | RAW r/w |
17
+ 360 r/w | DPX r | ITC r | NUMBERS r | RAM r
18
+ 3FR r | DR4 r/w/c | J2C r | O r | RAR r
19
+ 3G2 r/w | DSS r | JNG r/w | ODP r | RAW r/w
20
+ 3GP r/w | DV r | JP2 r/w | ODS r | RIFF r
21
+ A r | DVB r/w | JPEG r/w | ODT r | RSRC r
22
+ AA r | DVR-MS r | JSON r | OFR r | RTF r
23
+ AAE r | DYLIB r | JXL r | OGG r | RW2 r/w
24
+ AAX r/w | EIP r | K25 r | OGV r | RWL r/w
25
+ ACR r | EPS r/w | KDC r | ONP r | RWZ r
26
+ AFM r | EPUB r | KEY r | OPUS r | RM r
27
+ AI r/w | ERF r/w | LA r | ORF r/w | SEQ r
28
+ AIFF r | EXE r | LFP r | ORI r/w | SKETCH r
29
+ APE r | EXIF r/w/c | LNK r | OTF r | SO r
30
+ ARQ r/w | EXR r | LRV r/w | PAC r | SR2 r/w
31
+ ARW r/w | EXV r/w/c | M2TS r | PAGES r | SRF r
32
+ ASF r | F4A/V r/w | M4A/V r/w | PBM r/w | SRW r/w
33
+ AVI r | FFF r/w | MACOS r | PCD r | SVG r
34
+ AVIF r/w | FITS r | MAX r | PCX r | SWF r
35
+ AZW r | FLA r | MEF r/w | PDB r | THM r/w
36
+ BMP r | FLAC r | MIE r/w/c | PDF r/w | TIFF r/w
37
+ BPG r | FLIF r/w | MIFF r | PEF r/w | TORRENT r
38
+ BTF r | FLV r | MKA r | PFA r | TTC r
39
+ CHM r | FPF r | MKS r | PFB r | TTF r
40
+ COS r | FPX r | MKV r | PFM r | TXT r
41
+ CR2 r/w | GIF r/w | MNG r/w | PGF r | VCF r
42
+ CR3 r/w | GPR r/w | MOBI r | PGM r/w | VRD r/w/c
43
+ CRM r/w | GZ r | MODD r | PLIST r | VSD r
44
+ CRW r/w | HDP r/w | MOI r | PICT r | WAV r
45
+ CS1 r/w | HDR r | MOS r/w | PMP r | WDP r/w
46
+ CSV r | HEIC r/w | MOV r/w | PNG r/w | WEBP r
47
+ CZI r | HEIF r/w | MP3 r | PPM r/w | WEBM r
48
+ DCM r | HTML r | MP4 r/w | PPT r | WMA r
49
+ DCP r/w | ICC r/w/c | MPC r | PPTX r | WMV r
50
+ DCR r | ICS r | MPG r | PS r/w | WTV r
51
+ DFONT r | IDML r | MPO r/w | PSB r/w | WV r
52
+ DIVX r | IIQ r/w | MQV r/w | PSD r/w | X3F r/w
53
+ DJVU r | IND r/w | MRC r | PSP r | XCF r
54
+ DLL r | INSP r/w | MRW r/w | QTIF r/w | XLS r
55
+ DNG r/w | INSV r | MXF r | R3D r | XLSX r
56
+ DOC r | INX r | NEF r/w | RA r | XMP r/w/c
57
+ DOCX r | ISO r | NRW r/w | RAF r/w | ZIP r
58
58
 
59
59
  Meta Information
60
60
  ----------------------+----------------------+---------------------
@@ -106,8 +106,8 @@ your home directory, then you would type the following commands in a
106
106
  terminal window to extract and run ExifTool:
107
107
 
108
108
  cd ~/Desktop
109
- gzip -dc Image-ExifTool-12.22.tar.gz | tar -xf -
110
- cd Image-ExifTool-12.22
109
+ gzip -dc Image-ExifTool-12.25.tar.gz | tar -xf -
110
+ cd Image-ExifTool-12.25
111
111
  ./exiftool t/images/ExifTool.jpg
112
112
 
113
113
  Note: These commands extract meta information from one of the test images.
@@ -194,6 +194,7 @@ distribution package:
194
194
  age.config - Calculate Age of person in photo
195
195
  bibble.config - Definitions for writing Bibble XMP tags
196
196
  convert_regions.config - Convert between MWG, MP and IPTC regions
197
+ cuepointlist.config - Extract cue points and labels as a list
197
198
  depthmap.config - Extract Google DepthMap images
198
199
  example.config - General example showing config features
199
200
  fotoware.config - Definitions for writing Fotoware XMP tags
@@ -2,20 +2,76 @@
2
2
  # File: acdsee.config
3
3
  #
4
4
  # Description: This config file defines ACDSee XMP region tags for writing.
5
+ # The following tags are created in the XMP-acdsee-rs group
5
6
  #
6
- # Usage: exiftool -config acdsee.config -ACDSEETAG=VALUE FILE ...
7
+ # RegionInfoACDSee : The structured tag for the ACDSee regions
8
+ # (similar to XMP-mwg-rs:RegionInfo)
9
+ #
10
+ # The following tags are the width, height, and unit of the
11
+ # image at the time of processing when storing image region
12
+ # metadata. They are similar to the AppliedToDimensions tags
13
+ # of the MWG regions.
14
+ # ACDSeeRegionAppliedToDimensionsH : Height of the image
15
+ # ACDSeeRegionAppliedToDimensionsUnit : Unit of the image
16
+ # ACDSeeRegionAppliedToDimensionsW : Width of the image
17
+ #
18
+ # Actual region data, stored in an array. These flattened tags
19
+ # are treated as List Type tags. There are two region types,
20
+ # the ALYArea and the DLYArea. The ALYArea tags tags assigned
21
+ # by ACDSee and are usually square in dimensions. The DLYArea
22
+ # tags are both the tags assigned by ACDSee (but possibly
23
+ # rectangular instead of square) as well as any manual
24
+ # assigned tags. They are similar to the area tags of the MWG
25
+ # regions.
26
+ # ACDSeeRegionDLYAreaH : Height of DLY region
27
+ # ACDSeeRegionDLYAreaW : Width of DLY region
28
+ # ACDSeeRegionDLYAreaX : X centerpoint of DLY region
29
+ # ACDSeeRegionDLYAreaY : Y centerpoint of DLY region
30
+ # ACDSeeRegionALYAreaH : Height of ALY region
31
+ # ACDSeeRegionALYAreaW : Width of ALY region
32
+ # ACDSeeRegionALYAreaX : X centerpoint of ALY region
33
+ # ACDSeeRegionALYAreaY : Y centerpoint of ALY region
34
+ # ACDSeeRegionName : Name of region
35
+ # ACDSeeRegionType : Type of region
36
+ # ACDSeeRegionNameAssignType : How the type was assigned.
37
+ # "Manual" is the only known
38
+ # entry at this time
39
+ #
40
+ # Conversion tags. These tags can be used to convert other region
41
+ # type tags to ACDSee regions.
42
+ # MPRegion2ACDSeeRegion : Converts a Microsoft RegionInfoMP
43
+ # IPTCRegion2ACDSeeRegion : Converts an IPTC ImageRegion
44
+ # MWGRegion2ACDSeeRegion : Converts a MWG RegionInfo
45
+ #
46
+ # Usage: To set individual tags
47
+ # exiftool -config acdsee.config -ACDSEETAG=VALUE FILE ...
48
+ #
49
+ # To convert Microsoft Regions to ACDSee regions
50
+ # exiftool -config acdsee.config "-RegionInfoACDSee<MPRegion2ACDSeeRegion" File ...
51
+ # To convert IPTC regions to ACDSee regions
52
+ # exiftool -config acdsee.config "-RegionInfoACDSee<IPTCRegion2ACDSeeRegion" File ...
53
+ # To convert MWG Regions to ACDSee regions
54
+ # exiftool -config acdsee.config "-RegionInfoACDSee<MWGRegion2ACDSeeRegion" File ...
7
55
  #
8
56
  # Requires: ExifTool version 10.28 or later
9
57
  #
10
58
  # Revisions: 2020/01/28 - Bryan K. Williams (aka StarGeek) Created
59
+ # 2021/04/08 - BKW Added tags to convert from Microsoft, IPTC,
60
+ # and MWG regions to ACDSee regions based upon
61
+ # convert_regions.config. Expanded docs.
62
+ # Shortened ADCSee tag names and added shortcuts
63
+ # from original names to new names, for example
64
+ # "RegionInfoACDSeeAppliedToDimensions*" -> "ACDSeeRegionAppliedToDimensions*"
65
+ # "RegionInfoACDSeeRegionList* -> "ACDSeeRegion*"
11
66
  #------------------------------------------------------------------------------
67
+ use Data::Dumper;
12
68
 
13
69
  my %sACDSeeDimensions = (
14
70
  STRUCT_NAME => 'ACDSee Dimensions',
15
71
  NAMESPACE => {'acdsee-stDim' => 'http://ns.acdsee.com/sType/Dimensions#'},
16
- 'w' => { Writable => 'real' },
17
- 'h' => { Writable => 'real' },
18
- 'unit' => { },
72
+ 'w' => { Writable => 'real' },
73
+ 'h' => { Writable => 'real' },
74
+ 'unit' => { },
19
75
  );
20
76
 
21
77
  my %sACDSeeArea = (
@@ -38,7 +94,7 @@ my %sACDSeeRegionStruct = (
38
94
  );
39
95
 
40
96
  %Image::ExifTool::UserDefined = (
41
- # new XMP namespaces (eg. xxx) must be added to the Main XMP table:
97
+ # new XMP namespaces for ACDSee regions
42
98
  'Image::ExifTool::XMP::Main' => {
43
99
  'acdsee-rs' => { # <-- must be the same as the NAMESPACE prefix
44
100
  SubDirectory => {
@@ -46,6 +102,112 @@ my %sACDSeeRegionStruct = (
46
102
  },
47
103
  },
48
104
  },
105
+ 'Image::ExifTool::Composite' => {
106
+ # create an ACDSee RegionInfo structure from a Microsoft RegionInfoMP structure
107
+ MPRegion2ACDSeeRegion => {
108
+ Require => {
109
+ 0 => 'RegionInfoMP',
110
+ 1 => 'ImageWidth',
111
+ 2 => 'ImageHeight',
112
+ },
113
+ ValueConv => q{
114
+ my ($rgn, @newRgns);
115
+ foreach $rgn (@{$val[0]{Regions}}) {
116
+ my $name = $$rgn{PersonDisplayName};
117
+ next unless $$rgn{Rectangle} or defined $name;
118
+ my %newRgn = ( Type => 'Face' );
119
+ if (defined $name) {
120
+ # don't add ignored faces
121
+ next if $name eq 'ffffffffffffffff';
122
+ $newRgn{Name} = $name;
123
+ }
124
+ if ($$rgn{Rectangle}) {
125
+ my @rect = split /\s*,\s*/, $$rgn{Rectangle};
126
+ $newRgn{DLYArea} = {
127
+ X => $rect[0] + $rect[2]/2,
128
+ Y => $rect[1] + $rect[3]/2,
129
+ W => $rect[2],
130
+ H => $rect[3],
131
+ } if @rect == 4;
132
+ }
133
+ push @newRgns, \%newRgn;
134
+ }
135
+ return {
136
+ AppliedToDimensions => { W => $val[1], H => $val[2], Unit => 'pixel' },
137
+ RegionList => \@newRgns,
138
+ };
139
+ },
140
+ },
141
+ # create an ACDSee RegionInfo structure from an IPTC ImageRegion list
142
+ IPTCRegion2ACDSeeRegion => {
143
+ Require => {
144
+ 0 => 'ImageRegion',
145
+ 1 => 'ImageWidth',
146
+ 2 => 'ImageHeight',
147
+ },
148
+ ValueConv => q{
149
+ my ($rgn, @newRgns);
150
+ my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
151
+ foreach $rgn (@$rgns) {
152
+ my %newRgn = ( Type => 'Face' );
153
+ if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
154
+ my @rect = @{$$rgn{RegionBoundary}}{'RbX','RbY','RbW','RbH'};
155
+ if ($$rgn{RegionBoundary}{RbUnit} eq 'pixel') {
156
+ $rect[0] /= $val[1], $rect[2] /= $val[1];
157
+ $rect[1] /= $val[2]; $rect[3] /= $val[2];
158
+ }
159
+ $newRgn{'DLYArea'} = {
160
+ X => $rect[0] + $rect[2]/2,
161
+ Y => $rect[1] + $rect[3]/2,
162
+ W => $rect[2],
163
+ H => $rect[3],
164
+ };
165
+ } else {
166
+ next unless defined $$rgn{Name};
167
+ }
168
+ $newRgn{Name} = $$rgn{Name} if defined $$rgn{Name};
169
+ push @newRgns, \%newRgn;
170
+ }
171
+ return {
172
+ AppliedToDimensions => { 'W' => $val[1], 'H' => $val[2], 'Unit' => 'pixel' },
173
+ RegionList => \@newRgns,
174
+ };
175
+ },
176
+ },
177
+
178
+ # create an MWG RegionInfo structure from an IPTC ImageRegion list
179
+ MWGRegion2ACDSeeRegion => {
180
+ Require => {
181
+ 0 => 'RegionInfo',
182
+ 1 => 'ImageWidth',
183
+ 2 => 'ImageHeight',
184
+ },
185
+ ValueConv => q{
186
+ my ($rgn, @newRgns);
187
+ my %newRgn;
188
+ foreach $rgn (@{$val[0]{RegionList}}) {
189
+ next unless $$rgn{Area} or defined $$rgn{Name};
190
+ my %newRgn;
191
+ if ($$rgn{Area}) {
192
+ $newRgn{'DLYArea'} = {
193
+ 'X' => $$rgn{Area}{'X'},
194
+ 'Y' => $$rgn{Area}{'Y'},
195
+ 'W' => $$rgn{Area}{'W'},
196
+ 'H' => $$rgn{Area}{'H'},
197
+ };
198
+ };
199
+ $newRgn{Name} = $$rgn{Name} if defined $$rgn{Name};
200
+ $newRgn{'Type'} = $$rgn{'Type'} if defined $$rgn{'Type'};
201
+ push @newRgns, \%newRgn;
202
+ }
203
+ return {
204
+ 'AppliedToDimensions' => $val[0]{'AppliedToDimensions'},
205
+ RegionList => \@newRgns,
206
+ }
207
+ },
208
+ },
209
+ ####
210
+ },
49
211
  );
50
212
 
51
213
  %Image::ExifTool::UserDefined::ACDSeeRegions = (
@@ -54,18 +216,43 @@ my %sACDSeeRegionStruct = (
54
216
  WRITABLE => 'string', # (default to string-type tags)
55
217
  Regions => {
56
218
  Name => 'RegionInfoACDSee',
219
+ FlatName => 'ACDSee',
57
220
  # the "Struct" entry defines the structure fields
58
221
  Struct => {
59
222
  # optional structure name (used for warning messages only)
60
223
  STRUCT_NAME => 'ACDSee RegionInfo',
61
224
  RegionList => {
225
+ FlatName => 'Region',
62
226
  Struct => \%sACDSeeRegionStruct,
63
227
  List => 'Bag',
64
228
  },
65
- AppliedToDimensions => { Struct => \%sACDSeeDimensions },
229
+ AppliedToDimensions => {
230
+ FlatName => 'RegionAppliedToDimensions',Struct => \%sACDSeeDimensions },
66
231
  },
67
232
  },
68
233
  );
69
234
 
235
+ # Shortcuts to old names added so as not to break previously used commands
236
+ %Image::ExifTool::UserDefined::Shortcuts = (
237
+ RegionInfoACDSeeAppliedToDimensionsH => 'ACDSeeRegionAppliedToDimensionsH',
238
+ RegionInfoACDSeeAppliedToDimensionsUnit => 'ACDSeeRegionAppliedToDimensionsUnit',
239
+ RegionInfoACDSeeAppliedToDimensionsW => 'ACDSeeRegionAppliedToDimensionsW',
240
+ RegionInfoACDSeeRegionListDLYAreaH => 'ACDSeeRegionDLYAreaH',
241
+ RegionInfoACDSeeRegionListDLYAreaW => 'ACDSeeRegionDLYAreaW',
242
+ RegionInfoACDSeeRegionListDLYAreaX => 'ACDSeeRegionDLYAreaX',
243
+ RegionInfoACDSeeRegionListDLYAreaY => 'ACDSeeRegionDLYAreaY',
244
+ RegionInfoACDSeeRegionListALGAreaH => 'ACDSeeRegionALGAreaH',
245
+ RegionInfoACDSeeRegionListALGAreaW => 'ACDSeeRegionALGAreaW',
246
+ RegionInfoACDSeeRegionListALGAreaX => 'ACDSeeRegionALGAreaX',
247
+ RegionInfoACDSeeRegionListALGAreaY => 'ACDSeeRegionALGAreaY',
248
+ RegionInfoACDSeeRegionListName => 'ACDSeeRegionName',
249
+ RegionInfoACDSeeRegionListType => 'ACDSeeRegionType',
250
+ RegionInfoACDSeeRegionListNameAssignType => 'ACDSeeRegionNameAssignType',
251
+ );
252
+
253
+ # Forced -struct option during debugging
254
+ #%Image::ExifTool::UserDefined::Options = (
255
+ # Struct => 1,
256
+ #);
70
257
  #------------------------------------------------------------------------------
71
258
  1; #end