I am using the version 7.0.8-24 on CentOS6.9
I want to extrakt a layer from a TIF file and convert this to a PNG (with transparacy).
My TIF file contains 2 layers.
The bottom layer is with a red background color, and the second layer is an image of a shoe (with transparacy).
Both layers is visible in the file.
I want to extract just the second layer and convert it into a PNG file (and keep the original image size and transparency).
I found this guide on the web, that I have been using (since I want to keep the original image size):
http://undertheweathersoftware.com/how- ... nd-python/
My command is:
convert "/path/to/my/testfile.tif[0]" "/path/to/my/testfile.tif[2]" \( -clone 0 -alpha transparent \) -swap 0 +delete -coalesce -compose src-over -composite "/path/to/my/testfile.png"
This works like a charm on ImageMagick v6.9.9 om MacOSX 10.14 - but it won't work properly on v7.0.8-24 on CentOS6.9.

On v7.0.8-24, I get a conversion with only the second layer to a PNG with transparacy - but the colorinformation is lost (the original file is RGB). So the results is now a greyscale and the product image displays it as a black box instead.
Can I still use convert with 7.0.8-24 och is this some older commandline...?
Anyone got any ideas on how I can get it to work?