Reencoding image data