Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Save tiff with unassociated alpha

Community Beginner ,
Jul 25, 2019 Jul 25, 2019

Hello, from what i can gather, TIFF supports both associated and unassociated alpha.  However I can't seem to get photoshop to save unassociated, its always premultiplied.  Is there a tick to this or a specific combination of save options to get this to work?  Does photoshop support this at all?

For example, if i have a PSD with a a few layers and no background layer (so there is transparency) and no explicit alpha channel, how would i get this to save as a flattened tiff with unassociated alpha (not premultiplied)

Thanks!

4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jul 26, 2019 Jul 26, 2019

ok, using ImageMagick to do the conversion results in a correct RGBA tiff image with no options:

convert foo.psd tiff.psd

I'm assuming photoshop is trying to figure out what you want and assuming if there is transparency, you meant that to be in the alpha channel and premultiplies it for you.  Whats frustrating is that there is no override for this even in scripting.  Its technically incorrect behavior, but i get why PS is doing it.  Just wish there was an option to not.

Translate
Adobe
Community Expert ,
Jul 25, 2019 Jul 25, 2019

[Hoping I understand you correctly] If you are using Windows, you can install a 32-bit version of Photoshop 2018 or before, which you can get here:Download Creative Cloud apps. Then install a free plugin, Telegraphics' Filter Foundry: Telegraphics - Free plugins for Photoshop & Illustrator...and other software , which is a functional equivalent of Photoshop's old Filter factory plugin. This offers the only way I know of to directly manipulate Photoshop transparency. It is only available for 32-Bit Photoshop, and there are no plans to update it (Alas). A good resource for this tool is Werner D. Streidt's Filter Factory Programming Guide

Here's a small image with three layers:

    

structure like so:

    

Merge the layers, and Select > Load Selection, Channel = Layer Transparency, Invert = Checked. Then, Select > Save Selection, and De-select:

    

You could also do this without merging the layers, by doing the above for each layer, selecting the "Intersect with selection" option in the dialog.

Open the Filter Foundry from the Filters menu, and type 255 in the A (transparency) field:

    

This makes every pixel completely opaque:

    

The save as a TIFF, including the Alpha channel.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2019 Jul 26, 2019

Theres no way to get that magic dilated pixel stuff for free when saving a tiff?  It looks like psds do it somehow.  Im trying to find a seamless/simple solution while saving a tiff from a psd

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2019 Jul 25, 2019

Straight Alpha Channels in photoshop:

Straight Alpha Channels - YouTube

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2019 Jul 26, 2019

Thank you for the link, but i don't think that does the same thing.  Its still premultiplying the alpha, just onto black instead of white.

My target is untiy so it gives a good view of the rgb and a channels.  If i save a psd an import it shows the rgb pixels are stretch/expanded at the edgesso when the alpha channel is applied, the correct color is used for transparency.  If I save the same psd as a tif, then import i dont get that stretch/expand from the edge pixels, so when the alpha channel is applied it gets the color of whatever the background is.

I can run some scripts to expand those edge pixels out so the correct color is used, but i was hoping there was something in the tiff save that would do the magic for me in the same way the psd files are saved

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2019 Jul 26, 2019

Actually, its not that PSDs are getting dialated its that any transparency on a pixel is being dropped when saved.  So this kind of suggests that tiff export is wrong when saving a PSD as a tiff.  If i choose to not save transparency, it should just drop any transparency on the RGB image right?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 26, 2019 Jul 26, 2019

ok, using ImageMagick to do the conversion results in a correct RGBA tiff image with no options:

convert foo.psd tiff.psd

I'm assuming photoshop is trying to figure out what you want and assuming if there is transparency, you meant that to be in the alpha channel and premultiplies it for you.  Whats frustrating is that there is no override for this even in scripting.  Its technically incorrect behavior, but i get why PS is doing it.  Just wish there was an option to not.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2020 Feb 02, 2020
LATEST

(Old post, but dealing with some premultiplied alpha issues and ran into this...)

 

It's technically not incorrect behavior, TIFF supports both premultiplied alpha and straight alpha. It's in the ExtraSamples field: https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf

 

It's annoying that there's no option, though, especially since a lot of other applications don't understand that flag and just assume that TIFFs are either premultiplied or not, or if the lossiness of premultiplication is a problem.

 

The old dilation trick won't help here.  You do that when you're exporting straight alpha and you're trying to define the undefined color pixels of fully transparent pixels.  It won't help if you need straight alpha TIFFs, they'll still be premultiplied.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines