Fixed a nasty bug in createImage that forced the format to RGBA