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

ZPL.Viewer Image Dark #272

Open
Tromed opened this issue Sep 23, 2024 · 1 comment
Open

ZPL.Viewer Image Dark #272

Tromed opened this issue Sep 23, 2024 · 1 comment

Comments

@Tromed
Copy link

Tromed commented Sep 23, 2024

Hi,

I Was testing the ZPL.Viewer and when I save the generated Image it is dark. Is this intended?

Ty

@masternan
Copy link

set OpaqueBackground=false in DrawerOptions ,such as following code.

private static DrawerOptions BuildDrawOption(string fontName = "NotoSansSC-SemiBold")
{
var fontFile = Path.Combine(AppContext.BaseDirectory, "fonts", $"{fontName}.ttf");
var drawOptions = new DrawerOptions
{
FontLoader = fontName => { return SKTypeface.FromFile(fontFile); },
OpaqueBackground = false,
PdfOutput = false,
RenderFormat = SKEncodedImageFormat.Png,
RenderQuality = 100,
Antialias = true,
ReplaceDashWithEnDash = false
};
return drawOptions;
}

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

2 participants