Transparent pixels dont get filtered correctly

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
3murmeln
Posts: 2
Joined: Sat Jul 09, 2016 7:50 am

Transparent pixels dont get filtered correctly

Post by 3murmeln »

Transparent pixels dont get filtered correctly if adjanced to none transparent pixels.

Attached I have a picture of a white circle with red background (background 100% transparent).
If you view this at 100% you correctly get a white circle.
If you view it scaled to less than 100% the circle edges start bleeding red, which is wrong.

This is because the filter doesnt weigh pixels by their transparency-value, so a red pixel with 100% transparency and a white pixel with no transparency become a light red pixel with 50% transparency instead of a white pixel with 50% transparency.

ADDENDUM:
- for viewing pictures the bug only happens with high quality zoom enabled
- for resizing an image the bug always happens (not with nearest pixel mode)
Attachments
Example.bmp
Example.bmp (976.62 KiB) Viewed 2179 times
Last edited by 3murmeln on Sat Jul 09, 2016 9:58 am, edited 1 time in total.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Transparent pixels dont get filtered correctly

Post by XnTriq »

Confirmed for activated High quality zoom (Tools » Options... » View » View).
3murmeln
Posts: 2
Joined: Sat Jul 09, 2016 7:50 am

Re: Transparent pixels dont get filtered correctly

Post by 3murmeln »

It seems the bug even happens when you resize the image via resize-function, no matter which filter.
And here even disabling high quality zoom doesnt help.

Added it to the main-post.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Transparent pixels dont get filtered correctly

Post by XnTriq »

3murmeln wrote:It seems the bug even happens when you resize the image via resize-function, no matter which filter.
See also: Reducing Halo Effect in Rescaled/Resized Images
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Transparent pixels dont get filtered correctly

Post by XnTriq »

XnView v2.40 (top) vs. v2.39 (bottom):
Thumbnails & preview @ 50% low-quality zoom
Thumbnails & preview @ 50% low-quality zoom
Thumbnails & preview @ 50% high-quality zoom
Thumbnails & preview @ 50% high-quality zoom
Thumbnails & preview @ 300% low-quality zoom
Thumbnails & preview @ 300% low-quality zoom
Thumbnails & preview @ 300% high-quality zoom
Thumbnails & preview @ 300% high-quality zoom
Viewer/editor @ 50% low-quality zoom
Viewer/editor @ 50% low-quality zoom
Viewer/editor @ 50% high-quality zoom
Viewer/editor @ 50% high-quality zoom
Viewer/editor @ 150% low-quality zoom
Viewer/editor @ 150% low-quality zoom
Viewer/editor @ 150% high-quality zoom
Viewer/editor @ 150% high-quality zoom
Remaining issues:
  1. In view mode, zooming in still produces a “halo” if ToolsOptions...ViewViewHigh quality zoomEnlarge is activated.
  2. High-quality zoom doesn't work in the preview pane.
PS: I haven't done any tests for fullscreen and fullscreen lite yet.
Post Reply