Skip to content

Issue #7549 (Part 2): Import IBM PC Formatted TIFF layers

Alx Sa requested to merge alxsa-ibm-format-tiff-layers into master

As noted in #7549 (comment 1720463), the current PSD metadata import function only supports "Macintosh Format" TIFF layers. Many TIFFs are saved in "IBM PC Format" instead.

According to this document, the main difference is that all labels are reversed (8BIM becomes MIB8, Layr becomes ryaL, etc) and integers are stored in Little Endian format as opposed to Big Endian.

This patch attempts to add support for IBM PC Format metadata with the following changes:

  • Check for 'MIB8' in the resource loading functions, reverse labels, and set a new boolean value 'ibm_pc_format'
  • Based on this plug-in, conditionally decide whether to call GINT32_FROM_BE () or GINT32_FROM_LE () on integer values

Sample files in both formats: SampleFiles.zip

Feedback on the structure is appreciated!

Merge request reports