python-3.x 我想检查不同的属性,如果.tiff图像文件,如剪辑路径的可用性,阿尔法通道,像素大小等,使用枕头

j2datikz  于 2023-08-08  发布在  Python
关注(0)|答案(1)|浏览(98)

我调用枕头库的图像,然后我想知道如何收集有关所有这些图像的表格形式的这些属性的信息,然后想导出为Excel。

from PIL import Image

img=Image.open(r"C:\\Users\\inpunindg\\Downloads\\Images\\test_image.tif")

img1=Image.open(r"C:\\Users\\inpunindg\\Downloads\\Images\\02444349.tif")

img2=Image.open(r"C:\\Users\\inpunindg\\Downloads\\Images\\02445323.tif")

print(type(img))

print(type(img1))

print(type(img2))

字符串
我在这个领域是非常新的,任何帮助都表示感谢。

oprakyz7

oprakyz71#

您可以通过exiftool简单地获得所需的大量信息。因此,例如,这里是图像名称,高度和宽度以及剪切通道名称作为CSV -我只是使用一个图像,但您可以在以下命令中使用*.tif替换图像名称:

exiftool -p '$fileName,$ImageHeight,$ImageWidth,$AlphaChannelsNames'  20235976.tif 
20235976.tif,2411,3400,Alpha 1

字符串
您可以获得更多详细的输出,以确定您可能想要提取的其他参数:

