[gdal-dev] Problem with image overview creation in GTiff files

Vincent Schut schut at sarvision.nl
Tue Oct 21 02:25:46 EDT 2008


brian wrote:
> by any chance do these tiffs have 4 bands? rgba?
>   
In my case (not the original reporter), no. Happens with any number of 
bands, well, at least with 3 and 7. Datatypes byte, float32 and int16, 
if I recall correctly.

Vincent.
> brian
>
> On Thu, 2008-10-16 at 16:03 -0500, Ozy Sjahputera wrote:
>   
>> I am trying to create image overviews for a GTiff file using 
>> GDALDataset::BuildOverviews. I keep getting various errors such as:
>>
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "Compression" while 
>> writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "ImageWidth" while 
>> writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag 
>> "PlanarConfiguration" while writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "BitsPerSample" 
>> while writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "SamplesPerPixel" 
>> while writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "Compression" while 
>> writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag 
>> "PhotometricInterpretation" while writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "SampleFormat" while 
>> writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "TileWidth" while 
>> writing
>> ERROR 1: TIFFSetField:VISUAL.tif: Cannot modify tag "TileLength" while 
>> writing
>> ERROR 1: TIFFBuildOverviews:Can not write tiles to a stripped image
>>
>>
>> Here is my code:
>>
>>     int OverviewList[5] = { 2, 4, 8, 16, 32 };
>>     CPLErr overview_err = outDS->BuildOverviews( "AVERAGE_MAGPHASE", 5, 
>> OverviewList, 0, NULL, NULL, NULL );
>>
>>
>> I have used BuildOverviews before on HFA images and they are fine. Any idea?
>>
>> Thanks
>> Ozy
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>     
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>   



More information about the gdal-dev mailing list