[gdal-dev] Using Python gdalwarp to read gif file and world file, re-project to another picture

Sean Gillies sean at mapbox.com
Fri Mar 6 11:22:24 PST 2020


Hi Guodong,

On Thu, Mar 5, 2020 at 2:16 PM Guodong Zhu <gd.zhu at outlook.com> wrote:

> Hi Sean,
>
>
>
> Thanks a lot for your answer! It works for me. I have one follow up
> question: is there a way to make the background transparent instead of
> being white?
>
>
>
> I really appreciate your help!
>

The background is transparent, I think it may appear white due to details
of your image viewer. If you convert the warped GeoTIFF to a PNG like

gdal_translate -of PNG warped.tif warped.png

you'll have a file that looks properly transparent in a browser or image
viewer.

-- 
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200306/9d88f8d7/attachment.html>


More information about the gdal-dev mailing list