5

I'm recently new to QGIS, and have been using it to georeference some photos for a physics thing. Sadly I seem to have a pretty poor handle on using TIF files with it.

When I load up a jpg image, it looks the same as when I load it up in say paint, but when I try to georef a TIF image it becomes very discolored and more difficult to use.

Georefing a TIF format image

What my picture originally looked like

I would like to know if there is any way around this such that I can use the original TIF image to georeference. Right now, I convert it into jpg format, georeference it, save my points and then load up the weird looking TIF format with those points to get a georeferenced TIF image. I'm worried that I'm losing data when doing this though due to the weird colors of the image. It's very important that I keep as much data as possible, hence why I can't just convert to jpg anyways.

  • 1
    Run gdalinfo for both images and add reports to your question. – user30184 Jun 3 '17 at 21:37
6

Your TIF file might have paletted colours. This is bad for georeferencing, because the georeferencer tries to interpolate between neighbouring pixel values.

You have to convert your TIF to RGB colour mode before georeferencing to get a good looking output. Raster -> Conversion -> PCT to RGB is one way to do that inside QGIS.

gdal_translate -expand rgb is another.

  • Thank you, that sounds like it could be my problem! Unfortunately when trying to do this conversion I get a message like "AttributeError: 'NoneType' object has no attribute 'GetCount'", so I'm not too sure what to do about that... Still, definitely gives me something to work from! – Maggie Jun 6 '17 at 15:31
  • Alternatively, you can use gdal_translate -expand rgb. See my extended answer. – AndreJ Jun 6 '17 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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