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

WPF Context.DrawImage generates trash on some image sizes #737

Open
ShadowTeolog opened this issue Oct 11, 2017 · 2 comments
Open

WPF Context.DrawImage generates trash on some image sizes #737

ShadowTeolog opened this issue Oct 11, 2017 · 2 comments

Comments

@ShadowTeolog
Copy link

Executing code below makes wrong output without any error.
Input with power of two-OK
Immediate saves background to file without ImageBuilder- OK
Draw text on image builder context and save to file without DrawImage- OK
Draw text on image builder context and save to file with DrawImage- text view OK, image on background -corrupt
look like Scanline calculations is broken inside DrawImage
void TestImage(string name)
{
var background = Image.FromFile(name);
var builder = new ImageBuilder(background.Width, background.Height);
var ctx = builder.Context;
ctx.DrawImage(background, new Rectangle(0, 0, background.Width, background.Height));
var bitmap = builder.ToBitmap();
bitmap.Save("test.png",ImageFileType.Png);
}

label2
test

@slluis
Copy link
Member

slluis commented Oct 11, 2017

On which backend?

@slluis
Copy link
Member

slluis commented Oct 11, 2017

Ah, WPF

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