class PixelInfo
@coordinatesToLocation: (x, y, width) ->
(y * width + x) * 4
@locationToCoordinates: (loc, width) ->
y = Math.floor(loc / (width * 4))
x = (loc % (width * 4)) / 4
return x: x, y: y
constructor: (@c) -> @loc = 0