[Gdal-dev] Problems with creating PNG files

Frank Warmerdam fwarmerdam at gmail.com
Tue Mar 1 09:19:24 EST 2005


On Tue, 1 Mar 2005 14:11:51 -0000, Roger James
<roger at beardandsandals.co.uk> wrote:
>  
> I cannot seem to get any sensible output out of the png driver when using
> create_copy 
> 
> I made the attached test bitmap and tried it with gdal_translate. The output
> png is broken. 
> 
> I am using a CVS source a few hours old and linking against libpng-1.2.6. 

Roger,

Your redcross.png is not a PNG file, it is a TIFF file.  You need to use 
the "-of PNG" switch on the commandline to select output in png format.
GDAL utilities will not automatically select a format based on the extension.
Instead, they just default to TIFF format. 

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