Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
That is expected behaviour. A tiff does not officially support transparency (Photoshop introduced a multi-layered tiff format at some point), but does support alpha channels. This alpha channel is present in the channel palette, and can be used to generate a layer mask, for example.
With that info, is it possible to remove the transparency background?
Roman80 wrote:With that info, is it possible to remove the transparency background?
Photoshop puts it there, and apparently only Photoshop can read it. If you want to remove it (rather than simply ignore it), Photoshop seems the best option.
Your original test.tif has background transparency in two layers and does not have any alpha channel.There is also a layer group called "Zeichenfläche 1". I am not sure why ImageMagick nor the other tools cannot read the background transparency, but it might be due to the fact that you have a layer group. I am not sure ImageMagick knows about tiff layer groups. But that is my guess.
I removed the grouping and deleted one of the two layers and saved again to TIFF, but it still does not show transparency. Are these "smart layers"? If so, perhaps that is the issue. ImageMagick probably cannot handle any thing but simple pages or perhaps layers as TIFF files.
fmw42 wrote: ↑2018-05-22T13:29:46-07:00
I removed the grouping and deleted one of the two layers and saved again to TIFF, but it still does not show transparency. Are these "smart layers"? If so, perhaps that is the issue. ImageMagick probably cannot handle any thing but simple pages or perhaps layers as TIFF files.
I only opened Photoshop, draw 2 squares, set a transparent background and saved it as TIF.
Nothing special
Your problem is that you did not check SAVE TRANSPARENCY in the Options dialog when you saved your file. I opened your file and reserved it checking that box and now it shows transparency when opened and when converted to PNG.
Roman80 wrote:But it does also not work for TIF files and also not with your modified CPP program.
Both programs work fine with TIFF files made by ImageMagick. Those files have an alpha channel.
They don't work on the TIFF file you linked because that doesn't have an alpha channel.
This is not correct, they have an alpha channel and I found a solution.
The Image has a profile which a special Photoshop profile.
If I remove the profile "tiff:37724" it is working with the example programs.