[Gdal-dev] Read one band image to a bitmap in csharp
Hallgren Johan E
jhhal at wmdata.com
Fri Mar 9 04:35:19 EST 2007
Good morning
I have tried to read a one banded tiff file (as seen below) and convert it to a bitmap, but I fail. My environment is CSharp and I use the swig interface. I have compiled and use version 1.4 of GDAL.
Question:
1.
I have found a sample that describe how to use GDAL to convert a tree band image to a (DOTNET-) bitmap, but my image only have one band. How should I do in that case?
2.
I tried to find the extent information and as I understood I should use the dataset.getMetadata but I had no such a function available. I had getMetadata_List and getMetadata_Dict, but no one gave me the extent information. What are missing?
3.
Is it possible to create a bitmap based on a smaller rectangle of the input dataset?
Gdalinfo:
+++++++++++++++++++++++++++
Driver: GTiff/GeoTIFF
Size is 2000, 2000
Coordinate System is `'
Origin = (1250000.000000000000000,6150000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
TIFFTAG_SOFTWARE=Handmade Software, Inc. Image Alchemy v1.11 Corner Coordinates:
Upper Left ( 1250000.000, 6150000.000)
Lower Left ( 1250000.000, 6100000.000)
Upper Right ( 1300000.000, 6150000.000)
Lower Right ( 1300000.000, 6100000.000)
Center ( 1275000.000, 6125000.000)
Band 1 Block=2000x4 Type=Byte, ColorInterp=Palette
+++++++++++++++++++++++++++
Best Regards
Johan
___________________________________
Johan Hallgren
WM-data a LogicaCMG company
Pelle Bergs backe 3
Box 1938, 791 19 Falun
Tel: 023-547 46 (int: +46-2354746)
Mobil: 070-588 44 28 (int: +46-705884428)
johan.e.hallgren at wmdata.com <BLOCKED::mailto:johan.e.hallgren at wmdata.com>
http://www.wmdata.se <BLOCKED::/exchweb/bin/redir.asp?URL=http://www.wmdata.se/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070309/af34cb8c/attachment.html
More information about the Gdal-dev
mailing list