[gdal-dev] Creatin an image file from scratch

Frank Warmerdam warmerdam at pobox.com
Wed Sep 29 17:50:07 EDT 2010


Mario Beaulieu wrote:
> ****Hi, I am trying to create a TIFF file from scratch by doing this :
> 
> GDALDriver* pDriver = (GDALDriver*) GDALGetDriverByName("GTiff");
> 
> GDALDataset* pOutDS = pDriver->Create( sFilePath.c_str(), m_lWidth, 
> m_lHeight, m_lNumberOfBands, GDT_Byte, NULL);
> 
> GDALClose(pOutDS );
> 
> **** It creates the file but it failed when iI try to loaded it.  I got  
> ... not recognised as a supported file format
> 
> GDALDataset* pOutDS2  = (GDALDataset*) GDALOpenShared(sFilePath.c_str(), 
> GA_Update);
> 
>  
> 
> What missing?

Mario,

I don't see an obvious problem.  Could you prepare a minimal sample program
that demonstrates the problem so I could try it here?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list