Jump to content
HaDAk

[Fixed] Layered tiff opened improperly

Recommended Posts

In short - we do not currently handle layered TIFF files.  "Layered TIFF" is actually an Adobe hack - it is not a part of the actual TIFF standard, which has no concept of layers.

 

We will be looking at importing these in the future, and adding our own handling for layers in TIFF.  Right now, you will only get to see the flattened version of the file that Photoshop wrote out.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Apple Preview can't make much out of this file either.  Right now, until I look into the Adobe hack more, I don't know what Adobe chooses to write out for the normal part of the TIFF.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

In short - we do not currently handle layered TIFF files.  "Layered TIFF" is actually an Adobe hack - it is not a part of the actual TIFF standard, which has no concept of layers.

I don't believe that's correct. Adobe owns and controls the TIFF format like PSD and DNG. TIFF is an openly documented file format. Are you saying that the TIFF spec doesn't provide how  you could produce TIFFs with layers?

It would be really great if your product could both support TIFF with layers as you do with PSD you pay to support, and export PSD's or TIFFs with layers. 

Share this post


Link to post
Share on other sites

That is correct.  The layer data is actually Adobe proprietary data, based on the PSD format, and it is only correctly handled by Photoshop (essentially it's PSD stub data embedded in the TIFF).  If we import it, it'll be subject to the same conditions we have for PSD import in general.

I've not found documentation for it as such - the only clues are in looking at the tags reserved under the TIFF spec.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

That is correct.  The layer data is actually Adobe proprietary data, based on the PSD format, and it is only correctly handled by Photoshop (essentially it's PSD stub data embedded in the TIFF).  If we import it, it'll be subject to the same conditions we have for PSD import in general.

I've not found documentation for it as such - the only clues are in looking at the tags reserved under the TIFF spec.

 

http://www.digitalpreservation.gov/formats/fdd/fdd000072.shtml

ISO 12639:2004 specifies a media-independent means for prepress electronic data exchange using a tag image file format (TIFF). It defines image file formats for encoding color continuous-tone picture images (CT), color line-art images (LW), high-resolution continuous-tone images (HC), monochrome continuous-tone picture images (MP), binary picture images (BP), binary line-art images (BL), screened data (SD), and images of composite final pages (FP). The FP subtype provides a mechanism for creating a package that includes separate image layers (of types CT, LW, etc.) to be combined to create the final printed image.

 

So you can support proprietary Adobe Layers as specified in PSD (which you pay to do) but not TIFF? 

 

EDIT: here's what you're looking for? 

https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/

Share this post


Link to post
Share on other sites

@AndrewRodney

 

Thank you - I do already have the link to the PSD file format.

 

There are two extra tags in a TIFF that Adobe uses to add their proprietary layer data to a TIFF file.  They are reserved for Adobe, and the site that details the list of reserved tags identifies them, but does not describe them.

They are also not a simple embedded PSD.  The data is subtly different. And, as with every other aspect of the PSD format documentation, the details are not correctly described.  The layer information that Adobe embeds is also not pure raster data - it includes layer effects, adjustments, etc.

 

http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml#table_1 lists reserved TIFF tags - the Photoshop ones are describe as "private" - no explanation of what the data is is given.

 

See http://www.awaresystems.be/imaging/tiff/tifftags/private.html for a list of these private undocumented TIFF tags.

 

The file format specification you link is so full of errors and omissions it is impossible (I repeat, impossible) to implement a PSD import or exporter purely from that documentation.  A cynical move I suggest by a company that was legally forced to document their own file format - do as you're told, but make sure it's not particularly helpful.

 

 

...and what do you mean by "which you pay to do"?


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

According to an Adobe Photoshop engineer I spoke with, more programs can read the layers in PSDs than can read the layers in TIFFs but the later is possible and has been done. If there are specific questions or issues you have, I'd be happy to attempt to get them cleared up. This engineer made it pretty clear there are app's that can read layered TIFFs so it isn't impossible. Since you've found how how to read layered PSD's, it seems possible to do the same with TIFFs. Do you want to?  :) 

 

The bit about paying was licensing for PSD support which this engineer told me isn't the case (any more?). I'm under the impression at one time, those who wanted to read and write PSD's needed to license this from Adobe. In any case, it appears if this engineer is correct (and he's up there on the team), you can read and write layered TIFFs. 

 

It's quite amazing how you've been able to handle layered PSDs! I'll refrain from asking about PSB. Considering the migration from Adobe for reasons we don't need to get into, if Affinity Photo could support layered TIFFs, the better chance you'll land former Photoshop customers! Many of us do not want to use PSD for reasons we can go into if you wish. If you can supported Layered TIFFs, you'll get more customers. 

Share this post


Link to post
Share on other sites

We import PSB also.

 

We have the framework for writing PSB, but a little more work is being done on that.

 

I'd also be interested to see the list of apps that handle the Adobe tags in a TIFF - I've not found any yet.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

We import PSB also.

 

We have the framework for writing PSB, but a little more work is being done on that.

 

I'd also be interested to see the list of apps that handle the Adobe tags in a TIFF - I've not found any yet.

Impressive. Even Lightroom doesn't support PSB which is kind of shocking. 

Let me see what I can find out about other layered TIFF support products. I do have to be somewhat politically careful if you read between the lines. IF layered TIFF support is possible and documented some place, I'll do my best to get you more information. 

Share this post


Link to post
Share on other sites

 

I'd also be interested to see the list of apps that handle the Adobe tags in a TIFF - I've not found any yet.

Here's one that suggest it does:

 

http://www.kolor.com/wiki-en/action/view/Autopano_-_FAQ_-_Using_the_software

 

What graphical formats are supported in output of Autopano Pro and Autopano Giga?

Autopano Giga can export your stitched images in the following formats:
JPG/JPEG (.jpg, .jpeg)
HDR Radiance (.hdr)
PNG (.png)
PSD/PSB including the layers (.psd, .psb)
TIFF including the layers (.tiff, .tif)

Share this post


Link to post
Share on other sites

Layered TIFF *import* may be coming in a Beta soon.

 

There will be some limitations however - since it is essentially PSD type data, it is performed in the same way as our PSD import.  That means that the source layers will be converted where necessary.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Layered TIFF *import* may be coming in a Beta soon.

 

There will be some limitations however - since it is essentially PSD type data, it is performed in the same way as our PSD import.  That means that the source layers will be converted where necessary.

Can't wait to test it out, thanks!

Share this post


Link to post
Share on other sites

Layered TIFF *import* may be coming in a Beta soon.

 

There will be some limitations however - since it is essentially PSD type data, it is performed in the same way as our PSD import.  That means that the source layers will be converted where necessary.

That sounds awesome.  Can't wait to see this :)

Share this post


Link to post
Share on other sites

I'm curious why a layered TIFF is preferable to a layered PSD. I avoid them like the plague. They used to give us terrible separation results at repro (15 years ago) in both Quark and FreeHand, and I have never touched them since.

 

They had a wonderful feature that allowed them to support an alpha channel simulating transparency before the transparency in a layered PSD file was supported. It looked wonderful on screen, but the output results were shocking (it seemed to mess with the under colour removal and posterised the black plate in the image.)

Share this post


Link to post
Share on other sites

Interesting links.  I think there is a little inaccuracy in the TiffvsPSD doc though.  They keep talking about "flattened layers" - its not flattened at all.  There is a flattened composite version of the document stored as the main TIFF image. This is similar to the flattened image from a PSD - all pixel data is baked and blend modes reduced.

 

I've spent enough time (years in fact) looking at file formats, and I can tell you that the "layers" in a TIFF are just the same data as saved in a PSD.  In reality, it's still a PSD, just stored in TIFF tagged format, though with a slight differences compared to a normal PSD.  This means that older apps can just open it as a old school TIFF, but any app willing to have a go at the PSD data can load the source layers.  This has the obvious implication that the PSD format has to be interpreted.  This data is Adobe proprietary, and so there will be no 3rd party app that can reproduce the exact same composited image as Photoshop using the layer data.  So, handling a layered TIFF will depend on the quality of that app's PSD importer (something we believe we do well).

 

We will be supporting layered TIFF very soon.  I have it working, and will be out for Beta in the near(ish) future.  We can import PSD layers from a TIFF (subject to the same caveats as our PSD importer).  We will also be offering the ability to save Affinity layers when exporting TIFF files so that anyone working with a DAM using TIFFs can maintain their image layers.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Interesting links.  I think there is a little inaccuracy in the TiffvsPSD doc though.  They keep talking about "flattened layers" - its not flattened at all.  There is a flattened composite version of the document stored as the main TIFF image. This is similar to the flattened image from a PSD - all pixel data is baked and blend modes reduced.

 

I've spent enough time (years in fact) looking at file formats, and I can tell you that the "layers" in a TIFF are just the same data as saved in a PSD. 

Of course it's the same data and hence why we need support in this product. The differences are TIFF is an openly documented format, PSD really isn't. There are far, far more products that can access a TIFF (flattened or otherwise) than PSD. PSD provides zero advantages to most users over TIFF (now if you want to get into compatibility with other Adobe products like InDesign, that's a tad different). We of course need support for layered TIFFs as much, perhaps more than layered PSDs. As Jeff Schewe writes, if the Photoshop team had a say, PSD would go the way of the dodo bird. 

 

Let's put it this way: If Affinity fully supported layered TIFFs but not PSD, I don't think it would be as big a deal as the other way around. Better yet, support the two the same way with the same functionality. 

Share this post


Link to post
Share on other sites

There is no such thing as "layered TIFF" in a global sense - it's an Adobe thing only.  Anyone who handles layered TIFF generated by Photoshop is just reading out PSD data from the TIFF.  Therefore, there is no advantage of PSD over TIFF or visa versa if you want to maintain your image layers.  It's the same data!

 

We support PSD import, and use the same code to import layers from TIFFs - this is then just interpreted as a standard PSD and imported in the same way.  There is no concept of "fully supported" - we import and convert the data into Affinity format. It'll be the same for any third party app - the results are only as good as their PSD importer... unless they just deal with the flattened image.

 

I am also not at all sure that the Photoshop team would dismiss the PSD format.  It is their apps native format, and as such always saves the full document without the user needing to be concerned about what data is saved.  The TIFF addition is only ever presented as an option, since the TIFF format has much wider use and the Adobe layer data is still proprietary - while the TIFF tag is listed, there is no official description of the data.  There is nowhere that Adobe states that this data is based on the PSD format - that is something that people have just worked out for themselves.  Since the PSD format is also not completely documented, no one can promise to "fully support" layered TIFF.  The process or import/export for most third party apps will degrade the PSD data (at least for anything other than simple raster layers).

 

What we are not going to do is provide round trip loading/saving of layered TIFF in PSD format - it'd be no different to offering re-saving to PSD files, which we do not offer (we only offer export to PSD due to the technology issues resulting from the export process - it needs to be a clear conscious decision to save back to a PSD file rather than maintaining an Affinity file).  We will offer opening of a TIFF with layer data, and import this using our standard PSD importer.  The imported file then becomes Affinity data.  You can save to a .af file and maintain your layered document (and optional history).

We will also allow you to export a TIFF with Affinity layers.  That TIFF can then be reopened in Affinity, and saved again as a TIFF while preserving Affinity layers.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

What we are not going to do is provide round trip loading/saving of layered TIFF in PSD format - it'd be no different to offering re-saving to PSD files, which we do not offer (we only offer export to PSD due to the technology issues resulting from the export process - it needs to be a clear conscious decision to save back to a PSD file rather than maintaining an Affinity file).  We will offer opening of a TIFF with layer data, and import this using our standard PSD importer.  The imported file then becomes Affinity data.  You can save to a .af file and maintain your layered document (and optional history).

We will also allow you to export a TIFF with Affinity layers.  That TIFF can then be reopened in Affinity, and saved again as a TIFF while preserving Affinity layers.

That's all I've asked for (thanks). Treat a layered TIFF from Photoshop as a first class citizen as you do PSD. After that, time to move forward with that data in your product. 

Share this post


Link to post
Share on other sites

Very interesting. Thanks for the links, though they really don't make TIFFs shine in the way they have been revered in this forum.

 

 

If I understand it, the argument for TIFF over PSD seems largely hinged on open Vs propriety formats rather than any particular technology or functionality.

 

There might be greater backward compatibility, but the support seems to be limited to the flattened content within the layered TIFF which I understand to be "Traditional, flat TIFFs have greater backward compatibility" and "Layered TFFs are the same as layered PSDs".

 

When I look at the workflow within the Adobe suite, the support & sheer productivity afforded by the native PSD leaves the TIFF option in the dust. I also can't think of a single graphic app on my Mac that doesn't support PSD so even non-Adobe companies seem to consider PSD as today's standard, just like a PDF or Illustrator file for importing & exporting.

 

It also seems that TIFF's technology has not been updated any time recently so I would have reservations about the support of modern technologies like non-destructive layer effects.

 

 

It seems that support is coming, but I hardly see this as a critical feature that should prevent someone from using Affinity products, or even displace the integration of other, more important features. Sorry.

 

(Personally, I'd rather have the ability to save back the original file format rather than always saving to Affinity's native format and exporting other formats. Let me open a PSD, tweak it and just hit save when I close it – now that would be more useful.)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×