Tiff layers - not merging layers correctly

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?".
Post Reply
lajio
Posts: 5
Joined: 2015-09-14T06:04:30-07:00
Authentication code: 1151

Tiff layers - not merging layers correctly

Post 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!
Last edited by lajio on 2016-03-02T07:02:24-07:00, edited 2 times in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Tiff layers - not merging layers correctly

Post by snibgo »

Your dropbox links are bad; they are personal to you and won't work for the rest of us.
snibgo's IM pages: im.snibgo.com
lajio
Posts: 5
Joined: 2015-09-14T06:04:30-07:00
Authentication code: 1151

Re: Tiff layers - not merging layers correctly

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Tiff layers - not merging layers correctly

Post 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?
snibgo's IM pages: im.snibgo.com
lajio
Posts: 5
Joined: 2015-09-14T06:04:30-07:00
Authentication code: 1151

Re: Tiff layers - not merging layers correctly

Post 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.
Post Reply