Page 2 of 2
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T12:07:52-07:00
by Roman80
I got this information about the Photoshop TIF:
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?
Regards
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T12:14:00-07:00
by snibgo
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.
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T13:13:14-07:00
by fmw42
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.
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T13:29:46-07:00
by fmw42
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.
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T22:07:53-07:00
by Roman80
The C program that I showed (flatcol.c) uses argv[3] as the colour.
But it does also not work for TIF files and also not with your modified CPP program.
Regards
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-22T22:10:16-07:00
by Roman80
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
Regards
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-23T04:59:37-07:00
by snibgo
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.
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-23T10:07:42-07:00
by fmw42
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.
Re: How to remove transparency from a TIF and replace with white background
Posted: 2018-05-24T05:45:50-07:00
by Roman80
snibgo wrote: ↑2018-05-23T04:59:37-07:00
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.
@fmw42: Thanks for the hint
Regards