Transparent pixels dont get filtered correctly

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

Moderators: XnTriq, xnview

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)
You do not have the required permissions to view the files attached to this post.
Last edited by 3murmeln on Sat Jul 09, 2016 9:58 am, edited 1 time in total.
User avatar
XnTriq
Moderator & Librarian
Posts: 5925
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: 5925
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: 5925
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):
browser_lq_050.png
browser_hq_050.png
browser_lq_300.png
browser_hq_300.png
viewer_lq_050.png
viewer_hq_050.png
viewer_lq_150.png
viewer_hq_150.png
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.
You do not have the required permissions to view the files attached to this post.