0.92: Downscaling with gamma correction posterizes dark areas

Bugs which have been reproduced by a second user or the developer, or features to do

Moderators: xnview, Dreamer

Daniel710
Posts: 10
Joined: Mon Oct 08, 2018 5:30 pm

0.92: Downscaling with gamma correction posterizes dark areas

Post by Daniel710 »

XnView: MP 0.92 - 64 bit
OS: Linux

Downscaling an image with gamma correction posterizes dark areas. See the attached image (50% size of the original).

To reproduce, downscale an image with "Use gamma correction" enabled.
PIA11667.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47277
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by xnview »

The original have posterized area
Pierre.
Daniel710
Posts: 10
Joined: Mon Oct 08, 2018 5:30 pm

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by Daniel710 »

The posterized image you see in my post is the downscaled version of the original. I don't see any artifacts on the original image:
Image
Daniel710
Posts: 10
Joined: Mon Oct 08, 2018 5:30 pm

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by Daniel710 »

Still reproducible in XnView: MP 1.3 (and also in XnResize, btw).
User avatar
xnview
Author of XnView
Posts: 47277
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by xnview »

i can't reproduce with your sample image, which output size do you use? could you post the output?
Pierre.
Daniel710
Posts: 10
Joined: Mon Oct 08, 2018 5:30 pm

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by Daniel710 »

Try downscale to e.g. 1806x961 pixels. You can see the output image in the first post: download/file.php?id=5149&mode=view
User avatar
xnview
Author of XnView
Posts: 47277
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by xnview »

where do you see "posterized area"?
Pierre.
Daniel710
Posts: 10
Joined: Mon Oct 08, 2018 5:30 pm

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by Daniel710 »

On the Saturn rings. I attached an image with side-by-side comparison.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47277
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by xnview »

yes a known issue on dark color
Pierre.
damian101
Posts: 13
Joined: Fri Dec 22, 2017 12:43 am

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by damian101 »

Internal bit depth needs to be higher, then this won't happen. Currently, it seems to be 8 bits per channel, which is a joke, awful banding everywhere in dark gradients. Linear light needs to be processed at 16 bits per channel (sufficient for this) or higher internally.
Rotareneg
Posts: 3
Joined: Sat Jan 17, 2009 6:14 am

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by Rotareneg »

Just ran into this issue and was wondering what on earth was going wrong until I tried turning gamma correction off.

Top image is original, bottom is resized to 1919x1079, nearest neighbor with gamma correction enabled:
RGB_gradient.png
RGB_gradient_gamma_correct_scaled.png
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 47277
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: 0.92: Downscaling with gamma correction posterizes dark areas

Post by xnview »

:bugconfirmed:
Pierre.