added functionality to convert image to 16bit RGBA