4

When I create a map, which uses 13 different colors (12 + gray for background), why uses(!!) QGIS more than 20000 different colors when saved as bmp, png or jpg?- I verified this behaviour with irfanview (image | information , used colors). As gif as an export-option is not available, how can I limit the number of used colors in the exported raster-files. reducing later in irfanview is not an option, because colors are also changed (e.g. replaced, dithered,...) not only eliminated.

I use QGIS 2.18.13 64bit under windows 10

enter image description here

5
  • can you export as png8?
    – nmtoken
    Sep 18, 2017 at 19:38
  • 2
    What about turning off antialiasing?
    – ndawson
    Sep 19, 2017 at 4:00
  • @ndawson: thx, this is the solution, now I have only 13 used colors. If you post your comment as answer I can accept your answer
    – Kurt
    Sep 19, 2017 at 4:54
  • @nmtoken as far as i now there is no export option png8
    – Kurt
    Sep 19, 2017 at 4:55
  • It's looks like that you need indexed colours. The GIF format is most suitable for this. Sep 19, 2017 at 7:15

1 Answer 1

2

It's likely caused by the antialiasing used by default. If you turn it off from settings -> options -> rendering -> "Make lines appear less jagged at the expense of some rendering performance" then the output will ONLY have the selected colors, and not the "in between" shades used by antialiasing.

Your Answer

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

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