add decodeNamedImage to decode using the format identified by the file name.