jpeg: use option type to return None when failed to decompress jpeg