$ 0 0 It most likely gets grainy because your input image is smaller than your target size. Was that gif image the original input image?