Copy link to clipboard
Copied
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.
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.
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
...Copy link to clipboard
Copied
"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 )
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Does the problem also happen with an ImageMagick PNG?
Copy link to clipboard
Copied
No, ImageMagick png files work just fine. But if a take a known working png and convert it to TIFF using ImageMagick, INDD stops recognizing the transparency.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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);