Thursday, 17 October 2019

gdal - Convert .tiff data to bitmap just when rendering and at runtime by visualC++ code


I need to convert a .tiff image to a bitmap one without saving the bitmap. I know that I should use GDAL_translate but because I'm new, this function's interface is a little complicated for me. Could you please tell me how should I call the function in this special case?
And if you have any better suggestion than using GDAL_translate, please allow me be informed?


Note that I don't want to save the bitmap. It's just for displaying purposes in mfc and my superior has told me not to save the bitmap just convert data to bitmap at run-time.


well @user1240592,@Mapperz,@Alex Marcov,@Jamo,@Tonny,@johanvdw and @soheil I've seen the question you've answered here. my problem is I don't need a bitmap file to be created on the hard disk. suppose that I have this MFC application enter image description here already I have written the code to print header information of a geotiff in the rich edit box now I need something to convert a 15931x16997 geotiff to bitmap at runtime and show it in a picture control ( I need a high performance way) and be able to do various image processing operations on this bitmap data at run-time (using opencv) and immediately show the result on the picture control and also be able to do these tasks when the image is viewed:
1-zoom in
2-zoom out 3-pan 4-fixed zoom in 5-fixed zoom out 6-go back to previous extent
7-go next extent

and then if needed I can convert the bitmap data created by image processing operations to a geotiff image file and convert it in the hard disk.
I don't have problems with image processing parts,opening and saving geotiff images, extracting raster data and write raster data.
my problem is converting data to bitmap at runtime and use a high performance way (like openGL) to display the image with high performance and do various navigation tasks on it.
Do you anyway or any library that have implemented these tasks Notice just need bitmap data on the buffer not saved on the hard disk?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...