enable
enable copied to clipboard
Unable to disable interpolation with agg backend
I am trying to render an image to an array with antialiasing and interpolation turned off using the agg backend. From some experimentation and going through the code, it appears that turning off interpolation is not an option. This differs from e.g. matplotlib which also uses agg and allows it to be turned off.
Is this something that could be easily implemented?
Try calling gc.set_antialias(False) before rendering the image?
I did that, but there is still evidence of antialiasing happening, just not to the same extent. So I tried turning off interpolation as well, but there is no option to do so.
I think gc.set_image_interpolation("nearest") might be what you want to use to control interpolation. If you're still getting antialiasing after that, I'm not sure what else to tweak.
One other thought - if this is in a Component you may need to make sure that backbuffering is turned off.
Adjusting all these settings has not solved the problem - I still get some antialiasing or interpolation. I am now trying to use the celiagg backend which doesn't support interpolation.