OH_ImageSourceNative *imageSource = NULL; // 打开图片文件fd OH_ImageSourceNative_CreateFromFd(fd, &imageSource); OH_DecodingOptions *decodingOptions = NULL; OH_DecodingOptions_Create(&decodingOptions); OH_DecodingOptions_SetDesiredDynamicRange(IMAGE_DYNAMIC_RANGE_HDR); OH_PixelmapNative *pixelMap = NULL; OH_ImageSourceNative_CreatePixelmap(imageSource,decodingOptions,&pixelMap);