image rotation: fixed error when using libjpeg_turbo