1
votes

When I scan negatives Sane provides 16-bit grayscale files containing infrared information along with the 48-bit RGB files that contain the image information.

Is there any way to combine these two files using ImageMagick in order to obtain a 64-bit RGBA TIFF file whose Alpha channel (infrared) is somehow recognized in Photoshop? Photoshop may detect it as transparency, separate layer or even outright Alpha channel. All these are fine by me.

I haven't been able to obtain much following numerous ImageMagick tutorials on the internet. All TIFFs I get are devoid of transparency information. Libtiff's tiff2rgba does not seem to be of much help either.

My ImageMagick version information:

$ convert --version
Version: ImageMagick 6.8.8-6 Q16 x86_64 2014-02-17 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC
Delegates: bzlib fftw fontconfig freetype jng jpeg lcms lzma png tiff webp x xml zlib
1

1 Answers

1
votes

I am not 100% certain I have got your filetypes and needs exactly understood, but if I create a red square TIFF like this:

convert -size 512x512 xc:red rgb.tiff

enter image description here

and a synthetic (faked) greysale gradient to represent your IR image, like this:

convert -size 512x512 -colorspace gray gradient:\#000000-\#ffffff ir.tiff

enter image description here

I can combine them using the IR as opacity like this:

convert rgb.tiff ir.tiff -compose copyopacity -composite out.tiff

to give this, which at least my version of Photoshop CC 2014 understands.

By the way. it seems equally happy creating a Photoshop PSD format directly:

convert rgb.tiff ir.tiff -compose copyopacity -composite out.psd

enter image description here