module ChunkyPNG::Canvas::Resampling

def steps(width, new_width)

Returns:
  • (Array) - An Array of Integer indicies

Parameters:
  • new_width (Integer) -- The width of the destination
  • width (Integer) -- The width of the source
def steps(width, new_width)
  indicies, residues = steps_residues(width, new_width)
  for i in 1..new_width
    indicies[i - 1] = (indicies[i - 1] + (residues[i - 1] + 127) / 255)
  end
  indicies
end