Sharp SDF (Signed Distance Fields) #5116
Unanswered
jbooth-geoplan
asked this question in
Q&A
Replies: 3 comments 1 reply
-
sdf icons is the best approach to recolor icon, you can increase the size of the sdf icon to get better results. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Loss of sharpness is inherent to the signed-distance field technique. You can read more about this here: https://github.com/Chlumsky/msdfgen |
Beta Was this translation helpful? Give feedback.
0 replies
-
Try the style image missing event then. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to have high quality map icons, whilst also supporting re-colouring?
I have attempted to do this by loading a PNG image that supports SDF (i.e. a single colour PNG file). If I load this icon without SDF I can get sharp icons on the map, which I cannot recolour. By marking the images as SDF, I can then recolour, but I significantly loose sharpness on the icons. Ideally, I would like to take advantage of being able to re-colour the icons in system so that I can apply multiple colours to a single map layer, without having to load individual icons for each colour.
Is there a way around this so that I can have the best of both? I have tried increasing the size of the original icons (i.e. more pixels) to improve the image quality, but the degradation when applying SDF still makes it worse than a smaller icon without SDF enabled. It could be as simple as I am not creating the original icons correctly, but my icons are fairly basic (e.g. a black circle, square, star or shield).
Any help much appreciated. Thanks,
Jon.
Beta Was this translation helpful? Give feedback.
All reactions