Calculate the number of zoom levels using max rather than min dimension.

On high aspect ratio stacks, the calculated scale value can be too small to view the entire stack at once.