1# Image Framework Changelog 2 3## cl.image.1 Changed the Return Value of mimeType in ImageInfo 4 5**Access Level** 6 7Public API 8 9**Reason for Change** 10 11The interface is used for querying image information, and the current return values do not match the actual formats. 12- For raw format images, the actual **mimeType** should reflect the true format. Since the current decoding of raw format images results in **previewImage** or **JpgFromRaw** fields, the incorrect value **image/jpeg** is returned. 13- For icon format images, the standard name is not used in the return value. 14 15**Impact of the Change** 16 17This change requires application adaptation. 18 19| Actual Format| Return Value Before Change| Return Value After Change| Decoding Support|Encoding Support| 20| --- | --- | --- | --- | --- | 21|jpeg|image/jpeg|image/jpeg|Supported|Supported| 22|icon|image/ico|image/x-icon|Supported|Not supported| 23|dng|image/jpeg|image/x-adobe-dng|Supported|Not supported| 24|cr2|image/jpeg|image/x-canon-cr2|Decoding of preview supported|Not supported| 25|raf|image/jpeg|image/x-fuji-raf|Decoding of preview supported|Not supported| 26|nef|image/jpeg|image/x-nikon-nef|Decoding of preview supported|Not supported| 27|nrw|image/jpeg|image/x-nikon-nrw|Decoding of preview supported|Not supported| 28|orf|image/jpeg|image/x-olympus-orf|Decoding of preview supported|Not supported| 29|rw2|image/jpeg|image/x-panasonic-rw2|Decoding of preview supported|Not supported| 30|pef|image/jpeg|image/x-pentax-pef|Decoding of preview supported|Not supported| 31|srw|image/jpeg|image/x-samsung-srw|Decoding of preview supported|Not supported| 32|arw|image/jpeg|image/x-sony-arw|Decoding of preview supported|Not supported| 33 34 35**Start API Level** 36 37API 12 38 39**Change Since** 40 41OpenHarmony SDK 6.0.0.32 42 43**Key API/Component Changes** 44 45The return value of the **mimeType** parameter in the ImageInfo object is changed. 46 47**Adaptation Guide** 48 49The return value of the image information query interface has changed, but the calling method remains the same. 50```js 51const context: Context = getContext(this); 52// 'test.dng' is only an example. Replace it with the actual one in use. Otherwise, the imageSource instance fails to be created, and subsequent operations cannot be performed. 53const path: string = context.filesDir + "/test.dng"; 54const imageSourceApi: image.ImageSource = image.createImageSource(path); 55if (imageSourceApi != undefined) { 56 imageSourceApi.getImageInfo().then((imageInfo: image.ImageInfo) => { 57 console.info("Succeeded in obtaining the image mimeType information."); 58 // No need to change the calling method. Update the condition here to match the new return value for actual raw formats. 59 if (imageInfo.mimeType == "image/x-adobe-dng") { 60 console.info("Image mimeType is image/x-adobe-dng."); 61 } 62 }).catch((error: BusinessError) => { 63 console.error(`Failed to obtain the image information. code is ${error.code}, message is ${error.message}`); 64 }) 65} 66``` 67