Skip to main content
Participant
January 19, 2021
Answered

Tiff Transparency Converted to White / Black

  • January 19, 2021
  • 4 replies
  • 2063 views

I'm having issues with transparent tiff files that have been created by ImageMagick. When the image is placed in InDesign the transparency is converted to either black or white. If I open the same file in Photoshop the transparency shows up, and after I save it in Photoshop, InDesign recognizes the transparency. The tiff files are created by an automated process so having the step of opening the image in Photoshop to "fix" the transparency isn't something I can do.

 

Sample.tiff 

This topic has been closed for replies.
Correct answer Jeffrey5E20

@Brad @ Roaring Mouse you were correct with pointing me toward "premultiplied" alpha. In the ImageMagic world this translates to "associated " alpha and can be implemented using the following in the command line.

magick in.png -define tiff:alpha=associated out.tiff

 The part that really threw me off is the fact that I use Magick.Net, which is a .NET wrapper for ImageMagick. It has a alpha function, that appears to do the same thing as the command line arguments, when in fact there is another method required.

//This will not set the tiff alpha to Associated / multiplied
imageMagick.Alpha(AlphaOption.Associate);

//This is the correct way to define tiff:alpha associated
var tiffWriteDefines = new TiffWriteDefines
{
    Alpha = TiffAlpha.Associated
};
imageMagick.Settings.SetDefines(tiffWriteDefines);

4 replies

Jeffrey5E20AuthorCorrect answer
Participant
January 19, 2021

@Brad @ Roaring Mouse you were correct with pointing me toward "premultiplied" alpha. In the ImageMagic world this translates to "associated " alpha and can be implemented using the following in the command line.

magick in.png -define tiff:alpha=associated out.tiff

 The part that really threw me off is the fact that I use Magick.Net, which is a .NET wrapper for ImageMagick. It has a alpha function, that appears to do the same thing as the command line arguments, when in fact there is another method required.

//This will not set the tiff alpha to Associated / multiplied
imageMagick.Alpha(AlphaOption.Associate);

//This is the correct way to define tiff:alpha associated
var tiffWriteDefines = new TiffWriteDefines
{
    Alpha = TiffAlpha.Associated
};
imageMagick.Settings.SetDefines(tiffWriteDefines);
Brad @ Roaring Mouse
Community Expert
Community Expert
January 19, 2021

I suspect your external process did not save in, or does not support, what's called "premultiplied" alpha. ID seems to only support that type of alpha channel for transparency. I took your file and saved it out of another image program (in this case GraphicConverter), one with, the other without premultiplied alpha. Only the premultiplied one worked correctly in ID.

BobLevine
Community Expert
Community Expert
January 19, 2021
This is similar to issue folks have with spreadsheet apps saving as Excel. They just aren't saving properly and if I were you I would take it up with the vendor.
Community Expert
January 19, 2021

"The tiff files are created by an automated process so having the step of opening the image in Photoshop to "fix" the transparency isn't something I can do."

 

Hi Jeffrey,

why not? With PhotoShop you could record actions.
And you could go one step further and apply an action to all files of a folder.

 

Regards,
Uwe Laubender

( ACP )

 

Participant
January 19, 2021

This automation is part of a server side process that processes many images at a time. My understanding is that it is a violation of the EULA of Photoshop to run it on a server, then there is the issue of processing many images at a time on a single server. 

rob day
Community Expert
Community Expert
January 19, 2021

Does the problem also happen with an ImageMagick PNG?