I have a number or single band raster grids that have been converted to RGBA (png). I no longer have access to the orignal single band raster data but have the png files. Is there a way to convert the png files back to the single band grid? Preferably using QGIS or other opensource GIS?

1 Answer 1


It depends a bit on what you mean by single band. This could be B&W or indexed colour. If you want Indexed Colour you can use the RGB2PCT tool. Go->Raster->Convert->RGB2PCT (or use the GDAL Utility program RGB2PCT.py). If you want a B&W version, you could use the raster calculator to take an average of the three bands or have some other calculation if there is some emphasis in one of the bands.

Alternatively, if your PNG has a world file, simply open the image in GIMP or Photoshop. Set the mode to greyscale or Indexed Colour (depending on your needs) and save. Copy the world file and edit the name to match your B&W version (just make sure you don NOT save it in a progressive format - check the advanced save options in GIMP). This method can be very useful if you want to rearrange the pallet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.