Reencode image