Convert .tif with layers in .png
Convert .tif with layers in .png
Hi,
i'm searching for a smart solution for converting tif files, cmyk, with 2 or more layers, without clipping path or any separate masks and no background (transparent) in a png with transparency
I found this here:
convert test_file.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) \( -clone 1 \) -delete 0,1 -background none -flatten test_file.png
It works for me, if my test file has just one layer... but usually our files have more than one.
Can anyone help me? Cause i don't really understand all parameters or scripting at all
Thanks
i'm searching for a smart solution for converting tif files, cmyk, with 2 or more layers, without clipping path or any separate masks and no background (transparent) in a png with transparency
I found this here:
convert test_file.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) \( -clone 1 \) -delete 0,1 -background none -flatten test_file.png
It works for me, if my test file has just one layer... but usually our files have more than one.
Can anyone help me? Cause i don't really understand all parameters or scripting at all
Thanks
Re: Convert .tif with layers in .png
Oh, i'm using ImageMagick 6.9.6-2 Q16 x86_64 2016-10-21
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert .tif with layers in .png
When you tiff has two layers, what output(s) do you want? Perhaps one png per layer, as if they were entirely separate images. Or perhaps you want a single png output, by combining the layers in some way.
snibgo's IM pages: im.snibgo.com
Re: Convert .tif with layers in .png
The result should be a single png with the layers combined.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert .tif with layers in .png
snibgo's IM pages: im.snibgo.com
Re: Convert .tif with layers in .png
Okay, the combination of the layers is right, thanks, but now my background ist white.
Re: Convert .tif with layers in .png
if i try this
convert test.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) \( -clone 1 \) -delete 0,1 -background none -layers merge test.png
Almost everything looks fine, just the sequence of the layers is wrong
convert test.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) \( -clone 1 \) -delete 0,1 -background none -layers merge test.png
Almost everything looks fine, just the sequence of the layers is wrong
Re: Convert .tif with layers in .png
I found the solution for my problem
convert test.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) -delete 0 -background none -layers merge test.png
convert test.tif \( -clone 0 -alpha on -channel rgba -evaluate set 0 \) -delete 0 -background none -layers merge test.png
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert .tif with layers in .png
Then use "-background none":hank wrote:... but now my background ist white.
Code: Select all
convert in.tif -background none -layers merge out.png
snibgo's IM pages: im.snibgo.com
Re: Convert .tif with layers in .png
-background none doesn't work.
Don't know why
Don't know why