diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 3301efb2ef5782c40687755efceebfd9c068ae21..1886841fd9f561b007c4acb8f2a5689406e7f507 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -18,7 +18,6 @@ import { AsyncCallback } from './basic'; /** * @name image * @since 6 - * @import import image from '@ohos.multimedia.image'; */ declare namespace image { @@ -654,7 +653,7 @@ declare namespace image { * @since 6 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param uri Image source URI. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(uri: string): ImageSource; @@ -664,7 +663,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param uri Image source URI. * @param options The config of Image source. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(uri: string, options: SourceOptions): ImageSource; @@ -673,7 +672,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param fd ID of a file descriptor. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(fd: number): ImageSource; @@ -683,7 +682,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param fd ID of a file descriptor. * @param options The config of Image source. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(fd: number, options: SourceOptions): ImageSource; @@ -692,7 +691,7 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param buf The buffer of the image. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(buf: ArrayBuffer): ImageSource; @@ -702,7 +701,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param buf The buffer of the image. * @param options The config of Image source. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function createImageSource(buf: ArrayBuffer, options: SourceOptions): ImageSource; @@ -711,7 +710,7 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param buf The buffer of the image. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function CreateIncrementalSource(buf: ArrayBuffer): ImageSource; @@ -721,7 +720,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param buf The buffer of the image. * @param options The config of source. - * @return Returns the ImageSource instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageSource instance if the operation is successful; returns null otherwise. */ function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): ImageSource; @@ -729,7 +728,7 @@ declare namespace image { * Creates an ImagePacker instance. * @since 6 * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @return Returns the ImagePacker instance if the operation is successful; returns null otherwise. + * @returns Returns the ImagePacker instance if the operation is successful; returns null otherwise. */ function createImagePacker(): ImagePacker; @@ -742,7 +741,7 @@ declare namespace image { * @param format The format of the Image that this receiver will produce. This must be one of the * {@link ImageFormat} constants. Note that not all formats are supported, like ImageFormat.NV21. * @param capacity The maximum number of images the user will want to access simultaneously. - * @return Returns the ImageReceiver instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageReceiver instance if the operation is successful; returns null otherwise. */ function createImageReceiver(width: number, height: number, format: number, capacity: number): ImageReceiver; @@ -755,7 +754,7 @@ declare namespace image { * @param format The format of the Image that this creator will produce. This must be one of the * {@link ImageFormat} constants. Note that not all formats are supported, like ImageFormat.NV21. * @param capacity The maximum number of images the user will want to access simultaneously. - * @return Returns the ImageCreator instance if the operation is successful; returns null otherwise. + * @returns Returns the ImageCreator instance if the operation is successful; returns null otherwise. */ function createImageCreator(width: number, height: number, format: number, capacity: number): ImageCreator; @@ -778,7 +777,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.Core * @param dst A buffer to which the image pixel map data will be written. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ readPixelsToBuffer(dst: ArrayBuffer): Promise; @@ -797,7 +796,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.Core * @param area Area from which the image pixel map data will be read. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ readPixels(area: PositionArea): Promise; @@ -816,7 +815,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.Core * @param area Area to which the image pixel map data will be written. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ writePixels(area: PositionArea): Promise; @@ -836,7 +835,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.Core * @param src A buffer from which the image data will be read. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ writeBufferToPixels(src: ArrayBuffer): Promise; @@ -854,7 +853,7 @@ declare namespace image { * Obtains pixel map information about this image. This method uses a promise to return the information. * @since 7 * @syscap SystemCapability.Multimedia.Image.Core - * @return A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. */ getImageInfo(): Promise; @@ -870,7 +869,7 @@ declare namespace image { * Obtains the number of bytes in each line of the image pixel map. * @since 7 * @syscap SystemCapability.Multimedia.Image.Core - * @return Number of bytes in each line. + * @returns Number of bytes in each line. */ getBytesNumberPerRow(): number; @@ -878,7 +877,7 @@ declare namespace image { * Obtains the total number of bytes of the image pixel map. * @since 7 * @syscap SystemCapability.Multimedia.Image.Core - * @return Total number of bytes. + * @returns Total number of bytes. */ getPixelBytesNumber(): number; @@ -886,7 +885,7 @@ declare namespace image { * Obtains the density of the image pixel map. * @since 9 * @syscap SystemCapability.Multimedia.Image.Core - * @return The number of density. + * @returns The number of density. */ getDensity():number; @@ -904,20 +903,20 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.Core * @param rate The value of transparent rate. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ opacity(rate: number): Promise; /** - * Obtains new pixel map with allpha information. This method uses a promise to return the information. + * Obtains new pixel map with alpha information. This method uses a promise to return the information. * @since 9 * @syscap SystemCapability.Multimedia.Image.Core - * @return A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. */ createAlphaPixelmap(): Promise; /** - * Obtains new pixel map with allpha information. This method uses a callback to return the information. + * Obtains new pixel map with alpha information. This method uses a callback to return the information. * @since 9 * @syscap SystemCapability.Multimedia.Image.Core * @param callback Callback used to return the new image pixel map. If the operation fails, an error message is returned. @@ -940,7 +939,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.Core * @param x The zoom value of width. * @param y The zoom value of height. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ scale(x: number, y: number): Promise; @@ -960,7 +959,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.Core * @param x The position value of width. * @param y The position value of height. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ translate(x: number, y: number): Promise; @@ -978,7 +977,7 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.Core * @param angle The rotation angle. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ rotate(angle: number): Promise; @@ -998,7 +997,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.Core * @param horizontal Is flip in horizontal. * @param vertical Is flip in vertical. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ flip(horizontal: boolean, vertical: boolean): Promise; @@ -1016,7 +1015,7 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.Core * @param region The region to crop. - * @return A Promise instance used to return the operation result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the operation result. If the operation fails, an error message is returned. */ crop(region: Region): Promise; @@ -1032,7 +1031,7 @@ declare namespace image { * Releases this PixelMap object. This method uses a promise to return the result. * @since 7 * @syscap SystemCapability.Multimedia.Image.Core - * @return A Promise instance used to return the instance release result. If the operation fails, an error message is returned. + * @returns A Promise instance used to return the instance release result. If the operation fails, an error message is returned. */ release(): Promise; } @@ -1066,7 +1065,7 @@ declare namespace image { * @since 6 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param index Sequence number of an image. If this parameter is not specified, the default value 0 is used. - * @return A Promise instance used to return the image information. + * @returns A Promise instance used to return the image information. */ getImageInfo(index?: number): Promise; @@ -1076,7 +1075,7 @@ declare namespace image { * @since 7 * @syscap SystemCapability.Multimedia.Image.ImageSource * @param options Image decoding parameters. - * @return A Promise instance used to return the PixelMap object. + * @returns A Promise instance used to return the PixelMap object. */ createPixelMap(options?: DecodingOptions): Promise; @@ -1105,7 +1104,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param key Name of the property whose value is to be obtained. * @param options Index of the image. - * @return A Promise instance used to return the property value. If the operation fails, the default value is returned. + * @returns A Promise instance used to return the property value. If the operation fails, the default value is returned. */ getImageProperty(key: string, options?: GetImagePropertyOptions): Promise; @@ -1137,7 +1136,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImageSource * @param key Name of the property whose value is to be modified. * @param value The value to be set to property. - * @return A Promise instance used to return the property value. + * @returns A Promise instance used to return the property value. */ modifyImageProperty(key: string, value: string): Promise; @@ -1160,7 +1159,7 @@ declare namespace image { * @param isFinished If is it finished. * @param value The offset of data. * @param length The length fo buf. - * @return A Promise instance used to return the property value. + * @returns A Promise instance used to return the property value. */ updateData(buf: ArrayBuffer, isFinished: boolean, value: number, length: number): Promise; @@ -1188,7 +1187,7 @@ declare namespace image { * Releases an ImageSource instance and uses a promise to return the result. * @since 6 * @syscap SystemCapability.Multimedia.Image.ImageSource - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ release(): Promise; @@ -1222,7 +1221,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImagePacker * @param source Image to be processed. * @param option Option for image packing. - * @return A Promise instance used to return the compressed or packed data. + * @returns A Promise instance used to return the compressed or packed data. */ packing(source: ImageSource, option: PackingOption): Promise; @@ -1242,7 +1241,7 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImagePacker * @param source PixelMap to be processed. * @param option Option for image packing. - * @return A Promise instance used to return the compressed or packed data. + * @returns A Promise instance used to return the compressed or packed data. */ packing(source: PixelMap, option: PackingOption): Promise; @@ -1258,7 +1257,7 @@ declare namespace image { * Releases an ImagePacker instance and uses a promise to return the result. * @since 6 * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ release(): Promise; @@ -1311,7 +1310,7 @@ declare namespace image { * @since 9 * @syscap SystemCapability.Multimedia.Image.Core * @param componentType The component type of image. - * @return A Promise instance used to return the component buffer. + * @returns A Promise instance used to return the component buffer. */ getComponent(componentType: ComponentType): Promise; @@ -1327,7 +1326,7 @@ declare namespace image { * Release current image to receive another and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.Core - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ release(): Promise; } @@ -1373,7 +1372,7 @@ declare namespace image { * and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @return A Promise instance used to return the surface id. + * @returns A Promise instance used to return the surface id. */ getReceivingSurfaceId(): Promise; @@ -1389,7 +1388,7 @@ declare namespace image { * Get lasted image from receiver and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @return A Promise instance used to return the latest image. + * @returns A Promise instance used to return the latest image. */ readLatestImage(): Promise; @@ -1405,7 +1404,7 @@ declare namespace image { * Get next image from receiver and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @return A Promise instance used to return the next image. + * @returns A Promise instance used to return the next image. */ readNextImage(): Promise; @@ -1430,7 +1429,7 @@ declare namespace image { * Release image receiver instance and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ release(): Promise; } @@ -1467,7 +1466,7 @@ declare namespace image { * Apply for new graphic buffer from free queue and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ dequeueImage(): Promise; @@ -1483,7 +1482,7 @@ declare namespace image { * Queue buffer to dirty queue and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ queueImage(interface: Image): Promise; @@ -1508,7 +1507,7 @@ declare namespace image { * Releases buffer in bufferqueue instance and uses a promise to return the result. * @since 9 * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @return A Promise instance used to return the operation result. + * @returns A Promise instance used to return the operation result. */ release(): Promise; }