exiftool -v -v -v IMAGE.TIF

  ExifToolVersion = 12.60
  FileName = 20235976.tif
  Directory = .
  FileSize = 2102488
  FileModifyDate = 1690923306
  FileAccessDate = 1690995420
  FileInodeChangeDate = 1690923306
  FilePermissions = 33188
  FileType = TIFF
  FileTypeExtension = TIF
  MIMEType = image/tiff
  ExifByteOrder = II
  + [IFD0 directory with 22 entries]
  | 0)  SubfileType = 0
  |     - Tag 0x00fe (4 bytes, int32u[1]):
  |         0012: 00 00 00 00                                     [....]
  | 1)  ImageWidth = 3400
  |     - Tag 0x0100 (2 bytes, int16u[1]):
  |         001e: 48 0d                                           [H.]
  | 2)  ImageHeight = 2411
  |     - Tag 0x0101 (2 bytes, int16u[1]):
  |         002a: 6b 09                                           [k.]
  | 3)  BitsPerSample = 8 8 8 8
  |     - Tag 0x0102 (8 bytes, int16u[4]):
  |         0116: 08 00 08 00 08 00 08 00                         [........]
  | 4)  Compression = 5
  |     - Tag 0x0103 (2 bytes, int16u[1]):
  |         0042: 05 00                                           [..]
  | 5)  PhotometricInterpretation = 2
  |     - Tag 0x0106 (2 bytes, int16u[1]):
  |         004e: 02 00                                           [..]
  | 6)  StripOffsets = 25514 26426 27338 28250 29162 30074 30986 31898 32810 33722 3463[snip]
  |     - Tag 0x0111 (508 bytes, int32u[127]):
  |         011e: aa 63 00 00 3a 67 00 00 ca 6a 00 00 5a 6e 00 00 [.c..:g...j..Zn..]
  |         012e: ea 71 00 00 7a 75 00 00 0a 79 00 00 9a 7c 00 00 [.q..zu...y...|..]
  |         013e: 2a 80 00 00 ba 83 00 00 4a 87 00 00 da 8a 00 00 [*.......J.......]
  |         014e: 6a 8e 00 00 fa 91 00 00 8a 95 00 00 1a 99 00 00 [j...............]
  |         015e: aa 9c 00 00 3a a0 00 00 ca a3 00 00 58 af 00 00 [....:.......X...]
  |         [snip 428 bytes]
  | 7)  Orientation = 1
  |     - Tag 0x0112 (2 bytes, int16u[1]):
  |         0066: 01 00                                           [..]
  | 8)  SamplesPerPixel = 4
  |     - Tag 0x0115 (2 bytes, int16u[1]):
  |         0072: 04 00                                           [..]
  | 9)  RowsPerStrip = 19
  |     - Tag 0x0116 (2 bytes, int16u[1]):
  |         007e: 13 00                                           [..]
  | 10) StripByteCounts = 911 911 911 911 911 911 911 911 911 911 911 911 911 911 911 9[snip]
  |     - Tag 0x0117 (508 bytes, int32u[127]):
  |         031a: 8f 03 00 00 8f 03 00 00 8f 03 00 00 8f 03 00 00 [................]
  |         032a: 8f 03 00 00 8f 03 00 00 8f 03 00 00 8f 03 00 00 [................]
  |         033a: 8f 03 00 00 8f 03 00 00 8f 03 00 00 8f 03 00 00 [................]
  |         034a: 8f 03 00 00 8f 03 00 00 8f 03 00 00 8f 03 00 00 [................]
  |         035a: 8f 03 00 00 8f 03 00 00 8e 0b 00 00 f9 10 00 00 [................]
  |         [snip 428 bytes]
  | 11) XResolution = 300 (3000000/10000)
  |     - Tag 0x011a (8 bytes, rational64u[1]):
  |         0516: c0 c6 2d 00 10 27 00 00                         [..-..'..]
  | 12) YResolution = 300 (3000000/10000)
  |     - Tag 0x011b (8 bytes, rational64u[1]):
  |         051e: c0 c6 2d 00 10 27 00 00                         [..-..'..]
  | 13) PlanarConfiguration = 1
  |     - Tag 0x011c (2 bytes, int16u[1]):
  |         00ae: 01 00                                           [..]
  | 14) ResolutionUnit = 2
  |     - Tag 0x0128 (2 bytes, int16u[1]):
  |         00ba: 02 00                                           [..]
  | 15) Software = Adobe Photoshop 24.5 (Windows)
  |     - Tag 0x0131 (31 bytes, string[31]):
  |         0526: 41 64 6f 62 65 20 50 68 6f 74 6f 73 68 6f 70 20 [Adobe Photoshop ]
  |         0536: 32 34 2e 35 20 28 57 69 6e 64 6f 77 73 29 00    [24.5 (Windows).]
  | 16) ModifyDate = 2023:06:20 09:32:46
  |     - Tag 0x0132 (20 bytes, string[20]):
  |         0546: 32 30 32 33 3a 30 36 3a 32 30 20 30 39 3a 33 32 [2023:06:20 09:32]
  |         0556: 3a 34 36 00                                     [:46.]
  | 17) Predictor = 2
  |     - Tag 0x013d (2 bytes, int16u[1]):
  |         00de: 02 00                                           [..]
  | 18) ExtraSamples = 0
  |     - Tag 0x0152 (2 bytes, int16u[1]):
  |         00ea: 00 00                                           [..]
  | 19) ApplicationNotes (SubDirectory) -->
  |     - Tag 0x02bc (15225 bytes, int8u[15225] read as undef[15225]):
  |         055a: 3c 3f 78 70 61 63 6b 65 74 20 62 65 67 69 6e 3d [<?xpacket begin=]
  |         056a: 22 ef bb bf 22 20 69 64 3d 22 57 35 4d 30 4d 70 ["..." id="W5M0Mp]
  |         057a: 43 65 68 69 48 7a 72 65 53 7a 4e 54 63 7a 6b 63 [CehiHzreSzNTczkc]
  |         058a: 39 64 22 3f 3e 0a 3c 78 3a 78 6d 70 6d 65 74 61 [9d"?>.<x:xmpmeta]
  |         059a: 20 78 6d 6c 6e 73 3a 78 3d 22 61 64 6f 62 65 3a [ xmlns:x="adobe:]
  |         [snip 15145 bytes]
  | + [XMP directory, 15225 bytes]
  | | XMPToolkit = Adobe XMP Core 9.0-c001 79.c0204b2, 2023/02/09-06:26:14        
  | | CreatorTool = Adobe Photoshop 24.5 (Windows)
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmp:CreatorTool'
  | | CreateDate = 2023-06-20T09:18:29+05:30
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmp:CreateDate'
  | | ModifyDate = 2023-06-20T09:32:46+05:30
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmp:ModifyDate'
  | | MetadataDate = 2023-06-20T09:32:46+05:30
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmp:MetadataDate'
  | | Format = image/tiff
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/dc:format'
  | | ColorMode = 3
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/photoshop:ColorMode'
  | | InstanceID = xmp.iid:92ac0d0e-d3f1-b74e-abd9-35326db1ffff
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:InstanceID'
  | | DocumentID = adobe:docid:photoshop:960a4e52-2d04-8143-b9e9-3b3bc51387de
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:DocumentID'
  | | OriginalDocumentID = xmp.did:91abf09a-bf34-4147-894d-25d4fddb001a
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:OriginalDocumentID'
  | | HistoryAction = created
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 10/stEvt:action'
  | | HistoryInstanceID = xmp.iid:91abf09a-bf34-4147-894d-25d4fddb001a
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 10/stEvt:instanceID'
  | | HistoryWhen = 2023-06-20T09:18:29+05:30
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 10/stEvt:when'
  | | HistorySoftwareAgent = Adobe Photoshop 24.5 (Windows)
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 10/stEvt:softwareAgent'
  | | HistoryAction = saved
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 11/stEvt:action'
  | | HistoryInstanceID = xmp.iid:92ac0d0e-d3f1-b74e-abd9-35326db1ffff
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 11/stEvt:instanceID'
  | | HistoryWhen = 2023-06-20T09:32:46+05:30
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 11/stEvt:when'
  | | HistorySoftwareAgent = Adobe Photoshop 24.5 (Windows)
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 11/stEvt:softwareAgent'
  | | HistoryChanged = /
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmpMM:History/rdf:Seq/rdf:li 11/stEvt:changed'
  | | ImageWidth = 3400
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:ImageWidth'
  | | ImageHeight = 2411
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:ImageLength'
  | | BitsPerSample = 8
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:BitsPerSample/rdf:Seq/rdf:li 10'
  | | Compression = 1
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:Compression'
  | | PhotometricInterpretation = 2
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:PhotometricInterpretation'
  | | Orientation = 1
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:Orientation'
  | | SamplesPerPixel = 4
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:SamplesPerPixel'
  | | XResolution = 3000000/10000
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:XResolution'
  | | YResolution = 3000000/10000
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:YResolution'
  | | ResolutionUnit = 2
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/tiff:ResolutionUnit'
  | | ColorSpace = 65535
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:ColorSpace'
  | | ExifImageWidth = 3400
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:PixelXDimension'
  | | ExifImageHeight = 2411
  | | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/exif:PixelYDimension'
  | 20) PhotoshopSettings (SubDirectory) -->
  |     - Tag 0x8649 (8918 bytes, int8u[8918] read as undef[8918]):
  |         40d4: 38 42 49 4d 04 25 00 00 00 00 00 10 00 00 00 00 [8BIM.%..........]
  |         40e4: 00 00 00 00 00 00 00 00 00 00 00 00 38 42 49 4d [............8BIM]
  |         40f4: 04 3a 00 00 00 00 00 e5 00 00 00 10 00 00 00 01 [.:..............]
  |         4104: 00 00 00 00 00 0b 70 72 69 6e 74 4f 75 74 70 75 [......printOutpu]
  |         4114: 74 00 00 00 05 00 00 00 00 50 73 74 53 62 6f 6f [t........PstSboo]
  |         [snip 8838 bytes]
  | + [Photoshop directory, 8918 bytes]
  | | IPTCDigest = 
  | | - Tag 0x0425 (16 bytes):
  | |     40e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | PrintInfo2 = ...printOutput.PstSbool.InteenumInteClrm.printSixteenBitbool.printer[snip]
  | | - Tag 0x043a (229 bytes):
  | |     40fc: 00 00 00 10 00 00 00 01 00 00 00 00 00 0b 70 72 [..............pr]
  | |     410c: 69 6e 74 4f 75 74 70 75 74 00 00 00 05 00 00 00 [intOutput.......]
  | |     411c: 00 50 73 74 53 62 6f 6f 6c 01 00 00 00 00 49 6e [.PstSbool.....In]
  | |     412c: 74 65 65 6e 75 6d 00 00 00 00 49 6e 74 65 00 00 [teenum....Inte..]
  | |     413c: 00 00 43 6c 72 6d 00 00 00 0f 70 72 69 6e 74 53 [..Clrm....printS]
  | |     [snip 149 bytes]
  | | PrintStyle = ...printOutputOptions.CptnboolClbrboolRgsMboolCrnCboolCntCboolLblsbo[snip]
  | | - Tag 0x043b (557 bytes):
  | |     41ee: 00 00 00 10 00 00 00 01 00 00 00 00 00 12 70 72 [..............pr]
  | |     41fe: 69 6e 74 4f 75 74 70 75 74 4f 70 74 69 6f 6e 73 [intOutputOptions]
  | |     420e: 00 00 00 17 00 00 00 00 43 70 74 6e 62 6f 6f 6c [........Cptnbool]
  | |     421e: 00 00 00 00 00 43 6c 62 72 62 6f 6f 6c 00 00 00 [.....Clbrbool...]
  | |     422e: 00 00 52 67 73 4d 62 6f 6f 6c 00 00 00 00 00 43 [..RgsMbool.....C]
  | |     [snip 477 bytes]
  | | ResolutionInfo (SubDirectory) -->
  | | - Tag 0x03ed (16 bytes):
  | |     4428: 01 2c 00 00 00 01 00 01 01 2c 00 00 00 01 00 01 [.,.......,......]
  | | + [BinaryData directory, 16 bytes]
  | | | XResolution = 19660800
  | | | - Tag 0x0000 (4 bytes, int32u[1]):
  | | |     4428: 01 2c 00 00                                     [.,..]
  | | | DisplayedUnitsX = 1
  | | | - Tag 0x0002 (2 bytes, int16u[1]):
  | | |     442c: 00 01                                           [..]
  | | | YResolution = 19660800
  | | | - Tag 0x0004 (4 bytes, int32u[1]):
  | | |     4430: 01 2c 00 00                                     [.,..]
  | | | DisplayedUnitsY = 1
  | | | - Tag 0x0006 (2 bytes, int16u[1]):
  | | |     4434: 00 01                                           [..]
  | | PrintScaleInfo (SubDirectory) -->
  | | - Tag 0x0426 (14 bytes):
  | |     4444: 00 00 00 00 00 00 00 00 00 00 3f 80 00 00       [..........?...]
  | | + [BinaryData directory, 14 bytes]
  | | | PrintStyle = 0
  | | | - Tag 0x0000 (2 bytes, int16u[1]):
  | | |     4444: 00 00                                           [..]
  | | | PrintPosition = 0 0
  | | | - Tag 0x0002 (8 bytes, float[2]):
  | | |     4446: 00 00 00 00 00 00 00 00                         [........]
  | | | PrintScale = 1
  | | | - Tag 0x000a (4 bytes, float[1]):
  | | |     444e: 3f 80 00 00                                     [?...]
  | | AlphaChannelsNames = .Alpha 1
  | | - Tag 0x03ee (8 bytes):
  | |     445e: 07 41 6c 70 68 61 20 31                         [.Alpha 1]
  | | UnicodeAlphaNames = .Alpha 1
  | | - Tag 0x0415 (20 bytes):
  | |     4472: 00 00 00 08 00 41 00 6c 00 70 00 68 00 61 00 20 [.....A.l.p.h.a. ]
  | |     4482: 00 31 00 00                                     [.1..]
  | | DisplayInfo = ...2.
  | | - Tag 0x0435 (17 bytes):
  | |     4492: 00 00 00 01 00 00 ff ff 00 00 00 00 00 00 00 32 [...............2]
  | |     44a2: 01                                              [.]
  | | AlphaIdentifiers = .
  | | - Tag 0x041d (4 bytes):
  | |     44b0: 00 00 00 04                                     [....]
  | | GlobalAngle = .
  | | - Tag 0x040d (4 bytes):
  | |     44c0: 00 00 00 1e                                     [....]
  | | GlobalAltitude = .
  | | - Tag 0x0419 (4 bytes):
  | |     44d0: 00 00 00 1e                                     [....]
  | | PrintFlags = 0 0 0 0 0 0 0 0 1
  | | - Tag 0x03f3 (9 bytes, int8u[9]):
  | |     44e0: 00 00 00 00 00 00 00 00 01                      [.........]
  | | PrintFlagsInfo = ..
  | | - Tag 0x2710 (10 bytes):
  | |     44f6: 00 01 00 00 00 00 00 00 00 01                   [..........]
  | | ColorHalftoningInfo = /ff.lff../ff......2.Z..5.-..
  | | - Tag 0x03f5 (72 bytes):
  | |     450c: 00 2f 66 66 00 01 00 6c 66 66 00 06 00 00 00 00 [./ff...lff......]
  | |     451c: 00 01 00 2f 66 66 00 01 00 a1 99 9a 00 06 00 00 [.../ff..........]
  | |     452c: 00 00 00 01 00 32 00 00 00 01 00 5a 00 00 00 06 [.....2.....Z....]
  | |     453c: 00 00 00 00 00 01 00 35 00 00 00 01 00 2d 00 00 [.......5.....-..]
  | |     454c: 00 06 00 00 00 00 00 01                         [........]
  | | ColorTransferFuncs = ............................................................[snip]
  | | - Tag 0x03f8 (112 bytes):
  | |     4560: 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff [................]
  | |     4570: ff ff ff ff ff ff ff ff 03 e8 00 00 00 00 ff ff [................]
  | |     4580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [................]
  | |     4590: ff ff ff ff 03 e8 00 00 00 00 ff ff ff ff ff ff [................]
  | |     45a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [................]
  | |     [snip 32 bytes]
  | | GridGuidesInfo = ..@.@
  | | - Tag 0x0408 (16 bytes):
  | |     45dc: 00 00 00 01 00 00 02 40 00 00 02 40 00 00 00 00 [.......@...@....]
  | | Photoshop_0x0444 = ..@.@
  | | - Tag 0x0444 (16 bytes):
  | |     45f8: 00 00 00 02 00 00 02 40 00 00 02 40 00 00 00 00 [.......@...@....]
  | | URL_List = 
  | | - Tag 0x041e (4 bytes):
  | |     4614: 00 00 00 00                                     [....]
  | | SliceInfo (SubDirectory) -->
  | | - Tag 0x041a (837 bytes):
  | |     4624: 00 00 00 06 00 00 00 00 00 00 00 00 00 00 09 6b [...............k]
  | |     4634: 00 00 0d 48 00 00 00 08 00 30 00 32 00 34 00 34 [...H.....0.2.4.4]
  | |     4644: 00 34 00 33 00 34 00 39 00 00 00 01 00 00 00 00 [.4.3.4.9........]
  | |     4654: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 [................]
  | |     4664: 00 00 00 00 00 00 00 00 00 00 0d 48 00 00 09 6b [...........H...k]
  | |     [snip 757 bytes]
  | | + [BinaryData directory, 837 bytes]
  | | | SlicesGroupName = 02444349
  | | | - Tag 0x0014 (16 bytes, ustr32[16]):
  | | |     463c: 00 30 00 32 00 34 00 34 00 34 00 33 00 34 00 39 [.0.2.4.4.4.3.4.9]
  | | | NumSlices = 1
  | | | - Tag 0x0018 (4 bytes, int32u[1]):
  | | |     464c: 00 00 00 01                                     [....]
  | | PixelInfo (SubDirectory) -->
  | | - Tag 0x0428 (12 bytes):
  | |     4976: 00 00 00 02 3f f0 00 00 00 00 00 00             [....?.......]
  | | + [BinaryData directory, 12 bytes]
  | | | PixelAspectRatio = 1
  | | | - Tag 0x0004 (8 bytes, double[1]):
  | | |     497a: 3f f0 00 00 00 00 00 00                         [?.......]
  | | ICC_Untagged = 1
  | | - Tag 0x0411 (1 bytes, int8u[1]):
  | |     498e: 01                                              [.]
  | | IDsBaseValue = 4
  | | - Tag 0x0414 (4 bytes, int32u[1]):
  | |     499c: 00 00 00 04                                     [....]
  | | PhotoshopThumbnail = ..q.............Adobe_CM....Adobed..........................[snip]
  | | - Tag 0x040c (2081 bytes):
  | |     49ac: 00 00 00 01 00 00 00 9f 00 00 00 71 00 00 01 e0 [...........q....]
  | |     49bc: 00 00 d3 e0 00 00 08 05 00 18 00 01 ff d8 ff ed [................]
  | |     49cc: 00 0c 41 64 6f 62 65 5f 43 4d 00 02 ff ee 00 0e [..Adobe_CM......]
  | |     49dc: 41 64 6f 62 65 00 64 80 00 00 00 01 ff db 00 84 [Adobe.d.........]
  | |     49ec: 00 0c 08 08 08 09 08 0c 09 09 0c 11 0b 0a 0b 11 [................]
  | |     [snip 2001 bytes]
  | | VersionInfo (SubDirectory) -->
  | | - Tag 0x0421 (87 bytes):
  | |     51da: 00 00 00 01 01 00 00 00 0f 00 41 00 64 00 6f 00 [..........A.d.o.]
  | |     51ea: 62 00 65 00 20 00 50 00 68 00 6f 00 74 00 6f 00 [b.e. .P.h.o.t.o.]
  | |     51fa: 73 00 68 00 6f 00 70 00 00 00 14 00 41 00 64 00 [s.h.o.p.....A.d.]
  | |     520a: 6f 00 62 00 65 00 20 00 50 00 68 00 6f 00 74 00 [o.b.e. .P.h.o.t.]
  | |     521a: 6f 00 73 00 68 00 6f 00 70 00 20 00 32 00 30 00 [o.s.h.o.p. .2.0.]
  | |     522a: 32 00 33 00 00 00 01                            [2.3....]
  | | + [BinaryData directory, 87 bytes]
  | | | HasRealMergedData = 1
  | | | - Tag 0x0004 (1 bytes, int8u[1]):
  | | |     51de: 01                                              [.]
  | | | WriterName = Adobe Photoshop
  | | | - Tag 0x0005 (30 bytes, ustr32[30]):
  | | |     51e3: 00 41 00 64 00 6f 00 62 00 65 00 20 00 50 00 68 [.A.d.o.b.e. .P.h]
  | | |     51f3: 00 6f 00 74 00 6f 00 73 00 68 00 6f 00 70       [.o.t.o.s.h.o.p]
  | | | ReaderName = Adobe Photoshop 2023
  | | | - Tag 0x0009 (40 bytes, ustr32[40]):
  | | |     5205: 00 41 00 64 00 6f 00 62 00 65 00 20 00 50 00 68 [.A.d.o.b.e. .P.h]
  | | |     5215: 00 6f 00 74 00 6f 00 73 00 68 00 6f 00 70 00 20 [.o.t.o.s.h.o.p. ]
  | | |     5225: 00 32 00 30 00 32 00 33                         [.2.0.2.3]
  | | PathSelectionState = ..null.nullobj .prop.PathWrPt
  | | - Tag 0x0440 (64 bytes):
  | |     523e: 00 00 00 10 00 00 00 01 00 00 00 00 00 00 6e 75 [..............nu]
  | |     524e: 6c 6c 00 00 00 01 00 00 00 00 6e 75 6c 6c 6f 62 [ll........nullob]
  | |     525e: 6a 20 00 00 00 01 70 72 6f 70 00 00 00 01 00 00 [j ....prop......]
  | |     526e: 00 00 00 00 50 61 74 68 00 00 00 00 57 72 50 74 [....Path....WrPt]
  | | WorkingPath = ..J..$....K$...b.$...]..'1...).1.X...... .6.....?...d.D]...k.K.....[snip]
  | | - Tag 0x0401 (2002 bytes):
  | |     528a: 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | |     529a: 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 [................]
  | |     52aa: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | |     52ba: 00 00 00 00 00 00 00 4a 00 00 00 01 00 00 00 00 [.......J........]
  | |     52ca: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 [................]
  | |     [snip 1922 bytes]
  | | Photoshop_0x07d0 = ..P...%D..G.%D..G.%D..G..<.....<.....<......Vn7q..Vn7q..Vn7q..[snip]
  | | - Tag 0x07d0, Name="Path 1" (2158 bytes):
  | |     5a6e: 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | |     5a7e: 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 [................]
  | |     5a8e: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | |     5a9e: 00 00 00 00 00 00 00 50 00 01 00 01 00 00 00 00 [.......P........]
  | |     5aae: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 [................]
  | |     [snip 2078 bytes]
  | | OriginPathInfo = ..null..keyRootDescriptorListVlLs.Objc.null..keyDescriptorListVl[snip]
  | | - Tag 0x0bb8, Name="OriginDataIRB" (182 bytes):
  | |     62f4: 00 00 00 10 00 00 00 01 00 00 00 00 00 00 6e 75 [..............nu]
  | |     6304: 6c 6c 00 00 00 01 00 00 00 15 6b 65 79 52 6f 6f [ll........keyRoo]
  | |     6314: 74 44 65 73 63 72 69 70 74 6f 72 4c 69 73 74 56 [tDescriptorListV]
  | |     6324: 6c 4c 73 00 00 00 01 4f 62 6a 63 00 00 00 01 00 [lLs....Objc.....]
  | |     6334: 00 00 00 00 00 6e 75 6c 6c 00 00 00 01 00 00 00 [.....null.......]
  | |     [snip 102 bytes]
  | 21) ExifOffset (SubDirectory) -->
  |     - Tag 0x8769 (4 bytes, int32u[1]):
  |         010e: ac 14 20 00                                     [.. .]
  | + [ExifIFD directory with 3 entries]
  | | 0)  ColorSpace = 65535
  | |     - Tag 0xa001 (2 bytes, int16u[1]):
  | |       2014b6: ff ff                                           [..]
  | | 1)  ExifImageWidth = 3400
  | |     - Tag 0xa002 (4 bytes, int32u[1]):
  | |       2014c2: 48 0d 00 00                                     [H...]
  | | 2)  ExifImageHeight = 2411
  | |     - Tag 0xa003 (4 bytes, int32u[1]):
  | |       2014ce: 6b 09 00 00                                     [k...]


您也可以使用ImageMagick检测剪切路径的存在:

magick identify -verbose YOURIMAGE.TIF


您可以使用以下命令将剪辑路径提取到SVG:

magick identify -format '%[8BIM:1999,2998:#1]' 20235976.tif > clip.svg

相关问题