new version compatible with both JPEG6.2 and 8.0