Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to get GeoTIFF files transformed into bmp files so that I can display them as apart of some software that I am working on. Unfortunately, I am a total newbie with GIS and really don't know much about geography. I am working in C++ and need to have this included in what I am doing. A dll file would be great, although it is my understanding that we might need to include the source code from which the dll is created. I am wide open to any other technique that could be used as well. Can anyone help me with this?

I should also note that I am working on a Windows machine.

share|improve this question
    
Working with TIFF Images C++ - codeguru.com/cpp/g-m/bitmap/otherformats/article.php/c4933 –  Mapperz Feb 29 '12 at 15:49
add comment

5 Answers 5

For converting from GeoTiff to BMP you can use GDAL library. It has C++ API and well-documented.

I have found GDAL convertion example for C#. I hope it will help you to start from.

For BMP you will need to create "world file" to store GeoReferencing information. I think GDAL will create it by default.

share|improve this answer
    
Alex, thanks for the answer. I have also heard that there is something called Openev inside GDAL. My problem is figuring out how to turn GDAL or the relevant part of it into a dll or to be used some way as an API so that I can pass it in a geotiff file and getting a bmp file out of it to display. The displaying of the bmp file is no problem. All help is very welcome. –  user1240592 Feb 29 '12 at 18:10
add comment

I've just recently learnt how to use gdal from a command line using pre-built libraries found on the gdal site.

http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

Dunno if this answers your question or not but I was able to strip the alpha from a tiff tile and re-save it, could possibly envoke a cmd prompt and wait for it to finish?

gdal_translate -of BMP your.tiff your.bmp
share|improve this answer
add comment

You can use libtiff directly: http://www.libtiff.org/ or use gdal. In reply to your comment on alex his answer: for gdal search for the gdal1x.dll (with x the version number), it is the only file you will need, apart from the header files of the same build. I usually find it easier to compile gdal myself to be sure I have the right header files.

For libtiff, it is best to build it yourself from source using the cvs version. In that case you will also have support for eg bigtiffs (larger than 4Gb).

share|improve this answer
add comment

Try MyGeodata GIS data online converter - it allows you to convert your GeoTIFF to the BMP format or other various formats. Run raster converter. This tool uses the GDAL library.

share|improve this answer
add comment

See gdal_translate's source code. It's in the GDAL source package available from from this link.

share|improve this answer
add comment

protected by whuber Aug 23 '12 at 14:11

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.