3

I am trying to georeference a grayscale image (*.tif) in QGIS 2.2.0 Valmeria. It is working but QGIS draws a black box around the georeferenced raster image. If i use the option set 0 transparent, not only the black box is transparent but also the black pixels in my gray scale image. But setting black or white transparent isn't an option for me, because it is a gray scale image.

1
  • 1
    Prior to georeferencing, you can adjust the black pixels in your greyscale image slightly away from pure black to leave room for a nodata/missing data/transparency value with gdal_translate -a_nodata 0 -scale 0 255 1 255 infile.tif outfile.tif (assuming byte-sized pixels). This works for non-grayscale multiband data as well.
    – Dave X
    Commented Oct 30, 2020 at 14:24

1 Answer 1

8

Try converting your file to another/the same format (Raster/conversion/translate(convert format).There you can define a value for "no data", which you can set to a number different than 0.

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.