Add option to flip the image horizontally
Use the correct variable type, avoid warning from gcc
Enable blending to show transparency