[Qgis-user] Disable anti-aliasing on XYZ layer

Richard Duivenvoorde rdmailings at duif.net
Thu Mar 9 06:55:28 PST 2023


( bringing it back to the list :-) )

And are you sure the image retrieved from the xyz server is not a jpeg (compared to your original png)?
You can try to see the actual url's used via F12 (the Debugging Development Tools panel) in QGIS.

Another option: QGIS does not respect the xyz-zoomlevels always.. so it is very easy to go to a zoomlevel in which QGIS has to resize the original image a little (and 'resample' it, see Rendering/Raster settings in the Options). So to really compare QGIS image to the original one, you have to use the 'Zoom to native resolution' in the legend/layer context menu).

Last idea: is your project in the same CRS as the xyz service (probably EPSG:3857?) Because if not, QGIS will also resample your original image to 'fit' the tile in the right position in that other crs....

(and again: I know nothing about Qt image rendering ....)

Regards,

Richard Duivenvoorde

On 3/9/23 15:36, Stephane Goldstein wrote:
> I can see the difference by comparing the .png file in an image editor (https://pasteboard.co/YodS7tuhtzSC.png <https://pasteboard.co/YodS7tuhtzSC.png>) and how it's rendered in QGIS (https://pasteboard.co/tcGLRc7XrsNj.png <https://pasteboard.co/tcGLRc7XrsNj.png>).
> The examples are at the same zoom level.
> 
> On Thu, 9 Mar 2023 at 21:46, Richard Duivenvoorde <rdmailings at duif.net <mailto:rdmailings at duif.net>> wrote:
> 
>     On 3/9/23 14:05, Stephane Goldstein via QGIS-User wrote:
>      > Hi.
>      > Is there a way to disable anti-aliasing of the png tiles loaded on an XYZ layer ?
> 
>     Hi Stephane,
> 
>       From what do you conclude that there is anti-aliasing going on with XYZ layers?
>     I use xyz layers also but I'm not aware of such behaviour?
> 
>     FYI: this is the code rendering the images:
>     https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp <https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp>
>     (tried to search for 'alias' but could not find anything)
> 
>     Note, I'm not an expert in this field, so just wondering...
> 
>     Regards,
> 
>     Richard Duivenvoorde
> 
> 



More information about the QGIS-User mailing list