Improve Image Encoding