1

I have some binary mask image with 255 and 0 values and I want 0 values become transparent.

How can I do this?


Seems it work, but I'm not sure if it the best method:

gdal_translate -a_nodata 0 -of PNG src.png dst.png
2
  • 1
    gdal_translate with a_nodata is the best way. Jan 19 '17 at 18:55
  • @LoganByers, please expand your comment into an answer explaining why a_nodata is the best way.
    – Fezter
    Jan 19 '17 at 23:26