changed stored images from bitmap to bytearray