[OSGeo Africa] Converting TIFF image planes

Gavin Fleming GavinF at mintek.co.za
Thu Nov 12 06:53:45 EST 2009


r.out.tiff -p writes a 24-bit raster to an 8-bit tiff with palette (colour table).

 

So via bash you could import into grass then export using above command. 

 

Gavin 

________________________________

From: africa-bounces at lists.osgeo.org [mailto:africa-bounces at lists.osgeo.org] On Behalf Of Zoltan Szecsei
Sent: 2009 November 12 01:02
To: tim at linfiniti.com; Africa local chapter discussions
Subject: Re: [OSGeo Africa] Converting TIFF image planes

 

Hi Tim,
I have a RGB-ised satellite image we are digitising from, but our (oldish) software displays it as a red image.
I fiddled around using tiffinfo on other images that display correctly with this software, and noticed the difference in the Planar Configuration. (Which also explains why we only see the red)
Our Windows based R2V package allowed the conversion (which then displays correctly in our Linux package), but I am looking for something to do this conversion via a Linux bash script - and to make minimum or no other changes to the Tiff image.

Regards,
Zoltan

Got image:



zls at gl0:/home/gisprojects$ tiffinfo P001.TIF
TIFF Directory at offset 0x150e1684
  Image Width: 12405 Image Length: 9475
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Image Description: "{\n  bandList = \n  [\n    3;\n    2;\n    1;\n  ]\n}"
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 84
  Min Sample Value: 0
  Max Sample Value: 255
  Planar Configuration: separate image planes

But need as above, but with Planar Config as below::



zls at gl0:/home/gisprojects/t4a/images/gurue$ tiffinfo P002.TIF 
TIFF Directory at offset 0x4458bf8
  Subfile Type: (0 = 0x0)
  Image Width: 12405 Image Length: 9475
  Resolution: 0, 0 pixels/inch
  Bits/Sample: 8
  Compression Scheme: PackBits
  Photometric Interpretation: palette color (RGB from colormap)
  Artist: "R2V for Windows"
  Host Computer: "PC/MS WINDOWS"
  Make: "Able Software Corp."
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  Color Map: (present)





Tim Sutton wrote: 

Hi
 
Do you mean you want to copy from a palletted tiff to an e.g. Single band greyscale tif? Or three bands each representing R, B, G? Bearing in mind that you will lose the colour info, you could do this using gdal_translate.
 
Regards
 
Tim
------Original Message------
From: Zoltan Szecsei
Sender: africa-bounces at lists.osgeo.org
To: africa at lists.osgeo.org
ReplyTo: Africa local chapter discussions
Subject: [OSGeo Africa] Converting TIFF image planes
Sent: Nov 12, 2009 10:35 AM
 
Hi,
I've had a look at some of the Linux tiff tools (eg tiffcp) but cannot 
find a way to command-line convert an RGB tiff image from separate image 
planes, to a single image plane.
 
Does anyone have any pointers, please?
 
Thanks & regards,
Zoltan
 
 
 
  
 



________________________________



 
_______________________________________________
Africa mailing list
Africa at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/africa
  






-- 
 
===========================================
Zoltan Szecsei
Director
 
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.
 
65 Main Road, Muizenberg 7945
Western Cape, South Africa.  
 
34° 6'16.35"S 18°28'5.62"E 
 
Tel: +27-21-7884897  Mobile: +27-83-6004028
Fax: +27-86-6115323    www.geograph.co.za
===========================================

This message is intended for the addressee only.Information and attachments in this e-mail may contain confidential, proprietary, or legally privileged information. 
If you are not the intended recipient, or responsible for delivery of the message to the intended recipient, any disclosure, copying, distribution, or any action taken is prohibited and may be unlawful, and could result in a claim against you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/africa/attachments/20091112/75454975/attachment-0001.html


More information about the Africa mailing list