jeudi 29 janvier 2015

GDAL C++ API: How to create PNG or JPEG from scratch


I'm new to GIS and GDAL. My question probably is very basic, but I couldn't find answer. May be I don't understand GDAL ideology.


I need to create raster images from scratch, for example, JPEG or PNG. Their drivers don't support Create function - only CreateCopy. What is the common technique of new files creation in this case?


In principle, I can try to create Tiff because its driver suports Create(). Next, I can use CreateCopy() for PNG or JPEG using this Tiff. But such method looks indirect and unnatural for me. Also I suppose that this procedure can be too memory hungry if rasters are large.


I dealt with some image libraries before, they usually provide direct and simple way of bitmaps creation. Could somebody show me right direction for GDAL?


Thank you in advance,


Alexei





Aucun commentaire:

Enregistrer un commentaire