2004.01.23 04:48 "[Tiff] How to convert MINISBLACK to PHOTOMETRIC_RGB", by Pushkar Pradhan

2004.01.23 07:39 "Re: [Tiff] How to convert MINISBLACK to PHOTOMETRIC_RGB", by Andrey Kiselev

When I create a subset image (to take only 3 bands out of 6) IMAGINE software creates a MINISBLACK TIF file (there seems to be no option to change this). This is what tiffinfo reports:

  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Extra Samples: 2<unspecified, unspecified>
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3

Now I want to read this file in MATLAB whose TIFF reader is limited to reading RGB and PALETTED images (that too only 8-bit and 16-bit). Thus it only reads the 1st band of this file.

I saw there is utility pal2rgb but is there something similar to min-is-black images to RGB interpretation?

You can rewrite such files using GDAL software. I have implemented Photometric setting as an option to the TIFF driver per your recent request. You can try to do something like:

$ gdal_translate -of GTiff -co "PHOTOMETRIC=RGB" bad.tif good.tif

Don't forget that you will need latest GDAL snapshot.


Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517