Hi Cécile, for map generation, antialiasing is controlled here, it can be controlled via request options, but it defaults to having antialiasing on: https://github.com/geoserver/geoserver/blob/93ff3a1e9b1c0bd50e69d9734db7ac39213c3c51/src/wms/src/main/java/org/geoserver/wms/map/RenderedImageMapOutputFormat.java#L325 (it gets set on the StreamingRenderer, which immediately sets it onto the SLDStyleFactory as well)
For legends the antialiasing is not set on the SLDStyleFactory instead, but I see it set on the graphics used to assemble the legend (forcefully, without any external control)... at this point, I'd enable it all the time on SLDStyleFactory too, yes. Hope this helps Cheers, Andrea Aime == GeoServer Professional Services from the experts! Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions Group phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 https://www.geosolutionsgroup.com/ http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail On Tue, Dec 3, 2024 at 8:51 AM Cécile Vuilleumier < cecile.vuilleum...@camptocamp.com> wrote: > Hi all > > I have been looking into the SLDStyleFactory again after we noticed some > pixelation in GeoServer legend graphics when using an SVG image as point > symbolizer. You can see an example in the attached files with the style as > SLD + the external graphic as SVG and the resulting legend graphic in > legend_0.png (with the following query parameters: > &width=20&height=20&LEGEND_OPTIONS=dpi:364;fontAntiAliasing:true;forceLabels:on). > > Increasing the parameters WIDTH and HEIGHT does not help, as it only adds > padding around the symbol. But we get much better result when using > RenderingHints.VALUE_ANTIALIAS_ON here: > https://github.com/geotools/geotools/blob/80a01af1b6ea405fca6b03fe780b73c0d431890c/modules/library/render/src/main/java/org/geotools/renderer/style/SLDStyleFactory.java#L165 > -> see in the file legend_1.png > > Is there a reason not to use antialiasing here (I know it also impacts the > map rendering) or is there some other way to avoid pixelation? > > Thanks in advance and best regards, > Cécile > -- > *camptocamp* > > > *Cécile Vuilleumier * > Geospatial developer > www.camptocamp.com > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel >
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel