Ticket #801 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Zoom behavior differs from IJ1

Reported by: curtis Owned by: bdezonia
Priority: minor Milestone: imagej2-b1-initial
Component: Display API Version:
Severity: minor Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by curtis) (diff)

ImageJ1 zooms in according to the increments: 150%, 200%, 300%, 400%, 600%, 800%, 1200%, 1600%, 2400%, 3200%. It zooms out according to the increments: 75%, 50%, 33.3%, 25%, 16.7%, 12.5%, 8.3%, 6.2%, 4.2%, 3.1%.

Internally, these factors are:

In1.5x2x3x4x6x8x12x16x24x32x
Out3/4x1/2x1/3x1/4x1/6x1/8x1/12x1/16x1/24x1/32x

When zooming in or out from a non-standard zoom factor, IJ1 simply "rounds" to the nearest standard zoom factor.

Conversely, our zoom plugin zooms in or out by a factor of 1.2 each time. We should change the zoom plugin to use the above preset factors, though we do not have to limit ourselves to 32x—we can extrapolate the behavior further from there if desired (48x, 64x, 96x, 128x, 192x, 256x, etc.).

Change History

comment:1 Changed 7 years ago by curtis

  • Description modified (diff)

comment:2 Changed 7 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in d6455649e602554bb90199b2af7fa55f04267d09.

Extended zoom levels to 256 and 1/256. Incrementing by 16x beyond the 32 and 1/32 levels. This seems to have good transitions from one level to the next (rather than following IJ1's zoom acceleration curve).

comment:3 Changed 7 years ago by curtis

Nice. However, it looks like zooming out is limited to 8.33%. Also, it would be nice if the percentage did not put the two decimal places (".00") when the zoom factor is an integer. But these are just nitpicks—zoom is quite usable now.

comment:4 Changed 7 years ago by bdezonia

Actually it's not limited to 8.33%. It shrinks down to 1/256 provided the zoomed out image is at least 25x25 pixels in size.

I'll fix the two decimal place issue.

comment:5 Changed 7 years ago by curtis

Ah, I was testing with smaller sample images. Thanks for the explanation.

Note: See TracTickets for help on using tickets.