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

Icons have black borders in linux #54

Open
EwenGao opened this issue Sep 21, 2022 · 2 comments
Open

Icons have black borders in linux #54

EwenGao opened this issue Sep 21, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@EwenGao
Copy link

EwenGao commented Sep 21, 2022

Linux: image

Windows:
image

code:
var icon = new IconData
{
Icon = SKBitmap.Decode(byteIcon),
IconSizePercent = 10,
};

        using var generator = new QRCodeGenerator();
        var qr = generator.CreateQrCode(url, ECCLevel.L);
        var info = new SKImageInfo(512, 512);
        using var surface = SKSurface.Create(info);
        var canvas = surface.Canvas;
        canvas.Render(qr, info.Width, info.Height, SKColor.Parse("ffffff"), SKColor.Parse("000000"), icon);
        using var image = surface.Snapshot();
        using var data = image.Encode(SKEncodedImageFormat.Png, 100);
@guitarrapc
Copy link
Owner

guitarrapc commented Sep 25, 2022

Hi @EwenGao, I've tried reproduce issue but I couldn't.
Could you provide reproduceable example for further deep dive?

Here's my code based on what you provided.
https://gist.github.com/guitarrapc/bc11f8d7c2ae3ce4e481aa391b5e0c88

Environment was Windows 11 and WSL2 (Ubuntu 22.04).

@guitarrapc guitarrapc added the help wanted Extra attention is needed label Sep 25, 2022
@EwenGao
Copy link
Author

EwenGao commented Sep 30, 2022

Thank your answer

I think it's the environment, my environment was Windows 11 and CentOS 7.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants