EtheaDev / SVGIconImageList

Three engines to render SVG (Delphi Image32, Skia4Delphi, Direct2D wrapper) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)
Apache License 2.0
327 stars 96 forks source link

TSVGIconImage - something wrong with colors? #248

Closed kazuser closed 1 year ago

kazuser commented 1 year ago

Could you please explain, what's going on with white color?

It looks ok in design-time (in preview): image

but not in run-time: image

Test project: Project1.zip

p.s. Yep, I know it's funny but I need 100,00% accuracy, not 99,999% 🥲

carloBarazzetta commented 1 year ago

Have you tried with a white "box"? It could be due to the antialiasing of the X which being very fine the stroke creates reduces the color slightly. The only difference I see is the background color: the run-time one is darker.

TommiPrami commented 1 year ago

Must be due the antialiasing. Can it be disabled for testing?

luebbe commented 1 year ago

You beat me to it by a few seconds @carloBarazzetta :)

carloBarazzetta commented 1 year ago

No, I've no control on the engine that draw the image: are you using Image32?

kazuser commented 1 year ago

Ok, how to disable "antialiasing"? I see "Disable Interpolation" only (and it doesn't help).

kazuser commented 1 year ago

I using with defaults settings.

Could you please try my sample (is in a zip-file in first message) and confirm/refute wrong color?

carloBarazzetta commented 1 year ago

have no control over the antialiasing effect applied by the SVG-Engine being used. You can test with a circle instead of an 'X' so that the center pixel can't be affected by antialiasing.