Issue #48: Improve refineImage on TurboJpegImageWriter