Image Compression and reformatting