Issue with dealing TIFF files, contains channels and transparency

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?".
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

snibgo wrote:The same command works for both images:

Code: Select all

convert MultiChannelTiffFile.tif -backgound white -flatten x2.jpg
Hi,

This command not worked for below file

https://www.dropbox.com/s/7t2qkk9yzaops ... e.tif?dl=0

Actual image lost and we are able to view only background of that image.

IM version: 6.9.0-6 Q16 x64 (windows) and 6.8.8-7 Q16 x86_64 (Linux)

Any insight?
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

Hi,

Could anyone suggest how to proceed with these kind of images...
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Issue with dealing TIFF files, contains channels and transparency

Post by snibgo »

"-flatten" isn't needed here.

Code: Select all

convert MultiChannelTiffFile.tif x2.jpg
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

snibgo wrote:"-flatten" isn't needed here.

Code: Select all

convert MultiChannelTiffFile.tif x2.jpg

Thanks for looking into it..

Above command is working, but when we are trying to change resolution or applying "-layers merge" the same is not working...We are using below command to change resolution..

Code: Select all

convert MultiChannelTiffFile.tif -units pixelsperinch -resample 72 output.jpg
[/b]

or to merge layers

Code: Select all

convert -layers merge MultiChannelTiffFile.tif  output.jpg
Any insight?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Issue with dealing TIFF files, contains channels and transparency

Post by snibgo »

So, for this image, "-alpha off" does what you probably want:

Code: Select all

convert MultiChannelTiffFile.tif -alpha off -units pixelsperinch -resample 72 output.jpg
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

snibgo wrote:So, for this image, "-alpha off" does what you probably want:

Code: Select all

convert MultiChannelTiffFile.tif -alpha off -units pixelsperinch -resample 72 output.jpg

Thank you...

Exactly we are facing problem here..

We are using generic command to deal with all types of TIFF, so to deal with above file we have included "alpha off" in the command.

But, for other tiffs we are losing transparency (after including "alpha off")..

Sample input file (for which we are losing transparency):

https://www.dropbox.com/s/1gh3xf99ohlco ... e.tif?dl=0

We want to know how to detect for which images we need to include "alpha off" ?

Any insight?
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

Hi,
Could anyone suggest, how to resolve above issue?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Issue with dealing TIFF files, contains channels and transparency

Post by fmw42 »

IM may deal with background transparency and alpha channel transparency differently. You check each in Photoshop to see which is giving you trouble. Then use EXIFTOOL to check the image before IM processing to know which kind of transparency you have in that image. This is just a guess. The IM developers may need to look further into TIFF processing with various transparency.
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

Hi,

Thanks for suggestion.

We will check and update you
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Issue with dealing TIFF files, contains channels and transparency

Post by Carter J »

fmw42 wrote:IM may deal with background transparency and alpha channel transparency differently. You check each in Photoshop to see which is giving you trouble. Then use EXIFTOOL to check the image before IM processing to know which kind of transparency you have in that image. This is just a guess. The IM developers may need to look further into TIFF processing with various transparency.
Hi,

We couldn't able to figure out type of transparency using EXIFTOOL?

We have posted in IM fourms for guidance, but couldn't get any useful info. below is the reference link:

http://u88.n24.queensu.ca/exiftool/foru ... 435.0.html

Do we have any other way to determine transparencies?


Thanks,
Last edited by Carter J on 2015-04-28T05:47:59-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Issue with dealing TIFF files, contains channels and transparency

Post by fmw42 »

see

0x0152 ExtraSamples N -
0 = Unspecified
1 = Associated Alpha
2 = Unassociated Alpha

at http://www.sno.phy.queensu.ca/~phil/exi ... /EXIF.html
Post Reply