module ChunkyPNG::Canvas::Adam7Interlacing
def adam7_pass_size(pass, original_width, original_height)
-
original_height
(Integer
) -- The height of the original image. -
original_width
(Integer
) -- The width of the original image. -
pass
(Integer
) -- The pass number, should be in 0..6.
def adam7_pass_size(pass, original_width, original_height) x_shift, x_offset, y_shift, y_offset = adam7_multiplier_offset(pass) [ (original_width - x_offset + (1 << x_shift) - 1) >> x_shift, (original_height - y_offset + (1 << y_shift) - 1) >> y_shift, ] end