Page 1 of 1

Tiff layers - not merging layers correctly

Posted: 2016-03-02T04:38:13-07:00
by lajio
Hi,

I am converting tif image into jpg. Tif image has layers - one with green color and one with purple. When I open the original image, the default color is purple. But after converting to jpg the default color is green.
Interesting is that in Windows preview the image is purple but in editor it is green. The layers are somehow mixed-up. Is there any way to convert the image into the purple layer withou selecting the layers manually?

Code: Select all

-quiet "test - kopie.tif" +profile \"!8bim,*\" -units PixelsPerInch -density 300 -layers flatten "1090111.jpg"
https://www.dropbox.com/s/bshr75lxali1g ... e.tif?dl=0
https://www.dropbox.com/s/azs3vscfp17d0 ... 1.jpg?dl=0

Thanks a lot for the answer!

Re: Tiff layers - not merging layers correctly

Posted: 2016-03-02T06:15:23-07:00
by snibgo
Your dropbox links are bad; they are personal to you and won't work for the rest of us.

Re: Tiff layers - not merging layers correctly

Posted: 2016-03-02T07:03:09-07:00
by lajio
snibgo wrote:Your dropbox links are bad; they are personal to you and won't work for the rest of us.
So sorry, now it should be accessible public

Re: Tiff layers - not merging layers correctly

Posted: 2016-03-02T07:23:01-07:00
by snibgo

Code: Select all

f:\web\im>identify "test - kopie.tif"

test - kopie.tif[0] TIFF 1600x900 1600x900+0+0 8-bit sRGB 7.758MB 0.016u 0:00.016

test - kopie.tif[1] TIFF 1600x900 1600x900+0+0 8-bit sRGB 0.109u 0:00.108

identify.exe: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/887.
This shows the file contains two images.

Code: Select all

convert "test - kopie.tif" c.png
This creates images c-0.png and c-1.png. In the first, the car is purple. In the other it is green. You can use "[n]" to extract just one image, eg:

Code: Select all

convert "test - kopie.tif[0]" c0.png
convert "test - kopie.tif[1]" c1.png
Does that answer the question?

Re: Tiff layers - not merging layers correctly

Posted: 2016-03-03T01:32:08-07:00
by lajio
snibgo wrote: This shows the file contains two images. ...
Well, yes I saw that, but it is not clear to me why is this so, because it was supposed to be layers. Well, after little while I came to that there is a mask, not layer. So it is maybe the reason it has two images.

Thank you very much, I will use your suggested solution for picking nth layer.