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

Images have artifacts in WPF file viewer #8

Open
fadden opened this issue Jan 16, 2024 · 0 comments
Open

Images have artifacts in WPF file viewer #8

fadden opened this issue Jan 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fadden
Copy link
Owner

fadden commented Jan 16, 2024

When displaying converted images, the file viewer uses a WPF Image control with NearestNeighbor scaling. If the control size is set to the exact size of the image, various artifacts appear. MacPaint images with fine detail look especially bad.

image image

If the size of the output image is increased by one pixel in each dimension, most of the artifacts disappear, though you can now see an extra row and column on some images:

image image

The latter is generally easier on the eyes, so the size change was submitted in 99c2291.

Additional notes:

  • The dimension must be changed for both width and height. Adding 1 to only one dimension doesn't make the problem go away, which is odd since the distortion is primarily in the columns.
  • Adding 0.5 instead of 1 didn't seem to change things.

The distortion only affects the on-screen appearance. Images exported as PNG or copied & pasted to other applications are fine:

image

(Primary test file is a Print Shop clip art file called BARNS, found in test-files.sdk here.)

@fadden fadden added the bug Something isn't working label Jan 16, 2024
@fadden fadden changed the title Images have artifacts in file viewer Images have artifacts in WPF file viewer Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant