fadden/CiderPress2

Images have artifacts in WPF file viewer

Opened this issue · 0 comments

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.)