Jump to content
You must now use your email address to sign in [click for more info] ×

Tiff being saved as IBM-PC byte order (yuk!)


GFS

Recommended Posts

Hello GFS,

As far as I know the byte order shouldn't be an issue with TIFF files these days like it could sometimes be 15+ years or so back. At least I've never had any issues with byte orders when working with TIFF's now.
Unless the file is being opened on an old Mac with legacy software, then it might still be an issue possibly.
I would think you could probably skip the conversion if you wanted. Maybe try it and see.

macOS 10.15.7  15" Macbook Pro, 2017  |  4 Core i7 3.1GHz CPU  |  Radeon Pro 555 2GB GPU + Integrated Intel HD Graphics 630 1.536GB  |  16GB RAM  |  Wacom Intuos4 M

Link to comment
Share on other sites

Yes it is for use on an old Mac.  The thing is, Affinity Photo is Mac only software, so why not just ensure that it is in Mac format anyway and keep us weirdos happy. :)

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

There is no such thing as a "mac format". Actually, the mac format IS the PC byte order. Because like it or not, the "PC" byte order is correct. The weird, old powerpc big endian stuff isn't sane in a fileformat that we export for use on windows, intel macs, linux, ios, android etc.

 

Yer gonna have to keep converting manually if you want this to run on powerpc macs. THEY are the weird ones with their weird cpus and weird byte order. ;)

Link to comment
Share on other sites

The TIFF image file header instructs the application about endianness of their internal binary integers. If a file starts with the signature "MM" it means that integers are represented as big-endian, while "II" means little-endian. Those signatures need a single 16-bit word each, and they are palindromes (that is, they read the same forwards and backwards), so they are endianness independent. "I" stands for Intel and "M" stands for Motorola, the respective CPU providers of the IBM PC compatibles (Intel) and Apple Macintosh platforms (Motorola) in the 1980s. Intel CPUs are little-endian, while Motorola 680x0 CPUs are big-endian. This explicit signature allows a TIFF reader program to swap bytes if necessary when a given file was generated by a TIFF writer program running on a computer with a different endianness.

 

^ So as long as Affinity outputs "II" in the header to denote intel-order, then the fault is entirely with the viewer applications on your powerpc mac. And I would assume Affinity does the header correctly, otherwise we wouldn't be able to view the files on any systems that read the byte order header.

Link to comment
Share on other sites

Hi aitte and many thanks for the comprehensive explanation.

 

I now understand why this happens with some apps.  However, it seems that the more Mac focussed apps still cater to the difference, perhaps because they just never changed the legacy code?

 

Photoshop is one of these, as are the Apple apps, e.g. Aperture.  So clearly these other apps are doing something that enable tiffs to be read by MM machines *as well as* II machines?  Or am I misunderstanding?  PS actually offers the choice every time you Save As a tiff, but 'Mac' is always already selected in the dialog box *unless* the tiff was made by Affinity or some of the very much 'cross-platform' apps, written in weird java style languages or primarily for PC (they always have a look) e.g. Helicon Focus.  Aperture exported tiffs open fine on either MM or II.

 

I might also point out, that Apple's own *brand new* Photos app, exports tiffs that can be opened without any difficulty on legacy hardware, so clearly, there is something that Affinity is not doing when exporting tiffs (actually there's quite a lot when you look at the state of the alpha channels too).

 

I realise there are few of us working with old apps/hardware (but I do so for a real reason) and it seems a shame to close the door on compatibility at this stage of development ... the devil is always in the details.

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

An MM machine can read an II file and vice versa. They just need to see the header, and if it's different from their own CPU, they flip the bytes in RAM before decoding the file (so they basically convert it from II to MM or vice versa).

 

If a powerpc app cannot read an II file it just means that the app isn't doing the conversion from intel->powerpc when needed. Which is indeed a possible bug in some old powerpc apps.

 

I wonder if Apple Photos always outputs MM files to work around that potential bug. Wouldn't surprise me, since Apple would care about powerpc compatibility.

 

 

The affinity devs would need to check this:

* If you output a TIFF, does it use little endian or big endian? And does it use the proper II or MM header to match the data order?

 

* If it's outputting little endian (intel order) with an II header then everything is correct, and the bug is in the powerpc apps.

 

* In that case, consider using MM order. But powerpc is like <1% of the mac market so maybe stick with intel order so that intel machines don't have to waste time flipping the bytes just to accomodate old machines that can be taken care of by an external file converter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.