Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated icons have jagged edges #35

Open
Tracked by #34
atjn opened this issue Jan 26, 2024 · 2 comments
Open
Tracked by #34

Generated icons have jagged edges #35

atjn opened this issue Jan 26, 2024 · 2 comments

Comments

@atjn
Copy link

atjn commented Jan 26, 2024

I am generating my icons with the minimal-2023 preset and the original icon is:

<svg style="height:100%;width:100%" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
  <path d="m3 3h26v6h-26z" fill="#C1CBFF"/>
  <path d="m5 9h22v18h-22z" fill="#D6DDFF"/>
  <path d="m15 3h2v24h-2z" fill="#8EA1FF" opacity=".7"/>
</svg>

The generated icons should look like this:
image

But the 64x64 has wierd fringing in the top:
image

And the 192x192 also has it down the middle:
image

Even the 512x512 has it, although it is too small to notice. I don't understand how that happens, it seems to me like it would definitely produce a uniform color given that it is following a completely straight SVG line.

I haven't tried to see if I can find a setting that would make this go away, but even if there is one, I think the default settings should be changed to ensure that straight lines also look straight in the generated icons.

@atjn atjn mentioned this issue Jan 26, 2024
11 tasks
@atjn atjn changed the title Generated icon looks weird Generated icons have jagged edges Jan 26, 2024
@userquin
Copy link
Member

This package uses sharp to generate the icons, I have no idea why this weird output, I Will check it on my local.

@cyberalien
Copy link

Sharp uses libvips to generate icons, which uses ImageMagick to parse SVGs, so probably ImageMagick bug: https://github.com/imagemagick/imagemagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants