possible image to byte stream code