issue #2345: edit getPixelFormatInfoMap method to return reference.
issue #2345: fix mac crash due to libjpeg