Fixed here and below. I also added a Math.floor as GraphicsMagick doesn't like float values too much