diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 8d12a3fcd67ecb0bebac06ab558857b0951ebcf1..e4b9d242cc515cffbbb9056ef9a208ee60e1c8b7 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -574,7 +574,7 @@ declare namespace image { /** * Height * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -582,7 +582,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - height: int; + height: number; /** * Width @@ -611,7 +611,7 @@ declare namespace image { /** * Width * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -619,7 +619,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - width: int; + width: number; } /** @@ -3217,7 +3217,7 @@ declare namespace image { /** * x-coordinate at the upper left corner of the image. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -3225,7 +3225,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - x: int; + x: number; /** * y-coordinate at the upper left corner of the image. @@ -3254,7 +3254,7 @@ declare namespace image { /** * y-coordinate at the upper left corner of the image. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -3262,7 +3262,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - y: int; + y: number; } /** @@ -3365,7 +3365,7 @@ declare namespace image { /** * Offset for data reading. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -3373,7 +3373,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - offset: int; + offset: number; /** * Number of bytes to read. @@ -3402,7 +3402,7 @@ declare namespace image { /** * Number of bytes to read. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -3410,7 +3410,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - stride: int; + stride: number; /** * Region to read. @@ -3550,7 +3550,7 @@ declare namespace image { /** * Indicates image default density. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -3558,7 +3558,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - density: int; + density: number; /** * The number of byte per row. @@ -3571,14 +3571,14 @@ declare namespace image { /** * The number of byte per row. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - stride: int; + stride: number; /** * Indicates image format. @@ -3727,14 +3727,14 @@ declare namespace image { /** * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - quality: int; + quality: number; /** * BufferSize of the target image. @@ -3757,14 +3757,14 @@ declare namespace image { * BufferSize of the target image. * If this bufferSize is less than or equal to 0, it will be converted to 10MB. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - bufferSize?: int; + bufferSize?: number; /** * The desired dynamic range of the target image. @@ -3910,13 +3910,13 @@ declare namespace image { /** * Index of an image. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - index?: int; + index?: number; /** * Default property value. @@ -3993,7 +3993,7 @@ declare namespace image { /** * Number of image frames. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form @@ -4001,7 +4001,7 @@ declare namespace image { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - index?: int; + index?: number; /** * Sampling ratio of the image pixel map. @@ -4030,7 +4030,7 @@ declare namespace image { /** * Sampling ratio of the image pixel map. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form @@ -4038,7 +4038,7 @@ declare namespace image { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - sampleSize?: int; + sampleSize?: number; /** * Rotation angle of the image pixel map. The value ranges from 0 to 360. @@ -4067,7 +4067,7 @@ declare namespace image { /** * Rotation angle of the image pixel map. The value ranges from 0 to 360. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form @@ -4075,7 +4075,7 @@ declare namespace image { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - rotate?: int; + rotate?: number; /** * Whether the image pixel map is editable. @@ -4256,7 +4256,7 @@ declare namespace image { /** * The density for image pixel map. * - * @type { ?int } + * @type { ?number } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form @@ -4264,7 +4264,7 @@ declare namespace image { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - fitDensity?: int; + fitDensity?: number; /** * Color space of the image pixel map. @@ -4332,24 +4332,24 @@ declare namespace image { /** * Row stride. * - * @type { int } + * @type { number } * @readonly * @syscap SystemCapability.Multimedia.Image.Core * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly rowStride: int; + readonly rowStride: number; /** * Pixel stride. * - * @type { int } + * @type { number } * @readonly * @syscap SystemCapability.Multimedia.Image.Core * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - readonly pixelStride: int; + readonly pixelStride: number; /** * Component buffer. @@ -4658,7 +4658,7 @@ declare namespace image { /** * The density for ImageSource. * - * @type { int } + * @type { number } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -4666,7 +4666,7 @@ declare namespace image { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - sourceDensity: int; + sourceDensity: number; /** * PixelMap expected format. @@ -5278,7 +5278,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform @@ -7938,7 +7938,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + getImageInfo(index: number, callback: AsyncCallback): void; /** * Obtains information about this image and uses a callback to return the result. @@ -8007,7 +8007,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform @@ -8016,19 +8016,19 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + getImageInfo(index?: number): Promise; /** * Get image information from image source synchronously. * - * @param { int } index - Index of sequence images. If this parameter is not specified, default value is 0. + * @param { number } index - Index of sequence images. If this parameter is not specified, default value is 0. * @returns { ImageInfo } The image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - getImageInfoSync(index?: int): ImageInfo; + getImageInfoSync(index?: number): ImageInfo; /** * Creates a PixelMap object based on image decoding parameters. This method uses a promise to @@ -8408,7 +8408,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise> } A Promise instance used to return the array. + * @returns { Promise> } A Promise instance used to return the array. * @throws { BusinessError } 62980096 - The operation failed. * @throws { BusinessError } 62980110 - The image source data is incorrect. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8425,7 +8425,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>; + getDelayTimeList(): Promise>; /** * Obtains the array of delay time in an image. This method uses a callback to return the array. @@ -8449,7 +8449,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise> } callback Callback used to return the array. + * @param { AsyncCallback> } callback Callback used to return the array. * @throws { BusinessError } 62980096 - The operation failed. * @throws { BusinessError } 62980110 - The image source data is incorrect. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8466,7 +8466,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; + getDelayTimeList(callback: AsyncCallback>): void; /** * Obtains the array of disposal type in a gif image. This method uses a promise to return the array. @@ -9207,7 +9207,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. * @throws { BusinessError } 62980096 - The Operation failed. @@ -9224,13 +9224,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + packToFile(source: ImageSource, fd: number, options: PackingOption, callback: AsyncCallback): void; /** * Compresses or packs an image into a file and uses a promise to return the result. * * @param { ImageSource } source Image to be processed. - * @param { int } fd ID of a file descriptor. + * @param { number } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @returns { Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 62980096 - The Operation failed. @@ -9247,13 +9247,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + packToFile(source: ImageSource, fd: number, options: PackingOption): Promise; /** * Compresses or packs an image into a file and uses a callback to return the result. * * @param { PixelMap } source PixelMap to be processed. - * @param { int } fd ID of a file descriptor. + * @param { number } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @param { AsyncCallback } callback Callback used to return the operation result. * @throws { BusinessError } 62980096 - The Operation failed. @@ -9270,13 +9270,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + packToFile(source: PixelMap, fd: number, options: PackingOption, callback: AsyncCallback): void; /** * Compresses or packs an image into a file and uses a promise to return the result. * * @param { PixelMap } source PixelMap to be processed. - * @param { int } fd ID of a file descriptor. + * @param { number } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @returns { Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 62980096 - The Operation failed. @@ -9293,7 +9293,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + packToFile(source: PixelMap, fd: number, options: PackingOption): Promise; /** * Compresses a Pixelmap sequence into gif. @@ -9366,7 +9366,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. @@ -9376,7 +9376,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise + packToFile(picture: Picture, fd: number, options: PackingOption): Promise /** * Supported image formats. @@ -9432,13 +9432,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise