lib/chunky_png/canvas/adam7_interlacing.rb
# Returns the pixel dimensions of the requested pass.
# @param [Integer] pass The pass number, should be in 0..6.
# @param [Integer] original_width The width of the original image.
# @param [Integer] original_height The height of the original image.
Returns the pixel dimensions of the requested pass.
Returns the pixel dimensions of the requested pass .
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
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
Returns the pixel dimensions of the requested pass.
Returns the pixel dimensions of the requested pass .
pass
<not_specific>
original_width
<not_specific>
original_height
<not_specific>
<not_specific>
original_height The height of the original image.
original_height The height of the original image .