Incorrect pixel selection and panning on 1bpp images

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

Moderators: XnTriq, helmut, xnview, Dreamer

Posts: 2
Joined: Thu Jul 08, 2021 9:25 am

Incorrect pixel selection and panning on 1bpp images

Post by mattcro »

I recently tried to do some pixel-level selections on a 1 bit/pixel (binary/monochome) image and realised that XNView MP v1.3.0 doesn't correctly position the selection box on pixel boundaries (not aligned/snapped to whole pixels). This makes pixel-accurate selection and measurement tricky!

Screenshot attached of making a small selection on a mono image when zoomed in at 1600%, showing non-aligned selection box. The box size is always a whole number of pixels, but is not visually aligned to the image pixels.

Related issue: The horizontal panning is not smooth, it jumps in steps of about 8 pixels, and the vertical panning/dragging jumps in steps of 1 image pixel (ie 16 screen pixels at 1600% zoom). If the image is dragged/panned, any existing selection box moves smoothly (in steps of 1 screen pixel) but the image jumps.

This only seems to happen on 1bpp images. Selection and panning with the mouse behave correctly on higher bit depths (greyscale, indexed or full colour). Increasing the colour depth of a 1bpp image allows correct pagging/selection, and reducing a full-colour image to 1bpp causes this misaligned/stepped behaviour.
You do not have the required permissions to view the files attached to this post.
User avatar
Author of XnView
Posts: 38817
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Incorrect pixel selection and panning on 1bpp images

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce