Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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