1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ImageKit 19 */ 20 21import { AsyncCallback } from './@ohos.base'; 22import type colorSpaceManager from './@ohos.graphics.colorSpaceManager'; 23import type resourceManager from './@ohos.resourceManager'; 24import type rpc from './@ohos.rpc'; 25 26/** 27 * @namespace image 28 * @since 6 29 */ 30/** 31 * This module provides the capability of image codec and access 32 * @namespace image 33 * @syscap SystemCapability.Multimedia.Image.Core 34 * @crossplatform 35 * @atomicservice 36 * @since 11 37 */ 38/** 39 * This module provides the capability of image codec and access 40 * @namespace image 41 * @syscap SystemCapability.Multimedia.Image.Core 42 * @crossplatform 43 * @form 44 * @atomicservice 45 * @since 12 46 */ 47declare namespace image { 48 /** 49 * Enumerates pixel map formats. 50 * 51 * @enum { number } 52 * @syscap SystemCapability.Multimedia.Image.Core 53 * @since 7 54 */ 55 /** 56 * Enumerates pixel map formats. 57 * 58 * @enum { number } 59 * @syscap SystemCapability.Multimedia.Image.Core 60 * @crossplatform 61 * @since 10 62 */ 63 /** 64 * Enumerates pixel map formats. 65 * 66 * @enum { number } 67 * @syscap SystemCapability.Multimedia.Image.Core 68 * @crossplatform 69 * @atomicservice 70 * @since 11 71 */ 72 /** 73 * Enumerates pixel map formats. 74 * 75 * @enum { number } 76 * @syscap SystemCapability.Multimedia.Image.Core 77 * @crossplatform 78 * @form 79 * @atomicservice 80 * @since 12 81 */ 82 enum PixelMapFormat { 83 /** 84 * Indicates an unknown format. 85 * 86 * @syscap SystemCapability.Multimedia.Image.Core 87 * @since 7 88 */ 89 /** 90 * Indicates an unknown format. 91 * 92 * @syscap SystemCapability.Multimedia.Image.Core 93 * @crossplatform 94 * @since 10 95 */ 96 /** 97 * Indicates an unknown format. 98 * 99 * @syscap SystemCapability.Multimedia.Image.Core 100 * @crossplatform 101 * @atomicservice 102 * @since 11 103 */ 104 /** 105 * Indicates an unknown format. 106 * 107 * @syscap SystemCapability.Multimedia.Image.Core 108 * @crossplatform 109 * @form 110 * @atomicservice 111 * @since 12 112 */ 113 UNKNOWN = 0, 114 115 /** 116 * Indicates that each pixel is stored on 16 bits. Only the R, G, and B components are encoded 117 * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, 118 * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. 119 * 120 * @syscap SystemCapability.Multimedia.Image.Core 121 * @since 7 122 */ 123 /** 124 * Indicates that each pixel is stored on 16 bits. Only the R, G, and B components are encoded 125 * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, 126 * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. 127 * 128 * @syscap SystemCapability.Multimedia.Image.Core 129 * @crossplatform 130 * @since 10 131 */ 132 /** 133 * Indicates that each pixel is stored on 16 bits. Only the R, G, and B components are encoded 134 * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, 135 * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. 136 * 137 * @syscap SystemCapability.Multimedia.Image.Core 138 * @crossplatform 139 * @atomicservice 140 * @since 11 141 */ 142 /** 143 * Indicates that each pixel is stored on 16 bits. Only the R, G, and B components are encoded 144 * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, 145 * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. 146 * 147 * @syscap SystemCapability.Multimedia.Image.Core 148 * @crossplatform 149 * @form 150 * @atomicservice 151 * @since 12 152 */ 153 RGB_565 = 2, 154 155 /** 156 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 157 * and are stored from the higher-order to the lower-order bits. 158 * 159 * @syscap SystemCapability.Multimedia.Image.Core 160 * @since 7 161 */ 162 /** 163 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 164 * and are stored from the higher-order to the lower-order bits. 165 * 166 * @syscap SystemCapability.Multimedia.Image.Core 167 * @crossplatform 168 * @since 10 169 */ 170 /** 171 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 172 * and are stored from the higher-order to the lower-order bits. 173 * 174 * @syscap SystemCapability.Multimedia.Image.Core 175 * @crossplatform 176 * @atomicservice 177 * @since 11 178 */ 179 /** 180 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 181 * and are stored from the higher-order to the lower-order bits. 182 * 183 * @syscap SystemCapability.Multimedia.Image.Core 184 * @crossplatform 185 * @form 186 * @atomicservice 187 * @since 12 188 */ 189 RGBA_8888 = 3, 190 191 /** 192 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 193 * and are stored from the higher-order to the lower-order bits. 194 * 195 * @syscap SystemCapability.Multimedia.Image.Core 196 * @since 9 197 */ 198 /** 199 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 200 * and are stored from the higher-order to the lower-order bits. 201 * 202 * @syscap SystemCapability.Multimedia.Image.Core 203 * @crossplatform 204 * @since 10 205 */ 206 /** 207 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 208 * and are stored from the higher-order to the lower-order bits. 209 * 210 * @syscap SystemCapability.Multimedia.Image.Core 211 * @crossplatform 212 * @atomicservice 213 * @since 11 214 */ 215 /** 216 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 217 * and are stored from the higher-order to the lower-order bits. 218 * 219 * @syscap SystemCapability.Multimedia.Image.Core 220 * @crossplatform 221 * @form 222 * @atomicservice 223 * @since 12 224 */ 225 BGRA_8888 = 4, 226 227 /** 228 * Indicates that each pixel is stored on 24 bits. Each pixel contains 3 components:R(8bits), G(8bits), B(8bits) 229 * and are stored from the higher-order to the lower-order bits. 230 * 231 * @syscap SystemCapability.Multimedia.Image.Core 232 * @since 9 233 */ 234 /** 235 * Indicates that each pixel is stored on 24 bits. Each pixel contains 3 components:R(8bits), G(8bits), B(8bits) 236 * and are stored from the higher-order to the lower-order bits. 237 * 238 * @syscap SystemCapability.Multimedia.Image.Core 239 * @crossplatform 240 * @since 10 241 */ 242 /** 243 * Indicates that each pixel is stored on 24 bits. Each pixel contains 3 components:R(8bits), G(8bits), B(8bits) 244 * and are stored from the higher-order to the lower-order bits. 245 * 246 * @syscap SystemCapability.Multimedia.Image.Core 247 * @crossplatform 248 * @atomicservice 249 * @since 11 250 */ 251 /** 252 * Indicates that each pixel is stored on 24 bits. Each pixel contains 3 components:R(8bits), G(8bits), B(8bits) 253 * and are stored from the higher-order to the lower-order bits. 254 * 255 * @syscap SystemCapability.Multimedia.Image.Core 256 * @crossplatform 257 * @form 258 * @atomicservice 259 * @since 12 260 */ 261 RGB_888 = 5, 262 263 /** 264 * Indicates that each pixel is stored on 8 bits. Each pixel contains 1 component:ALPHA(8bits) 265 * and is stored from the higher-order to the lower-order bits. 266 * 267 * @syscap SystemCapability.Multimedia.Image.Core 268 * @since 9 269 */ 270 /** 271 * Indicates that each pixel is stored on 8 bits. Each pixel contains 1 component:ALPHA(8bits) 272 * and is stored from the higher-order to the lower-order bits. 273 * 274 * @syscap SystemCapability.Multimedia.Image.Core 275 * @crossplatform 276 * @since 10 277 */ 278 /** 279 * Indicates that each pixel is stored on 8 bits. Each pixel contains 1 component:ALPHA(8bits) 280 * and is stored from the higher-order to the lower-order bits. 281 * 282 * @syscap SystemCapability.Multimedia.Image.Core 283 * @crossplatform 284 * @atomicservice 285 * @since 11 286 */ 287 /** 288 * Indicates that each pixel is stored on 8 bits. Each pixel contains 1 component:ALPHA(8bits) 289 * and is stored from the higher-order to the lower-order bits. 290 * 291 * @syscap SystemCapability.Multimedia.Image.Core 292 * @crossplatform 293 * @form 294 * @atomicservice 295 * @since 12 296 */ 297 ALPHA_8 = 6, 298 299 /** 300 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 301 * and are stored from the higher-order to the lower-order bits in F16. 302 * 303 * @syscap SystemCapability.Multimedia.Image.Core 304 * @since 9 305 */ 306 /** 307 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 308 * and are stored from the higher-order to the lower-order bits in F16. 309 * 310 * @syscap SystemCapability.Multimedia.Image.Core 311 * @crossplatform 312 * @since 10 313 */ 314 /** 315 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 316 * and are stored from the higher-order to the lower-order bits in F16. 317 * 318 * @syscap SystemCapability.Multimedia.Image.Core 319 * @crossplatform 320 * @atomicservice 321 * @since 11 322 */ 323 /** 324 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) 325 * and are stored from the higher-order to the lower-order bits in F16. 326 * 327 * @syscap SystemCapability.Multimedia.Image.Core 328 * @crossplatform 329 * @form 330 * @atomicservice 331 * @since 12 332 */ 333 RGBA_F16 = 7, 334 335 /** 336 * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits 337 * and are stored from the higher-order to the lower-order bits. 338 * 339 * @syscap SystemCapability.Multimedia.Image.Core 340 * @since 9 341 */ 342 /** 343 * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits 344 * and are stored from the higher-order to the lower-order bits. 345 * 346 * @syscap SystemCapability.Multimedia.Image.Core 347 * @crossplatform 348 * @since 10 349 */ 350 /** 351 * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits 352 * and are stored from the higher-order to the lower-order bits. 353 * 354 * @syscap SystemCapability.Multimedia.Image.Core 355 * @crossplatform 356 * @atomicservice 357 * @since 11 358 */ 359 /** 360 * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits 361 * and are stored from the higher-order to the lower-order bits. 362 * 363 * @syscap SystemCapability.Multimedia.Image.Core 364 * @crossplatform 365 * @form 366 * @atomicservice 367 * @since 12 368 */ 369 NV21 = 8, 370 371 /** 372 * Indicates that the storage order is to store Y first and then U V alternately each occupies 8 bits 373 * and are stored from the higher-order to the lower-order bits. 374 * 375 * @syscap SystemCapability.Multimedia.Image.Core 376 * @since 9 377 */ 378 /** 379 * Indicates that the storage order is to store Y first and then U V alternately each occupies 8 bits 380 * and are stored from the higher-order to the lower-order bits. 381 * 382 * @syscap SystemCapability.Multimedia.Image.Core 383 * @crossplatform 384 * @since 10 385 */ 386 /** 387 * Indicates that the storage order is to store Y first and then U V alternately each occupies 8 bits 388 * and are stored from the higher-order to the lower-order bits. 389 * 390 * @syscap SystemCapability.Multimedia.Image.Core 391 * @crossplatform 392 * @atomicservice 393 * @since 11 394 */ 395 /** 396 * Indicates that the storage order is to store Y first and then U V alternately each occupies 8 bits 397 * and are stored from the higher-order to the lower-order bits. 398 * 399 * @syscap SystemCapability.Multimedia.Image.Core 400 * @crossplatform 401 * @form 402 * @atomicservice 403 * @since 12 404 */ 405 NV12 = 9, 406 407 /** 408 * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components: 409 * R(10bits), G(10bits), B(10bits), A(2bits) and are stored from the higher-order to the lower-order bits. 410 * 411 * @syscap SystemCapability.Multimedia.Image.Core 412 * @since 12 413 */ 414 RGBA_1010102 = 10, 415 416 /** 417 * Indicates that the storage order is to store Y first and then U V alternately each occupies 10 bits 418 * and are stored from the higher-order to the lower-order bits. 419 * 420 * @syscap SystemCapability.Multimedia.Image.Core 421 * @since 12 422 */ 423 YCBCR_P010 = 11, 424 425 /** 426 * Indicates that the storage order is to store Y first and then V U alternately each occupies 10 bits 427 * and are stored from the higher-order to the lower-order bits. 428 * 429 * @syscap SystemCapability.Multimedia.Image.Core 430 * @since 12 431 */ 432 YCRCB_P010 = 12 433 } 434 435 /** 436 * Enumerates image resolution quality. 437 * 438 * @enum { number } 439 * @syscap SystemCapability.Multimedia.Image.Core 440 * @systemapi 441 * @since 12 442 */ 443 enum ResolutionQuality { 444 /** 445 * Low quality images, short decoding time. 446 * 447 * @syscap SystemCapability.Multimedia.Image.Core 448 * @systemapi 449 * @since 12 450 */ 451 LOW = 1, 452 453 /** 454 * Medium quality images, moderate decoding time. 455 * 456 * @syscap SystemCapability.Multimedia.Image.Core 457 * @systemapi 458 * @since 12 459 */ 460 MEDIUM = 2, 461 462 /** 463 * High quality images, longer decoding time. 464 * 465 * @syscap SystemCapability.Multimedia.Image.Core 466 * @systemapi 467 * @since 12 468 */ 469 HIGH = 3 470 } 471 472 /** 473 * Describes the size of an image. 474 * 475 * @typedef Size 476 * @syscap SystemCapability.Multimedia.Image.Core 477 * @since 6 478 */ 479 /** 480 * Describes the size of an image. 481 * 482 * @typedef Size 483 * @syscap SystemCapability.Multimedia.Image.Core 484 * @crossplatform 485 * @since 10 486 */ 487 /** 488 * Describes the size of an image. 489 * 490 * @typedef Size 491 * @syscap SystemCapability.Multimedia.Image.Core 492 * @crossplatform 493 * @atomicservice 494 * @since 11 495 */ 496 /** 497 * Describes the size of an image. 498 * 499 * @typedef Size 500 * @syscap SystemCapability.Multimedia.Image.Core 501 * @crossplatform 502 * @form 503 * @atomicservice 504 * @since 12 505 */ 506 interface Size { 507 /** 508 * Height 509 * 510 * @type { number } 511 * @syscap SystemCapability.Multimedia.Image.Core 512 * @since 6 513 */ 514 /** 515 * Height 516 * 517 * @type { number } 518 * @syscap SystemCapability.Multimedia.Image.Core 519 * @crossplatform 520 * @since 10 521 */ 522 /** 523 * Height 524 * 525 * @type { number } 526 * @syscap SystemCapability.Multimedia.Image.Core 527 * @crossplatform 528 * @atomicservice 529 * @since 11 530 */ 531 /** 532 * Height 533 * 534 * @type { number } 535 * @syscap SystemCapability.Multimedia.Image.Core 536 * @crossplatform 537 * @form 538 * @atomicservice 539 * @since 12 540 */ 541 height: number; 542 543 /** 544 * Width 545 * 546 * @type { number } 547 * @syscap SystemCapability.Multimedia.Image.Core 548 * @since 6 549 */ 550 /** 551 * Width 552 * 553 * @type { number } 554 * @syscap SystemCapability.Multimedia.Image.Core 555 * @crossplatform 556 * @since 10 557 */ 558 /** 559 * Width 560 * 561 * @type { number } 562 * @syscap SystemCapability.Multimedia.Image.Core 563 * @crossplatform 564 * @atomicservice 565 * @since 11 566 */ 567 /** 568 * Width 569 * 570 * @type { number } 571 * @syscap SystemCapability.Multimedia.Image.Core 572 * @crossplatform 573 * @form 574 * @atomicservice 575 * @since 12 576 */ 577 width: number; 578 } 579 580 /** 581 * Enumerates exchangeable image file format (Exif) information types of an image. 582 * 583 * @enum { string } 584 * @syscap SystemCapability.Multimedia.Image.Core 585 * @since 7 586 */ 587 /** 588 * Enumerates exchangeable image file format (Exif) information types of an image. 589 * 590 * @enum { string } 591 * @syscap SystemCapability.Multimedia.Image.Core 592 * @crossplatform 593 * @since 10 594 */ 595 enum PropertyKey { 596 /** 597 * Number of bits in each pixel of an image. 598 * 599 * @syscap SystemCapability.Multimedia.Image.Core 600 * @since 7 601 */ 602 /** 603 * Number of bits in each pixel of an image. 604 * 605 * @syscap SystemCapability.Multimedia.Image.Core 606 * @crossplatform 607 * @since 10 608 */ 609 BITS_PER_SAMPLE = 'BitsPerSample', 610 611 /** 612 * Image rotation mode. 613 * 614 * @syscap SystemCapability.Multimedia.Image.Core 615 * @since 7 616 */ 617 /** 618 * Image rotation mode. 619 * 620 * @syscap SystemCapability.Multimedia.Image.Core 621 * @crossplatform 622 * @since 10 623 */ 624 ORIENTATION = 'Orientation', 625 626 /** 627 * Image length. 628 * 629 * @syscap SystemCapability.Multimedia.Image.Core 630 * @since 7 631 */ 632 /** 633 * Image length. 634 * 635 * @syscap SystemCapability.Multimedia.Image.Core 636 * @crossplatform 637 * @since 10 638 */ 639 IMAGE_LENGTH = 'ImageLength', 640 641 /** 642 * Image width. 643 * 644 * @syscap SystemCapability.Multimedia.Image.Core 645 * @since 7 646 */ 647 /** 648 * Image width. 649 * 650 * @syscap SystemCapability.Multimedia.Image.Core 651 * @crossplatform 652 * @since 10 653 */ 654 IMAGE_WIDTH = 'ImageWidth', 655 656 /** 657 * GPS latitude. 658 * 659 * @syscap SystemCapability.Multimedia.Image.Core 660 * @since 7 661 */ 662 /** 663 * GPS latitude. 664 * 665 * @syscap SystemCapability.Multimedia.Image.Core 666 * @crossplatform 667 * @since 10 668 */ 669 GPS_LATITUDE = 'GPSLatitude', 670 671 /** 672 * GPS longitude. 673 * 674 * @syscap SystemCapability.Multimedia.Image.Core 675 * @since 7 676 */ 677 /** 678 * GPS longitude. 679 * 680 * @syscap SystemCapability.Multimedia.Image.Core 681 * @crossplatform 682 * @since 10 683 */ 684 GPS_LONGITUDE = 'GPSLongitude', 685 686 /** 687 * GPS latitude reference. For example, N indicates north latitude and S indicates south latitude. 688 * 689 * @syscap SystemCapability.Multimedia.Image.Core 690 * @since 7 691 */ 692 /** 693 * GPS latitude reference. For example, N indicates north latitude and S indicates south latitude. 694 * 695 * @syscap SystemCapability.Multimedia.Image.Core 696 * @crossplatform 697 * @since 10 698 */ 699 GPS_LATITUDE_REF = 'GPSLatitudeRef', 700 701 /** 702 * GPS longitude reference. For example, E indicates east longitude and W indicates west longitude. 703 * 704 * @syscap SystemCapability.Multimedia.Image.Core 705 * @since 7 706 */ 707 /** 708 * GPS longitude reference. For example, E indicates east longitude and W indicates west longitude. 709 * 710 * @syscap SystemCapability.Multimedia.Image.Core 711 * @crossplatform 712 * @since 10 713 */ 714 GPS_LONGITUDE_REF = 'GPSLongitudeRef', 715 716 /** 717 * Shooting time 718 * 719 * @syscap SystemCapability.Multimedia.Image.Core 720 * @since 9 721 */ 722 /** 723 * Shooting time 724 * 725 * @syscap SystemCapability.Multimedia.Image.Core 726 * @crossplatform 727 * @since 10 728 */ 729 DATE_TIME_ORIGINAL = 'DateTimeOriginal', 730 731 /** 732 * Exposure time 733 * 734 * @syscap SystemCapability.Multimedia.Image.Core 735 * @since 9 736 */ 737 /** 738 * Exposure time 739 * 740 * @syscap SystemCapability.Multimedia.Image.Core 741 * @crossplatform 742 * @since 10 743 */ 744 EXPOSURE_TIME = 'ExposureTime', 745 746 /** 747 * Scene type 748 * 749 * @syscap SystemCapability.Multimedia.Image.Core 750 * @since 9 751 */ 752 /** 753 * Scene type 754 * 755 * @syscap SystemCapability.Multimedia.Image.Core 756 * @crossplatform 757 * @since 10 758 */ 759 SCENE_TYPE = 'SceneType', 760 761 /** 762 * ISO speedratings 763 * 764 * @syscap SystemCapability.Multimedia.Image.Core 765 * @since 9 766 */ 767 /** 768 * ISO speedratings 769 * 770 * @syscap SystemCapability.Multimedia.Image.Core 771 * @crossplatform 772 * @since 10 773 */ 774 ISO_SPEED_RATINGS = 'ISOSpeedRatings', 775 776 /** 777 * Aperture value 778 * 779 * @syscap SystemCapability.Multimedia.Image.Core 780 * @since 9 781 */ 782 /** 783 * Aperture value 784 * 785 * @syscap SystemCapability.Multimedia.Image.Core 786 * @crossplatform 787 * @since 10 788 */ 789 F_NUMBER = 'FNumber', 790 791 /** 792 * Date time 793 * 794 * @syscap SystemCapability.Multimedia.Image.Core 795 * @since 10 796 */ 797 DATE_TIME = 'DateTime', 798 799 /** 800 * GPS time stamp 801 * 802 * @syscap SystemCapability.Multimedia.Image.Core 803 * @since 10 804 */ 805 GPS_TIME_STAMP = 'GPSTimeStamp', 806 807 /** 808 * GPS date stamp 809 * 810 * @syscap SystemCapability.Multimedia.Image.Core 811 * @since 10 812 */ 813 GPS_DATE_STAMP = 'GPSDateStamp', 814 815 /** 816 * Image description 817 * 818 * @syscap SystemCapability.Multimedia.Image.Core 819 * @since 10 820 */ 821 IMAGE_DESCRIPTION = 'ImageDescription', 822 823 /** 824 * Make 825 * 826 * @syscap SystemCapability.Multimedia.Image.Core 827 * @since 10 828 */ 829 MAKE = 'Make', 830 831 /** 832 * Model 833 * 834 * @syscap SystemCapability.Multimedia.Image.Core 835 * @since 10 836 */ 837 MODEL = 'Model', 838 839 /** 840 * Photo mode 841 * 842 * @syscap SystemCapability.Multimedia.Image.Core 843 * @since 10 844 */ 845 PHOTO_MODE = 'PhotoMode', 846 847 /** 848 * Sensitivity type 849 * 850 * @syscap SystemCapability.Multimedia.Image.Core 851 * @since 10 852 */ 853 SENSITIVITY_TYPE = 'SensitivityType', 854 855 /** 856 * Standard output sensitivity 857 * 858 * @syscap SystemCapability.Multimedia.Image.Core 859 * @since 10 860 */ 861 STANDARD_OUTPUT_SENSITIVITY = 'StandardOutputSensitivity', 862 863 /** 864 * Recommended exposure index 865 * 866 * @syscap SystemCapability.Multimedia.Image.Core 867 * @since 10 868 */ 869 RECOMMENDED_EXPOSURE_INDEX = 'RecommendedExposureIndex', 870 871 /** 872 * ISO speed 873 * 874 * @syscap SystemCapability.Multimedia.Image.Core 875 * @since 10 876 */ 877 ISO_SPEED = 'ISOSpeedRatings', 878 879 /** 880 * Aperture value 881 * 882 * @syscap SystemCapability.Multimedia.Image.Core 883 * @since 10 884 */ 885 APERTURE_VALUE = 'ApertureValue', 886 887 /** 888 * Exposure bias value 889 * 890 * @syscap SystemCapability.Multimedia.Image.Core 891 * @since 10 892 */ 893 EXPOSURE_BIAS_VALUE = 'ExposureBiasValue', 894 895 /** 896 * Metering mode 897 * 898 * @syscap SystemCapability.Multimedia.Image.Core 899 * @since 10 900 */ 901 METERING_MODE = 'MeteringMode', 902 903 /** 904 * Light source 905 * 906 * @syscap SystemCapability.Multimedia.Image.Core 907 * @since 10 908 */ 909 LIGHT_SOURCE = 'LightSource', 910 911 /** 912 * Flash 913 * 914 * @syscap SystemCapability.Multimedia.Image.Core 915 * @since 10 916 */ 917 FLASH = 'Flash', 918 919 /** 920 * Focal length 921 * 922 * @syscap SystemCapability.Multimedia.Image.Core 923 * @since 10 924 */ 925 FOCAL_LENGTH = 'FocalLength', 926 927 /** 928 * User comment 929 * 930 * @syscap SystemCapability.Multimedia.Image.Core 931 * @since 10 932 */ 933 USER_COMMENT = 'UserComment', 934 935 /** 936 * Pixel x dimension 937 * 938 * @syscap SystemCapability.Multimedia.Image.Core 939 * @since 10 940 */ 941 PIXEL_X_DIMENSION = 'PixelXDimension', 942 943 /** 944 * Pixel y dimension 945 * 946 * @syscap SystemCapability.Multimedia.Image.Core 947 * @since 10 948 */ 949 PIXEL_Y_DIMENSION = 'PixelYDimension', 950 951 /** 952 * White balance 953 * 954 * @syscap SystemCapability.Multimedia.Image.Core 955 * @since 10 956 */ 957 WHITE_BALANCE = 'WhiteBalance', 958 959 /** 960 * Focal length in 35mm film 961 * 962 * @syscap SystemCapability.Multimedia.Image.Core 963 * @since 10 964 */ 965 FOCAL_LENGTH_IN_35_MM_FILM = 'FocalLengthIn35mmFilm', 966 967 /** 968 * Capture mode 969 * 970 * @syscap SystemCapability.Multimedia.Image.Core 971 * @since 10 972 */ 973 CAPTURE_MODE = 'HwMnoteCaptureMode', 974 975 /** 976 * Physical aperture 977 * 978 * @syscap SystemCapability.Multimedia.Image.Core 979 * @since 10 980 */ 981 PHYSICAL_APERTURE = 'HwMnotePhysicalAperture', 982 983 /** 984 * Roll Angle 985 * 986 * @syscap SystemCapability.Multimedia.Image.Core 987 * @crossplatform 988 * @since 11 989 */ 990 ROLL_ANGLE = 'HwMnoteRollAngle', 991 992 /** 993 * Pitch Angle 994 * 995 * @syscap SystemCapability.Multimedia.Image.Core 996 * @crossplatform 997 * @since 11 998 */ 999 PITCH_ANGLE = 'HwMnotePitchAngle', 1000 1001 /** 1002 * Capture Scene: Food 1003 * 1004 * @syscap SystemCapability.Multimedia.Image.Core 1005 * @crossplatform 1006 * @since 11 1007 */ 1008 SCENE_FOOD_CONF = 'HwMnoteSceneFoodConf', 1009 1010 /** 1011 * Capture Scene: Stage 1012 * 1013 * @syscap SystemCapability.Multimedia.Image.Core 1014 * @crossplatform 1015 * @since 11 1016 */ 1017 SCENE_STAGE_CONF = 'HwMnoteSceneStageConf', 1018 1019 /** 1020 * Capture Scene: Blue Sky 1021 * 1022 * @syscap SystemCapability.Multimedia.Image.Core 1023 * @crossplatform 1024 * @since 11 1025 */ 1026 SCENE_BLUE_SKY_CONF = 'HwMnoteSceneBlueSkyConf', 1027 1028 /** 1029 * Capture Scene: Green Plant 1030 * 1031 * @syscap SystemCapability.Multimedia.Image.Core 1032 * @crossplatform 1033 * @since 11 1034 */ 1035 SCENE_GREEN_PLANT_CONF = 'HwMnoteSceneGreenPlantConf', 1036 1037 /** 1038 * Capture Scene: Beach 1039 * 1040 * @syscap SystemCapability.Multimedia.Image.Core 1041 * @crossplatform 1042 * @since 11 1043 */ 1044 SCENE_BEACH_CONF = 'HwMnoteSceneBeachConf', 1045 1046 /** 1047 * Capture Scene: Snow 1048 * 1049 * @syscap SystemCapability.Multimedia.Image.Core 1050 * @crossplatform 1051 * @since 11 1052 */ 1053 SCENE_SNOW_CONF = 'HwMnoteSceneSnowConf', 1054 1055 /** 1056 * Capture Scene: Sunset 1057 * 1058 * @syscap SystemCapability.Multimedia.Image.Core 1059 * @crossplatform 1060 * @since 11 1061 */ 1062 SCENE_SUNSET_CONF = 'HwMnoteSceneSunsetConf', 1063 1064 /** 1065 * Capture Scene: Flowers 1066 * 1067 * @syscap SystemCapability.Multimedia.Image.Core 1068 * @crossplatform 1069 * @since 11 1070 */ 1071 SCENE_FLOWERS_CONF = 'HwMnoteSceneFlowersConf', 1072 1073 /** 1074 * Capture Scene: Night 1075 * 1076 * @syscap SystemCapability.Multimedia.Image.Core 1077 * @crossplatform 1078 * @since 11 1079 */ 1080 SCENE_NIGHT_CONF = 'HwMnoteSceneNightConf', 1081 1082 /** 1083 * Capture Scene: Text 1084 * 1085 * @syscap SystemCapability.Multimedia.Image.Core 1086 * @crossplatform 1087 * @since 11 1088 */ 1089 SCENE_TEXT_CONF = 'HwMnoteSceneTextConf', 1090 1091 /** 1092 * Face Count 1093 * 1094 * @syscap SystemCapability.Multimedia.Image.Core 1095 * @crossplatform 1096 * @since 11 1097 */ 1098 FACE_COUNT = 'HwMnoteFaceCount', 1099 1100 /** 1101 * Focus Mode 1102 * 1103 * @syscap SystemCapability.Multimedia.Image.Core 1104 * @crossplatform 1105 * @since 11 1106 */ 1107 FOCUS_MODE = 'HwMnoteFocusMode', 1108 1109 /** 1110 * The scheme used for image compression. 1111 * 1112 * @syscap SystemCapability.Multimedia.Image.Core 1113 * @crossplatform 1114 * @since 12 1115 */ 1116 COMPRESSION = 'Compression', 1117 1118 /** 1119 * Pixel composition, such as RGB or YCbCr. 1120 * 1121 * @syscap SystemCapability.Multimedia.Image.Core 1122 * @crossplatform 1123 * @since 12 1124 */ 1125 PHOTOMETRIC_INTERPRETATION = 'PhotometricInterpretation', 1126 1127 /** 1128 * For each strip, the byte offset of that strip. 1129 * 1130 * @syscap SystemCapability.Multimedia.Image.Core 1131 * @crossplatform 1132 * @since 12 1133 */ 1134 STRIP_OFFSETS = 'StripOffsets', 1135 1136 /** 1137 * The number of components per pixel. 1138 * 1139 * @syscap SystemCapability.Multimedia.Image.Core 1140 * @crossplatform 1141 * @since 12 1142 */ 1143 SAMPLES_PER_PIXEL = 'SamplesPerPixel', 1144 1145 /** 1146 * The number of rows per strip of image data. 1147 * 1148 * @syscap SystemCapability.Multimedia.Image.Core 1149 * @crossplatform 1150 * @since 12 1151 */ 1152 ROWS_PER_STRIP = 'RowsPerStrip', 1153 1154 /** 1155 * The total number of bytes in each strip of image data. 1156 * 1157 * @syscap SystemCapability.Multimedia.Image.Core 1158 * @crossplatform 1159 * @since 12 1160 */ 1161 STRIP_BYTE_COUNTS = 'StripByteCounts', 1162 1163 /** 1164 * The image resolution in the width direction. 1165 * 1166 * @syscap SystemCapability.Multimedia.Image.Core 1167 * @crossplatform 1168 * @since 12 1169 */ 1170 X_RESOLUTION = 'XResolution', 1171 1172 /** 1173 * The image resolution in the height direction. 1174 * 1175 * @syscap SystemCapability.Multimedia.Image.Core 1176 * @crossplatform 1177 * @since 12 1178 */ 1179 Y_RESOLUTION = 'YResolution', 1180 1181 /** 1182 * Indicates whether pixel components are recorded in a chunky or planar format. 1183 * 1184 * @syscap SystemCapability.Multimedia.Image.Core 1185 * @crossplatform 1186 * @since 12 1187 */ 1188 PLANAR_CONFIGURATION = 'PlanarConfiguration', 1189 1190 /** 1191 * The unit used to measure XResolution and YResolution. 1192 * 1193 * @syscap SystemCapability.Multimedia.Image.Core 1194 * @crossplatform 1195 * @since 12 1196 */ 1197 RESOLUTION_UNIT = 'ResolutionUnit', 1198 1199 /** 1200 * The transfer function for the image, typically used for color correction. 1201 * 1202 * @syscap SystemCapability.Multimedia.Image.Core 1203 * @crossplatform 1204 * @since 12 1205 */ 1206 TRANSFER_FUNCTION = 'TransferFunction', 1207 1208 /** 1209 * The name and version of the software used to generate the image. 1210 * 1211 * @syscap SystemCapability.Multimedia.Image.Core 1212 * @crossplatform 1213 * @since 12 1214 */ 1215 SOFTWARE = 'Software', 1216 1217 /** 1218 * The name of the person who created the image. 1219 * 1220 * @syscap SystemCapability.Multimedia.Image.Core 1221 * @crossplatform 1222 * @since 12 1223 */ 1224 ARTIST = 'Artist', 1225 1226 /** 1227 * The chromaticity of the white point of the image. 1228 * 1229 * @syscap SystemCapability.Multimedia.Image.Core 1230 * @crossplatform 1231 * @since 12 1232 */ 1233 WHITE_POINT = 'WhitePoint', 1234 1235 /** 1236 * The chromaticity of the primary colors of the image. 1237 * 1238 * @syscap SystemCapability.Multimedia.Image.Core 1239 * @crossplatform 1240 * @since 12 1241 */ 1242 PRIMARY_CHROMATICITIES = 'PrimaryChromaticities', 1243 1244 /** 1245 * The matrix coefficients for transformation from RGB to YCbCr image data. 1246 * 1247 * @syscap SystemCapability.Multimedia.Image.Core 1248 * @crossplatform 1249 * @since 12 1250 */ 1251 YCBCR_COEFFICIENTS = 'YCbCrCoefficients', 1252 1253 /** 1254 * The sampling ratio of chrominance components to the luminance component. 1255 * 1256 * @syscap SystemCapability.Multimedia.Image.Core 1257 * @crossplatform 1258 * @since 12 1259 */ 1260 YCBCR_SUB_SAMPLING = 'YCbCrSubSampling', 1261 1262 /** 1263 * The position of chrominance components in relation to the luminance component. 1264 * 1265 * @syscap SystemCapability.Multimedia.Image.Core 1266 * @crossplatform 1267 * @since 12 1268 */ 1269 YCBCR_POSITIONING = 'YCbCrPositioning', 1270 1271 /** 1272 * The reference black point value and reference white point value. 1273 * 1274 * @syscap SystemCapability.Multimedia.Image.Core 1275 * @crossplatform 1276 * @since 12 1277 */ 1278 REFERENCE_BLACK_WHITE = 'ReferenceBlackWhite', 1279 1280 /** 1281 * Copyright information for the image. 1282 * 1283 * @syscap SystemCapability.Multimedia.Image.Core 1284 * @crossplatform 1285 * @since 12 1286 */ 1287 COPYRIGHT = 'Copyright', 1288 1289 /** 1290 * The offset to the start byte (SOI) of JPEG compressed thumbnail data. 1291 * 1292 * @syscap SystemCapability.Multimedia.Image.Core 1293 * @crossplatform 1294 * @since 12 1295 */ 1296 JPEG_INTERCHANGE_FORMAT = 'JPEGInterchangeFormat', 1297 1298 /** 1299 * The number of bytes of JPEG compressed thumbnail data. 1300 * 1301 * @syscap SystemCapability.Multimedia.Image.Core 1302 * @crossplatform 1303 * @since 12 1304 */ 1305 JPEG_INTERCHANGE_FORMAT_LENGTH = 'JPEGInterchangeFormatLength', 1306 1307 /** 1308 * The class of the program used by the camera to set exposure when the picture is taken. 1309 * 1310 * @syscap SystemCapability.Multimedia.Image.Core 1311 * @crossplatform 1312 * @since 12 1313 */ 1314 EXPOSURE_PROGRAM = 'ExposureProgram', 1315 1316 /** 1317 * Indicates the spectral sensitivity of each channel of the camera used. 1318 * 1319 * @syscap SystemCapability.Multimedia.Image.Core 1320 * @crossplatform 1321 * @since 12 1322 */ 1323 SPECTRAL_SENSITIVITY = 'SpectralSensitivity', 1324 1325 /** 1326 * Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524. 1327 * 1328 * @syscap SystemCapability.Multimedia.Image.Core 1329 * @crossplatform 1330 * @since 12 1331 */ 1332 OECF = 'OECF', 1333 1334 /** 1335 * The version of the Exif standard supported. 1336 * 1337 * @syscap SystemCapability.Multimedia.Image.Core 1338 * @crossplatform 1339 * @since 12 1340 */ 1341 EXIF_VERSION = 'ExifVersion', 1342 1343 /** 1344 * The date and time when the image was stored as digital data. 1345 * 1346 * @syscap SystemCapability.Multimedia.Image.Core 1347 * @crossplatform 1348 * @since 12 1349 */ 1350 DATE_TIME_DIGITIZED = 'DateTimeDigitized', 1351 1352 /** 1353 * Information specific to compressed data. 1354 * 1355 * @syscap SystemCapability.Multimedia.Image.Core 1356 * @crossplatform 1357 * @since 12 1358 */ 1359 COMPONENTS_CONFIGURATION = 'ComponentsConfiguration', 1360 1361 /** 1362 * The shutter speed, expressed as an APEX (Additive System of Photographic Exposure) value. 1363 * 1364 * @syscap SystemCapability.Multimedia.Image.Core 1365 * @crossplatform 1366 * @since 12 1367 */ 1368 SHUTTER_SPEED = 'ShutterSpeedValue', 1369 1370 /** 1371 * The brightness value of the image, in APEX units. 1372 * 1373 * @syscap SystemCapability.Multimedia.Image.Core 1374 * @crossplatform 1375 * @since 12 1376 */ 1377 BRIGHTNESS_VALUE = 'BrightnessValue', 1378 1379 /** 1380 * The smallest F number of lens. 1381 * 1382 * @syscap SystemCapability.Multimedia.Image.Core 1383 * @crossplatform 1384 * @since 12 1385 */ 1386 MAX_APERTURE_VALUE = 'MaxApertureValue', 1387 1388 /** 1389 * The distance to the subject, measured in meters. 1390 * 1391 * @syscap SystemCapability.Multimedia.Image.Core 1392 * @crossplatform 1393 * @since 12 1394 */ 1395 SUBJECT_DISTANCE = 'SubjectDistance', 1396 1397 /** 1398 * This tag indicate the location and area of the main subject in the overall scene. 1399 * 1400 * @syscap SystemCapability.Multimedia.Image.Core 1401 * @crossplatform 1402 * @since 12 1403 */ 1404 SUBJECT_AREA = 'SubjectArea', 1405 1406 /** 1407 * A tag for manufacturers of Exif/DCF writers to record any desired information. 1408 * 1409 * @syscap SystemCapability.Multimedia.Image.Core 1410 * @crossplatform 1411 * @since 12 1412 */ 1413 MAKER_NOTE = 'MakerNote', 1414 1415 /** 1416 * A tag for record fractions of seconds for the DateTime tag. 1417 * 1418 * @syscap SystemCapability.Multimedia.Image.Core 1419 * @crossplatform 1420 * @since 12 1421 */ 1422 SUBSEC_TIME = 'SubsecTime', 1423 1424 /** 1425 * A tag used to record fractions of seconds for the DateTimeOriginal tag. 1426 * 1427 * @syscap SystemCapability.Multimedia.Image.Core 1428 * @crossplatform 1429 * @since 12 1430 */ 1431 SUBSEC_TIME_ORIGINAL = 'SubsecTimeOriginal', 1432 1433 /** 1434 * A tag used to record fractions of seconds for the DateTimeDigitized tag. 1435 * 1436 * @syscap SystemCapability.Multimedia.Image.Core 1437 * @crossplatform 1438 * @since 12 1439 */ 1440 SUBSEC_TIME_DIGITIZED = 'SubsecTimeDigitized', 1441 1442 /** 1443 * This tag denotes the Flashpix format version supported by an FPXR file, enhancing device compatibility. 1444 * 1445 * @syscap SystemCapability.Multimedia.Image.Core 1446 * @crossplatform 1447 * @since 12 1448 */ 1449 FLASHPIX_VERSION = 'FlashpixVersion', 1450 1451 /** 1452 * The color space information tag, often recorded as the color space specifier. 1453 * 1454 * @syscap SystemCapability.Multimedia.Image.Core 1455 * @crossplatform 1456 * @since 12 1457 */ 1458 COLOR_SPACE = 'ColorSpace', 1459 1460 /** 1461 * The name of an audio file related to the image data. 1462 * 1463 * @syscap SystemCapability.Multimedia.Image.Core 1464 * @crossplatform 1465 * @since 12 1466 */ 1467 RELATED_SOUND_FILE = 'RelatedSoundFile', 1468 1469 /** 1470 * Strobe energy at image capture, in BCPS. 1471 * 1472 * @syscap SystemCapability.Multimedia.Image.Core 1473 * @crossplatform 1474 * @since 12 1475 */ 1476 FLASH_ENERGY = 'FlashEnergy', 1477 1478 /** 1479 * Camera or input device spatial frequency table. 1480 * 1481 * @syscap SystemCapability.Multimedia.Image.Core 1482 * @crossplatform 1483 * @since 12 1484 */ 1485 SPATIAL_FREQUENCY_RESPONSE = 'SpatialFrequencyResponse', 1486 1487 /** 1488 * Pixels per FocalPlaneResolutionUnit in the image width. 1489 * 1490 * @syscap SystemCapability.Multimedia.Image.Core 1491 * @crossplatform 1492 * @since 12 1493 */ 1494 FOCAL_PLANE_X_RESOLUTION = 'FocalPlaneXResolution', 1495 1496 /** 1497 * Pixels per FocalPlaneResolutionUnit in the image height. 1498 * 1499 * @syscap SystemCapability.Multimedia.Image.Core 1500 * @crossplatform 1501 * @since 12 1502 */ 1503 FOCAL_PLANE_Y_RESOLUTION = 'FocalPlaneYResolution', 1504 1505 /** 1506 * Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution. 1507 * 1508 * @syscap SystemCapability.Multimedia.Image.Core 1509 * @crossplatform 1510 * @since 12 1511 */ 1512 FOCAL_PLANE_RESOLUTION_UNIT = 'FocalPlaneResolutionUnit', 1513 1514 /** 1515 * Location of the main subject, relative to the left edge. 1516 * 1517 * @syscap SystemCapability.Multimedia.Image.Core 1518 * @crossplatform 1519 * @since 12 1520 */ 1521 SUBJECT_LOCATION = 'SubjectLocation', 1522 1523 /** 1524 * Selected exposure index at capture. 1525 * 1526 * @syscap SystemCapability.Multimedia.Image.Core 1527 * @crossplatform 1528 * @since 12 1529 */ 1530 EXPOSURE_INDEX = 'ExposureIndex', 1531 1532 /** 1533 * Image sensor type on the camera. 1534 * 1535 * @syscap SystemCapability.Multimedia.Image.Core 1536 * @crossplatform 1537 * @since 12 1538 */ 1539 SENSING_METHOD = 'SensingMethod', 1540 1541 /** 1542 * Indicates the image source. 1543 * 1544 * @syscap SystemCapability.Multimedia.Image.Core 1545 * @crossplatform 1546 * @since 12 1547 */ 1548 FILE_SOURCE = 'FileSource', 1549 1550 /** 1551 * Color filter array (CFA) geometric pattern of the image sensor. 1552 * 1553 * @syscap SystemCapability.Multimedia.Image.Core 1554 * @crossplatform 1555 * @since 12 1556 */ 1557 CFA_PATTERN = 'CFAPattern', 1558 1559 /** 1560 * Indicates special processing on image data. 1561 * 1562 * @syscap SystemCapability.Multimedia.Image.Core 1563 * @crossplatform 1564 * @since 12 1565 */ 1566 CUSTOM_RENDERED = 'CustomRendered', 1567 1568 /** 1569 * Exposure mode set when the image was shot. 1570 * 1571 * @syscap SystemCapability.Multimedia.Image.Core 1572 * @crossplatform 1573 * @since 12 1574 */ 1575 EXPOSURE_MODE = 'ExposureMode', 1576 1577 /** 1578 * Digital zoom ratio at the time of capture. 1579 * 1580 * @syscap SystemCapability.Multimedia.Image.Core 1581 * @crossplatform 1582 * @since 12 1583 */ 1584 DIGITAL_ZOOM_RATIO = 'DigitalZoomRatio', 1585 1586 /** 1587 * Type of scene captured. 1588 * 1589 * @syscap SystemCapability.Multimedia.Image.Core 1590 * @crossplatform 1591 * @since 12 1592 */ 1593 SCENE_CAPTURE_TYPE = 'SceneCaptureType', 1594 1595 /** 1596 * Degree of overall image gain adjustment. 1597 * 1598 * @syscap SystemCapability.Multimedia.Image.Core 1599 * @crossplatform 1600 * @since 12 1601 */ 1602 GAIN_CONTROL = 'GainControl', 1603 1604 /** 1605 * Direction of contrast processing applied by the camera. 1606 * 1607 * @syscap SystemCapability.Multimedia.Image.Core 1608 * @crossplatform 1609 * @since 12 1610 */ 1611 CONTRAST = 'Contrast', 1612 1613 /** 1614 * Direction of saturation processing applied by the camera. 1615 * 1616 * @syscap SystemCapability.Multimedia.Image.Core 1617 * @crossplatform 1618 * @since 12 1619 */ 1620 SATURATION = 'Saturation', 1621 1622 /** 1623 * The direction of sharpness processing applied by the camera. 1624 * 1625 * @syscap SystemCapability.Multimedia.Image.Core 1626 * @crossplatform 1627 * @since 12 1628 */ 1629 SHARPNESS = 'Sharpness', 1630 1631 /** 1632 * Information on picture-taking conditions for a specific camera model. 1633 * 1634 * @syscap SystemCapability.Multimedia.Image.Core 1635 * @crossplatform 1636 * @since 12 1637 */ 1638 DEVICE_SETTING_DESCRIPTION = 'DeviceSettingDescription', 1639 1640 /** 1641 * Indicates the distance range to the subject. 1642 * 1643 * @syscap SystemCapability.Multimedia.Image.Core 1644 * @crossplatform 1645 * @since 12 1646 */ 1647 SUBJECT_DISTANCE_RANGE = 'SubjectDistanceRange', 1648 1649 /** 1650 * An identifier uniquely assigned to each image. 1651 * 1652 * @syscap SystemCapability.Multimedia.Image.Core 1653 * @crossplatform 1654 * @since 12 1655 */ 1656 IMAGE_UNIQUE_ID = 'ImageUniqueID', 1657 1658 /** 1659 * The version of the GPSInfoIFD. 1660 * 1661 * @syscap SystemCapability.Multimedia.Image.Core 1662 * @crossplatform 1663 * @since 12 1664 */ 1665 GPS_VERSION_ID = 'GPSVersionID', 1666 1667 /** 1668 * Reference altitude used for GPS altitude. 1669 * 1670 * @syscap SystemCapability.Multimedia.Image.Core 1671 * @crossplatform 1672 * @since 12 1673 */ 1674 GPS_ALTITUDE_REF = 'GPSAltitudeRef', 1675 1676 /** 1677 * The altitude based on the reference in GPSAltitudeRef. 1678 * 1679 * @syscap SystemCapability.Multimedia.Image.Core 1680 * @crossplatform 1681 * @since 12 1682 */ 1683 GPS_ALTITUDE = 'GPSAltitude', 1684 1685 /** 1686 * The GPS satellites used for measurements. 1687 * 1688 * @syscap SystemCapability.Multimedia.Image.Core 1689 * @crossplatform 1690 * @since 12 1691 */ 1692 GPS_SATELLITES = 'GPSSatellites', 1693 1694 /** 1695 * The status of the GPS receiver when the image is recorded. 1696 * 1697 * @syscap SystemCapability.Multimedia.Image.Core 1698 * @crossplatform 1699 * @since 12 1700 */ 1701 GPS_STATUS = 'GPSStatus', 1702 1703 /** 1704 * The GPS measurement mode. 1705 * 1706 * @syscap SystemCapability.Multimedia.Image.Core 1707 * @crossplatform 1708 * @since 12 1709 */ 1710 GPS_MEASURE_MODE = 'GPSMeasureMode', 1711 1712 /** 1713 * The GPS DOP (data degree of precision). 1714 * 1715 * @syscap SystemCapability.Multimedia.Image.Core 1716 * @crossplatform 1717 * @since 12 1718 */ 1719 GPS_DOP = 'GPSDOP', 1720 1721 /** 1722 * The unit used to express the GPS receiver speed of movement. 1723 * 1724 * @syscap SystemCapability.Multimedia.Image.Core 1725 * @crossplatform 1726 * @since 12 1727 */ 1728 GPS_SPEED_REF = 'GPSSpeedRef', 1729 1730 /** 1731 * The speed of GPS receiver movement. 1732 * 1733 * @syscap SystemCapability.Multimedia.Image.Core 1734 * @crossplatform 1735 * @since 12 1736 */ 1737 GPS_SPEED = 'GPSSpeed', 1738 1739 /** 1740 * The reference for giving the direction of GPS receiver movement. 1741 * 1742 * @syscap SystemCapability.Multimedia.Image.Core 1743 * @crossplatform 1744 * @since 12 1745 */ 1746 GPS_TRACK_REF = 'GPSTrackRef', 1747 1748 /** 1749 * The direction of GPS receiver movement. 1750 * 1751 * @syscap SystemCapability.Multimedia.Image.Core 1752 * @crossplatform 1753 * @since 12 1754 */ 1755 GPS_TRACK = 'GPSTrack', 1756 1757 /** 1758 * The reference for the image's direction. 1759 * 1760 * @syscap SystemCapability.Multimedia.Image.Core 1761 * @crossplatform 1762 * @since 12 1763 */ 1764 GPS_IMG_DIRECTION_REF = 'GPSImgDirectionRef', 1765 1766 /** 1767 * The direction of the image when captured. 1768 * 1769 * @syscap SystemCapability.Multimedia.Image.Core 1770 * @crossplatform 1771 * @since 12 1772 */ 1773 GPS_IMG_DIRECTION = 'GPSImgDirection', 1774 1775 /** 1776 * Geodetic survey data used by the GPS receiver. 1777 * 1778 * @syscap SystemCapability.Multimedia.Image.Core 1779 * @crossplatform 1780 * @since 12 1781 */ 1782 GPS_MAP_DATUM = 'GPSMapDatum', 1783 1784 /** 1785 * Indicates the latitude reference of the destination point. 1786 * 1787 * @syscap SystemCapability.Multimedia.Image.Core 1788 * @crossplatform 1789 * @since 12 1790 */ 1791 GPS_DEST_LATITUDE_REF = 'GPSDestLatitudeRef', 1792 1793 /** 1794 * The latitude of the destination point. 1795 * 1796 * @syscap SystemCapability.Multimedia.Image.Core 1797 * @crossplatform 1798 * @since 12 1799 */ 1800 GPS_DEST_LATITUDE = 'GPSDestLatitude', 1801 1802 /** 1803 * Indicates the longitude reference of the destination point. 1804 * 1805 * @syscap SystemCapability.Multimedia.Image.Core 1806 * @crossplatform 1807 * @since 12 1808 */ 1809 GPS_DEST_LONGITUDE_REF = 'GPSDestLongitudeRef', 1810 1811 /** 1812 * The longitude of the destination point. 1813 * 1814 * @syscap SystemCapability.Multimedia.Image.Core 1815 * @crossplatform 1816 * @since 12 1817 */ 1818 GPS_DEST_LONGITUDE = 'GPSDestLongitude', 1819 1820 /** 1821 * The reference for the bearing to the destination point. 1822 * 1823 * @syscap SystemCapability.Multimedia.Image.Core 1824 * @crossplatform 1825 * @since 12 1826 */ 1827 GPS_DEST_BEARING_REF = 'GPSDestBearingRef', 1828 1829 /** 1830 * The bearing to the destination point. 1831 * 1832 * @syscap SystemCapability.Multimedia.Image.Core 1833 * @crossplatform 1834 * @since 12 1835 */ 1836 GPS_DEST_BEARING = 'GPSDestBearing', 1837 1838 /** 1839 * The measurement unit for the distance to the target point. 1840 * 1841 * @syscap SystemCapability.Multimedia.Image.Core 1842 * @crossplatform 1843 * @since 12 1844 */ 1845 GPS_DEST_DISTANCE_REF = 'GPSDestDistanceRef', 1846 1847 /** 1848 * The distance to the destination point. 1849 * 1850 * @syscap SystemCapability.Multimedia.Image.Core 1851 * @crossplatform 1852 * @since 12 1853 */ 1854 GPS_DEST_DISTANCE = 'GPSDestDistance', 1855 1856 /** 1857 * A character string recording the name of the method used for location finding. 1858 * 1859 * @syscap SystemCapability.Multimedia.Image.Core 1860 * @crossplatform 1861 * @since 12 1862 */ 1863 GPS_PROCESSING_METHOD = 'GPSProcessingMethod', 1864 1865 /** 1866 * A character string recording the name of the GPS area. 1867 * 1868 * @syscap SystemCapability.Multimedia.Image.Core 1869 * @crossplatform 1870 * @since 12 1871 */ 1872 GPS_AREA_INFORMATION = 'GPSAreaInformation', 1873 1874 /** 1875 * This field denotes if differential correction was applied to GPS data, crucial for precise location accuracy. 1876 * 1877 * @syscap SystemCapability.Multimedia.Image.Core 1878 * @crossplatform 1879 * @since 12 1880 */ 1881 GPS_DIFFERENTIAL = 'GPSDifferential', 1882 1883 /** 1884 * The serial number of the camera body. 1885 * 1886 * @syscap SystemCapability.Multimedia.Image.Core 1887 * @crossplatform 1888 * @since 12 1889 */ 1890 BODY_SERIAL_NUMBER = 'BodySerialNumber', 1891 1892 /** 1893 * The name of the camera owner. 1894 * 1895 * @syscap SystemCapability.Multimedia.Image.Core 1896 * @crossplatform 1897 * @since 12 1898 */ 1899 CAMERA_OWNER_NAME = 'CameraOwnerName', 1900 1901 /** 1902 * Indicates whether the image is a composite image. 1903 * 1904 * @syscap SystemCapability.Multimedia.Image.Core 1905 * @crossplatform 1906 * @since 12 1907 */ 1908 COMPOSITE_IMAGE = 'CompositeImage', 1909 1910 /** 1911 * The compression mode used for a compressed image, in unit bits per pixel. 1912 * 1913 * @syscap SystemCapability.Multimedia.Image.Core 1914 * @crossplatform 1915 * @since 12 1916 */ 1917 COMPRESSED_BITS_PER_PIXEL = 'CompressedBitsPerPixel', 1918 1919 /** 1920 * The DNGVersion tag encodes the four-tier version number for DNG specification compliance. 1921 * 1922 * @syscap SystemCapability.Multimedia.Image.Core 1923 * @crossplatform 1924 * @since 12 1925 */ 1926 DNG_VERSION = 'DNGVersion', 1927 1928 /** 1929 * DefaultCropSize specifies the final image size in raw coordinates, accounting for extra edge pixels. 1930 * 1931 * @syscap SystemCapability.Multimedia.Image.Core 1932 * @crossplatform 1933 * @since 12 1934 */ 1935 DEFAULT_CROP_SIZE = 'DefaultCropSize', 1936 1937 /** 1938 * Indicates the value of coefficient gamma. 1939 * 1940 * @syscap SystemCapability.Multimedia.Image.Core 1941 * @crossplatform 1942 * @since 12 1943 */ 1944 GAMMA = 'Gamma', 1945 1946 /** 1947 * The tag indicate the ISO speed latitude yyy value of the camera or input device that is defined in ISO 12232. 1948 * 1949 * @syscap SystemCapability.Multimedia.Image.Core 1950 * @crossplatform 1951 * @since 12 1952 */ 1953 ISO_SPEED_LATITUDE_YYY = 'ISOSpeedLatitudeyyy', 1954 1955 /** 1956 * The tag indicate the ISO speed latitude zzz value of the camera or input device that is defined in ISO 12232. 1957 * 1958 * @syscap SystemCapability.Multimedia.Image.Core 1959 * @crossplatform 1960 * @since 12 1961 */ 1962 ISO_SPEED_LATITUDE_ZZZ = 'ISOSpeedLatitudezzz', 1963 1964 /** 1965 * The manufacturer of the lens. 1966 * 1967 * @syscap SystemCapability.Multimedia.Image.Core 1968 * @crossplatform 1969 * @since 12 1970 */ 1971 LENS_MAKE = 'LensMake', 1972 1973 /** 1974 * The model name of the lens. 1975 * 1976 * @syscap SystemCapability.Multimedia.Image.Core 1977 * @crossplatform 1978 * @since 12 1979 */ 1980 LENS_MODEL = 'LensModel', 1981 1982 /** 1983 * The serial number of the lens. 1984 * 1985 * @syscap SystemCapability.Multimedia.Image.Core 1986 * @crossplatform 1987 * @since 12 1988 */ 1989 LENS_SERIAL_NUMBER = 'LensSerialNumber', 1990 1991 /** 1992 * Specifications of the lens used. 1993 * 1994 * @syscap SystemCapability.Multimedia.Image.Core 1995 * @crossplatform 1996 * @since 12 1997 */ 1998 LENS_SPECIFICATION = 'LensSpecification', 1999 2000 /** 2001 * This tag provides a broad description of the data type in this subfile. 2002 * 2003 * @syscap SystemCapability.Multimedia.Image.Core 2004 * @crossplatform 2005 * @since 12 2006 */ 2007 NEW_SUBFILE_TYPE = 'NewSubfileType', 2008 2009 /** 2010 * This tag records the UTC offset for the DateTime tag, ensuring accurate timestamps regardless of location. 2011 * 2012 * @syscap SystemCapability.Multimedia.Image.Core 2013 * @crossplatform 2014 * @since 12 2015 */ 2016 OFFSET_TIME = 'OffsetTime', 2017 2018 /** 2019 * This tag records the UTC offset when the image was digitized, aiding in accurate timestamp adjustment. 2020 * 2021 * @syscap SystemCapability.Multimedia.Image.Core 2022 * @crossplatform 2023 * @since 12 2024 */ 2025 OFFSET_TIME_DIGITIZED = 'OffsetTimeDigitized', 2026 2027 /** 2028 * This tag records the UTC offset when the original image was created, crucial for time-sensitive applications. 2029 * 2030 * @syscap SystemCapability.Multimedia.Image.Core 2031 * @crossplatform 2032 * @since 12 2033 */ 2034 OFFSET_TIME_ORIGINAL = 'OffsetTimeOriginal', 2035 2036 /** 2037 * Exposure times of source images for a composite image. 2038 * 2039 * @syscap SystemCapability.Multimedia.Image.Core 2040 * @crossplatform 2041 * @since 12 2042 */ 2043 SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = 'SourceExposureTimesOfCompositeImage', 2044 2045 /** 2046 * The number of source images used for a composite image. 2047 * 2048 * @syscap SystemCapability.Multimedia.Image.Core 2049 * @crossplatform 2050 * @since 12 2051 */ 2052 SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = 'SourceImageNumberOfCompositeImage', 2053 2054 /** 2055 * This deprecated tag indicates the data type in this subfile. Use NewSubfileType instead. 2056 * 2057 * @syscap SystemCapability.Multimedia.Image.Core 2058 * @crossplatform 2059 * @since 12 2060 */ 2061 SUBFILE_TYPE = 'SubfileType', 2062 2063 /** 2064 * This tag indicates horizontal positioning errors in meters. 2065 * 2066 * @syscap SystemCapability.Multimedia.Image.Core 2067 * @crossplatform 2068 * @since 12 2069 */ 2070 GPS_H_POSITIONING_ERROR = 'GPSHPositioningError', 2071 2072 /** 2073 * This tag indicates the sensitivity of the camera or input device when the image was shot. 2074 * 2075 * @syscap SystemCapability.Multimedia.Image.Core 2076 * @crossplatform 2077 * @since 12 2078 */ 2079 PHOTOGRAPHIC_SENSITIVITY = 'PhotographicSensitivity', 2080 2081 /** 2082 * Burst Number 2083 * 2084 * @syscap SystemCapability.Multimedia.Image.Core 2085 * @crossplatform 2086 * @since 12 2087 */ 2088 BURST_NUMBER = 'HwMnoteBurstNumber', 2089 2090 /** 2091 * Face Conf 2092 * 2093 * @syscap SystemCapability.Multimedia.Image.Core 2094 * @crossplatform 2095 * @since 12 2096 */ 2097 FACE_CONF = 'HwMnoteFaceConf', 2098 2099 /** 2100 * Face Leye Center 2101 * 2102 * @syscap SystemCapability.Multimedia.Image.Core 2103 * @crossplatform 2104 * @since 12 2105 */ 2106 FACE_LEYE_CENTER = 'HwMnoteFaceLeyeCenter', 2107 2108 /** 2109 * Face Mouth Center 2110 * 2111 * @syscap SystemCapability.Multimedia.Image.Core 2112 * @crossplatform 2113 * @since 12 2114 */ 2115 FACE_MOUTH_CENTER = 'HwMnoteFaceMouthCenter', 2116 2117 /** 2118 * Face Pointer 2119 * 2120 * @syscap SystemCapability.Multimedia.Image.Core 2121 * @crossplatform 2122 * @since 12 2123 */ 2124 FACE_POINTER = 'HwMnoteFacePointer', 2125 2126 /** 2127 * Face Rect 2128 * 2129 * @syscap SystemCapability.Multimedia.Image.Core 2130 * @crossplatform 2131 * @since 12 2132 */ 2133 FACE_RECT = 'HwMnoteFaceRect', 2134 2135 /** 2136 * Face Reye Center 2137 * 2138 * @syscap SystemCapability.Multimedia.Image.Core 2139 * @crossplatform 2140 * @since 12 2141 */ 2142 FACE_REYE_CENTER = 'HwMnoteFaceReyeCenter', 2143 2144 /** 2145 * Face Smile Score 2146 * 2147 * @syscap SystemCapability.Multimedia.Image.Core 2148 * @crossplatform 2149 * @since 12 2150 */ 2151 FACE_SMILE_SCORE = 'HwMnoteFaceSmileScore', 2152 2153 /** 2154 * Face Version 2155 * 2156 * @syscap SystemCapability.Multimedia.Image.Core 2157 * @crossplatform 2158 * @since 12 2159 */ 2160 FACE_VERSION = 'HwMnoteFaceVersion', 2161 2162 /** 2163 * Front Camera 2164 * 2165 * @syscap SystemCapability.Multimedia.Image.Core 2166 * @crossplatform 2167 * @since 12 2168 */ 2169 FRONT_CAMERA = 'HwMnoteFrontCamera', 2170 2171 /** 2172 * Scene Pointer 2173 * 2174 * @syscap SystemCapability.Multimedia.Image.Core 2175 * @crossplatform 2176 * @since 12 2177 */ 2178 SCENE_POINTER = 'HwMnoteScenePointer', 2179 2180 /** 2181 * Scene Version 2182 * 2183 * @syscap SystemCapability.Multimedia.Image.Core 2184 * @crossplatform 2185 * @since 12 2186 */ 2187 SCENE_VERSION = 'HwMnoteSceneVersion', 2188 2189 /** 2190 * Is Xmage Supported 2191 * 2192 * @syscap SystemCapability.Multimedia.Image.Core 2193 * @crossplatform 2194 * @since 12 2195 */ 2196 IS_XMAGE_SUPPORTED = 'HwMnoteIsXmageSupported', 2197 2198 /** 2199 * Xmage Mode 2200 * 2201 * @syscap SystemCapability.Multimedia.Image.Core 2202 * @crossplatform 2203 * @since 12 2204 */ 2205 XMAGE_MODE = 'HwMnoteXmageMode', 2206 2207 /** 2208 * Xmage X1 Coordinate 2209 * 2210 * @syscap SystemCapability.Multimedia.Image.Core 2211 * @crossplatform 2212 * @since 12 2213 */ 2214 XMAGE_LEFT = 'HwMnoteXmageLeft', 2215 2216 /** 2217 * Xmage Y1 Coordinate 2218 * 2219 * @syscap SystemCapability.Multimedia.Image.Core 2220 * @crossplatform 2221 * @since 12 2222 */ 2223 XMAGE_TOP = 'HwMnoteXmageTop', 2224 2225 /** 2226 * Xmage X2 Coordinate 2227 * 2228 * @syscap SystemCapability.Multimedia.Image.Core 2229 * @crossplatform 2230 * @since 12 2231 */ 2232 XMAGE_RIGHT = 'HwMnoteXmageRight', 2233 2234 /** 2235 * Xmage Y2 Coordinate 2236 * 2237 * @syscap SystemCapability.Multimedia.Image.Core 2238 * @crossplatform 2239 * @since 12 2240 */ 2241 XMAGE_BOTTOM = 'HwMnoteXmageBottom', 2242 2243 /** 2244 * Cloud Enhancement Mode 2245 * 2246 * @syscap SystemCapability.Multimedia.Image.Core 2247 * @crossplatform 2248 * @since 12 2249 */ 2250 CLOUD_ENHANCEMENT_MODE = 'HwMnoteCloudEnhancementMode', 2251 2252 /** 2253 * Wind Snapshot Mode 2254 * 2255 * @syscap SystemCapability.Multimedia.Image.Core 2256 * @crossplatform 2257 * @since 12 2258 */ 2259 WIND_SNAPSHOT_MODE = 'HwMnoteWindSnapshotMode', 2260 2261 /** 2262 * GIF LOOP COUNT 2263 * If infinite loop returns 0, other values represent the number of loops 2264 * 2265 * @syscap SystemCapability.Multimedia.Image.Core 2266 * @crossplatform 2267 * @since 12 2268 */ 2269 GIF_LOOP_COUNT = 'GIFLoopCount' 2270 } 2271 2272 /** 2273 * Enum for image formats. 2274 * 2275 * @enum { number } 2276 * @syscap SystemCapability.Multimedia.Image.Core 2277 * @since 9 2278 */ 2279 enum ImageFormat { 2280 /** 2281 * YCBCR422 semi-planar format. 2282 * 2283 * @syscap SystemCapability.Multimedia.Image.Core 2284 * @since 9 2285 */ 2286 YCBCR_422_SP = 1000, 2287 2288 /** 2289 * JPEG encoding format. 2290 * 2291 * @syscap SystemCapability.Multimedia.Image.Core 2292 * @since 9 2293 */ 2294 JPEG = 2000 2295 } 2296 2297 /** 2298 * Enumerates alpha types. 2299 * 2300 * @enum { number } 2301 * @syscap SystemCapability.Multimedia.Image.Core 2302 * @since 9 2303 */ 2304 /** 2305 * Enumerates alpha types. 2306 * 2307 * @enum { number } 2308 * @syscap SystemCapability.Multimedia.Image.Core 2309 * @crossplatform 2310 * @since 10 2311 */ 2312 /** 2313 * Enumerates alpha types. 2314 * 2315 * @enum { number } 2316 * @syscap SystemCapability.Multimedia.Image.Core 2317 * @crossplatform 2318 * @atomicservice 2319 * @since 11 2320 */ 2321 /** 2322 * Enumerates alpha types. 2323 * 2324 * @enum { number } 2325 * @syscap SystemCapability.Multimedia.Image.Core 2326 * @crossplatform 2327 * @form 2328 * @atomicservice 2329 * @since 12 2330 */ 2331 enum AlphaType { 2332 /** 2333 * Indicates an unknown alpha type. 2334 * 2335 * @syscap SystemCapability.Multimedia.Image.Core 2336 * @since 9 2337 */ 2338 /** 2339 * Indicates an unknown alpha type. 2340 * 2341 * @syscap SystemCapability.Multimedia.Image.Core 2342 * @crossplatform 2343 * @since 10 2344 */ 2345 /** 2346 * Indicates an unknown alpha type. 2347 * 2348 * @syscap SystemCapability.Multimedia.Image.Core 2349 * @crossplatform 2350 * @atomicservice 2351 * @since 11 2352 */ 2353 /** 2354 * Indicates an unknown alpha type. 2355 * 2356 * @syscap SystemCapability.Multimedia.Image.Core 2357 * @crossplatform 2358 * @form 2359 * @atomicservice 2360 * @since 12 2361 */ 2362 UNKNOWN = 0, 2363 2364 /** 2365 * Indicates that the image has no alpha channel, or all pixels in the image are fully opaque. 2366 * 2367 * @syscap SystemCapability.Multimedia.Image.Core 2368 * @since 9 2369 */ 2370 /** 2371 * Indicates that the image has no alpha channel, or all pixels in the image are fully opaque. 2372 * 2373 * @syscap SystemCapability.Multimedia.Image.Core 2374 * @crossplatform 2375 * @since 10 2376 */ 2377 /** 2378 * Indicates that the image has no alpha channel, or all pixels in the image are fully opaque. 2379 * 2380 * @syscap SystemCapability.Multimedia.Image.Core 2381 * @crossplatform 2382 * @atomicservice 2383 * @since 11 2384 */ 2385 /** 2386 * Indicates that the image has no alpha channel, or all pixels in the image are fully opaque. 2387 * 2388 * @syscap SystemCapability.Multimedia.Image.Core 2389 * @crossplatform 2390 * @form 2391 * @atomicservice 2392 * @since 12 2393 */ 2394 OPAQUE = 1, 2395 2396 /** 2397 * Indicates that RGB components of each pixel in the image are premultiplied by alpha. 2398 * 2399 * @syscap SystemCapability.Multimedia.Image.Core 2400 * @since 9 2401 */ 2402 /** 2403 * Indicates that RGB components of each pixel in the image are premultiplied by alpha. 2404 * 2405 * @syscap SystemCapability.Multimedia.Image.Core 2406 * @crossplatform 2407 * @since 10 2408 */ 2409 /** 2410 * Indicates that RGB components of each pixel in the image are premultiplied by alpha. 2411 * 2412 * @syscap SystemCapability.Multimedia.Image.Core 2413 * @crossplatform 2414 * @atomicservice 2415 * @since 11 2416 */ 2417 /** 2418 * Indicates that RGB components of each pixel in the image are premultiplied by alpha. 2419 * 2420 * @syscap SystemCapability.Multimedia.Image.Core 2421 * @crossplatform 2422 * @form 2423 * @atomicservice 2424 * @since 12 2425 */ 2426 PREMUL = 2, 2427 2428 /** 2429 * Indicates that RGB components of each pixel in the image are independent of alpha and are not premultiplied by alpha. 2430 * 2431 * @syscap SystemCapability.Multimedia.Image.Core 2432 * @since 9 2433 */ 2434 /** 2435 * Indicates that RGB components of each pixel in the image are independent of alpha and are not premultiplied by alpha. 2436 * 2437 * @syscap SystemCapability.Multimedia.Image.Core 2438 * @crossplatform 2439 * @since 10 2440 */ 2441 /** 2442 * Indicates that RGB components of each pixel in the image are independent of alpha and are not premultiplied by alpha. 2443 * 2444 * @syscap SystemCapability.Multimedia.Image.Core 2445 * @crossplatform 2446 * @atomicservice 2447 * @since 11 2448 */ 2449 /** 2450 * Indicates that RGB components of each pixel in the image are independent of alpha and are not premultiplied by alpha. 2451 * 2452 * @syscap SystemCapability.Multimedia.Image.Core 2453 * @crossplatform 2454 * @form 2455 * @atomicservice 2456 * @since 12 2457 */ 2458 UNPREMUL = 3 2459 } 2460 2461 /** 2462 * Enumerates decoding dynamic range. 2463 * 2464 * @enum { number } 2465 * @syscap SystemCapability.Multimedia.Image.Core 2466 * @since 12 2467 */ 2468 enum DecodingDynamicRange { 2469 /** 2470 * Decoding according to the content of the image. 2471 * 2472 * @syscap SystemCapability.Multimedia.Image.Core 2473 * @since 12 2474 */ 2475 AUTO = 0, 2476 2477 /** 2478 * Decoding to standard dynamic range. 2479 * 2480 * @syscap SystemCapability.Multimedia.Image.Core 2481 * @since 12 2482 */ 2483 SDR = 1, 2484 2485 /** 2486 * Decoding to high dynamic range. 2487 * 2488 * @syscap SystemCapability.Multimedia.Image.Core 2489 * @since 12 2490 */ 2491 HDR = 2 2492 } 2493 2494 /** 2495 * Enumerates packing dynamic range. 2496 * 2497 * @enum { number } 2498 * @syscap SystemCapability.Multimedia.Image.Core 2499 * @since 12 2500 */ 2501 enum PackingDynamicRange { 2502 /** 2503 * Packing according to the content of the image. 2504 * 2505 * @syscap SystemCapability.Multimedia.Image.Core 2506 * @since 12 2507 */ 2508 AUTO = 0, 2509 2510 /** 2511 * Packing to standard dynamic range. 2512 * 2513 * @syscap SystemCapability.Multimedia.Image.Core 2514 * @since 12 2515 */ 2516 SDR = 1, 2517 } 2518 2519 /** 2520 * Enumerates the anti-aliasing level. 2521 * 2522 * @enum { number } 2523 * @syscap SystemCapability.Multimedia.Image.Core 2524 * @since 12 2525 */ 2526 enum AntiAliasingLevel { 2527 /** 2528 * Nearest-neighbor interpolation algorithm. 2529 * 2530 * @syscap SystemCapability.Multimedia.Image.Core 2531 * @since 12 2532 */ 2533 NONE = 0, 2534 2535 /** 2536 * Bilinear interpolation algorithm. 2537 * 2538 * @syscap SystemCapability.Multimedia.Image.Core 2539 * @since 12 2540 */ 2541 LOW = 1, 2542 2543 /** 2544 * Bilinear interpolation algorithm with mipmap linear filtering. 2545 * 2546 * @syscap SystemCapability.Multimedia.Image.Core 2547 * @since 12 2548 */ 2549 MEDIUM = 2, 2550 2551 /** 2552 * Cubic interpolation algorithm. 2553 * 2554 * @syscap SystemCapability.Multimedia.Image.Core 2555 * @since 12 2556 */ 2557 HIGH = 3, 2558 } 2559 2560 /** 2561 * Enum for image scale mode. 2562 * 2563 * @enum { number } 2564 * @syscap SystemCapability.Multimedia.Image.Core 2565 * @since 9 2566 */ 2567 /** 2568 * Enum for image scale mode. 2569 * 2570 * @enum { number } 2571 * @syscap SystemCapability.Multimedia.Image.Core 2572 * @crossplatform 2573 * @since 10 2574 */ 2575 /** 2576 * Enum for image scale mode. 2577 * 2578 * @enum { number } 2579 * @syscap SystemCapability.Multimedia.Image.Core 2580 * @crossplatform 2581 * @atomicservice 2582 * @since 11 2583 */ 2584 /** 2585 * Enum for image scale mode. 2586 * 2587 * @enum { number } 2588 * @syscap SystemCapability.Multimedia.Image.Core 2589 * @crossplatform 2590 * @form 2591 * @atomicservice 2592 * @since 12 2593 */ 2594 enum ScaleMode { 2595 /** 2596 * Indicates the effect that fits the image into the target size. 2597 * 2598 * @syscap SystemCapability.Multimedia.Image.Core 2599 * @since 9 2600 */ 2601 /** 2602 * Indicates the effect that fits the image into the target size. 2603 * 2604 * @syscap SystemCapability.Multimedia.Image.Core 2605 * @crossplatform 2606 * @since 10 2607 */ 2608 /** 2609 * Indicates the effect that fits the image into the target size. 2610 * 2611 * @syscap SystemCapability.Multimedia.Image.Core 2612 * @crossplatform 2613 * @atomicservice 2614 * @since 11 2615 */ 2616 /** 2617 * Indicates the effect that fits the image into the target size. 2618 * 2619 * @syscap SystemCapability.Multimedia.Image.Core 2620 * @crossplatform 2621 * @form 2622 * @atomicservice 2623 * @since 12 2624 */ 2625 FIT_TARGET_SIZE = 0, 2626 2627 /** 2628 * Indicates the effect that scales an image to fill the target image area and center-crops the part outside the area. 2629 * 2630 * @syscap SystemCapability.Multimedia.Image.Core 2631 * @since 9 2632 */ 2633 /** 2634 * Indicates the effect that scales an image to fill the target image area and center-crops the part outside the area. 2635 * 2636 * @syscap SystemCapability.Multimedia.Image.Core 2637 * @crossplatform 2638 * @since 10 2639 */ 2640 /** 2641 * Indicates the effect that scales an image to fill the target image area and center-crops the part outside the area. 2642 * 2643 * @syscap SystemCapability.Multimedia.Image.Core 2644 * @crossplatform 2645 * @atomicservice 2646 * @since 11 2647 */ 2648 /** 2649 * Indicates the effect that scales an image to fill the target image area and center-crops the part outside the area. 2650 * 2651 * @syscap SystemCapability.Multimedia.Image.Core 2652 * @crossplatform 2653 * @form 2654 * @atomicservice 2655 * @since 12 2656 */ 2657 CENTER_CROP = 1 2658 } 2659 2660 /** 2661 * The component type of image. 2662 * 2663 * @enum { number } 2664 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 2665 * @since 9 2666 */ 2667 enum ComponentType { 2668 /** 2669 * Luma info. 2670 * 2671 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 2672 * @since 9 2673 */ 2674 YUV_Y = 1, 2675 2676 /** 2677 * Chrominance info. 2678 * 2679 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 2680 * @since 9 2681 */ 2682 YUV_U = 2, 2683 2684 /** 2685 * Chroma info. 2686 * 2687 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 2688 * @since 9 2689 */ 2690 YUV_V = 3, 2691 2692 /** 2693 * Jpeg type. 2694 * 2695 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 2696 * @since 9 2697 */ 2698 JPEG = 4 2699 } 2700 2701 /** 2702 * Enumerates the HDR metadata types that need to be stored in Pixelmap. 2703 * 2704 * @enum { number } 2705 * @syscap SystemCapability.Multimedia.Image.Core 2706 * @since 12 2707 */ 2708 enum HdrMetadataKey { 2709 /** 2710 * Indicate the types of metadata that image needs to use. 2711 * 2712 * @syscap SystemCapability.Multimedia.Image.Core 2713 * @since 12 2714 */ 2715 HDR_METADATA_TYPE = 0, 2716 2717 /** 2718 * Static metadata key. 2719 * 2720 * @syscap SystemCapability.Multimedia.Image.Core 2721 * @since 12 2722 */ 2723 HDR_STATIC_METADATA = 1, 2724 2725 /** 2726 * Dynamic metadata key. 2727 * 2728 * @syscap SystemCapability.Multimedia.Image.Core 2729 * @since 12 2730 */ 2731 HDR_DYNAMIC_METADATA = 2, 2732 2733 /** 2734 * Gainmap metadata key. 2735 * 2736 * @syscap SystemCapability.Multimedia.Image.Core 2737 * @since 12 2738 */ 2739 HDR_GAINMAP_METADATA = 3, 2740 } 2741 2742 /** 2743 * Value for HDR_METADATA_TYPE. 2744 * 2745 * @enum { number } 2746 * @syscap SystemCapability.Multimedia.Image.Core 2747 * @since 12 2748 */ 2749 enum HdrMetadataType { 2750 /** 2751 * No metadata. 2752 * 2753 * @syscap SystemCapability.Multimedia.Image.Core 2754 * @since 12 2755 */ 2756 NONE = 0, 2757 2758 /** 2759 * Indicates that metadata will be used for the base image. 2760 * 2761 * @syscap SystemCapability.Multimedia.Image.Core 2762 * @since 12 2763 */ 2764 BASE = 1, 2765 2766 /** 2767 * Indicates that metadata will be used for the gainmap image. 2768 * 2769 * @syscap SystemCapability.Multimedia.Image.Core 2770 * @since 12 2771 */ 2772 GAINMAP = 2, 2773 2774 /** 2775 * Indicates that metadata will be used for the alternate image. 2776 * 2777 * @syscap SystemCapability.Multimedia.Image.Core 2778 * @since 12 2779 */ 2780 ALTERNATE = 3, 2781 } 2782 2783 /** 2784 * Describes region information. 2785 * 2786 * @typedef Region 2787 * @syscap SystemCapability.Multimedia.Image.Core 2788 * @since 8 2789 */ 2790 /** 2791 * Describes region information. 2792 * 2793 * @typedef Region 2794 * @syscap SystemCapability.Multimedia.Image.Core 2795 * @crossplatform 2796 * @since 10 2797 */ 2798 /** 2799 * Describes region information. 2800 * 2801 * @typedef Region 2802 * @syscap SystemCapability.Multimedia.Image.Core 2803 * @crossplatform 2804 * @atomicservice 2805 * @since 11 2806 */ 2807 /** 2808 * Describes region information. 2809 * 2810 * @typedef Region 2811 * @syscap SystemCapability.Multimedia.Image.Core 2812 * @crossplatform 2813 * @form 2814 * @atomicservice 2815 * @since 12 2816 */ 2817 interface Region { 2818 /** 2819 * Image size. 2820 * 2821 * @type { Size } 2822 * @syscap SystemCapability.Multimedia.Image.Core 2823 * @since 7 2824 */ 2825 /** 2826 * Image size. 2827 * 2828 * @type { Size } 2829 * @syscap SystemCapability.Multimedia.Image.Core 2830 * @crossplatform 2831 * @since 10 2832 */ 2833 /** 2834 * Image size. 2835 * 2836 * @type { Size } 2837 * @syscap SystemCapability.Multimedia.Image.Core 2838 * @crossplatform 2839 * @atomicservice 2840 * @since 11 2841 */ 2842 /** 2843 * Image size. 2844 * 2845 * @type { Size } 2846 * @syscap SystemCapability.Multimedia.Image.Core 2847 * @crossplatform 2848 * @form 2849 * @atomicservice 2850 * @since 12 2851 */ 2852 size: Size; 2853 2854 /** 2855 * x-coordinate at the upper left corner of the image. 2856 * 2857 * @type { number } 2858 * @syscap SystemCapability.Multimedia.Image.Core 2859 * @since 7 2860 */ 2861 /** 2862 * x-coordinate at the upper left corner of the image. 2863 * 2864 * @type { number } 2865 * @syscap SystemCapability.Multimedia.Image.Core 2866 * @crossplatform 2867 * @since 10 2868 */ 2869 /** 2870 * x-coordinate at the upper left corner of the image. 2871 * 2872 * @type { number } 2873 * @syscap SystemCapability.Multimedia.Image.Core 2874 * @crossplatform 2875 * @atomicservice 2876 * @since 11 2877 */ 2878 /** 2879 * x-coordinate at the upper left corner of the image. 2880 * 2881 * @type { number } 2882 * @syscap SystemCapability.Multimedia.Image.Core 2883 * @crossplatform 2884 * @form 2885 * @atomicservice 2886 * @since 12 2887 */ 2888 x: number; 2889 2890 /** 2891 * y-coordinate at the upper left corner of the image. 2892 * 2893 * @type { number } 2894 * @syscap SystemCapability.Multimedia.Image.Core 2895 * @since 7 2896 */ 2897 /** 2898 * y-coordinate at the upper left corner of the image. 2899 * 2900 * @type { number } 2901 * @syscap SystemCapability.Multimedia.Image.Core 2902 * @crossplatform 2903 * @since 10 2904 */ 2905 /** 2906 * y-coordinate at the upper left corner of the image. 2907 * 2908 * @type { number } 2909 * @syscap SystemCapability.Multimedia.Image.Core 2910 * @crossplatform 2911 * @atomicservice 2912 * @since 11 2913 */ 2914 /** 2915 * y-coordinate at the upper left corner of the image. 2916 * 2917 * @type { number } 2918 * @syscap SystemCapability.Multimedia.Image.Core 2919 * @crossplatform 2920 * @form 2921 * @atomicservice 2922 * @since 12 2923 */ 2924 y: number; 2925 } 2926 2927 /** 2928 * Describes area information in an image. 2929 * 2930 * @typedef PositionArea 2931 * @syscap SystemCapability.Multimedia.Image.Core 2932 * @since 7 2933 */ 2934 /** 2935 * Describes area information in an image. 2936 * 2937 * @typedef PositionArea 2938 * @syscap SystemCapability.Multimedia.Image.Core 2939 * @crossplatform 2940 * @since 10 2941 */ 2942 /** 2943 * Describes area information in an image. 2944 * 2945 * @typedef PositionArea 2946 * @syscap SystemCapability.Multimedia.Image.Core 2947 * @crossplatform 2948 * @atomicservice 2949 * @since 11 2950 */ 2951 /** 2952 * Describes area information in an image. 2953 * 2954 * @typedef PositionArea 2955 * @syscap SystemCapability.Multimedia.Image.Core 2956 * @crossplatform 2957 * @form 2958 * @atomicservice 2959 * @since 12 2960 */ 2961 interface PositionArea { 2962 /** 2963 * Image data that will be read or written. 2964 * 2965 * @type { ArrayBuffer } 2966 * @syscap SystemCapability.Multimedia.Image.Core 2967 * @since 7 2968 */ 2969 /** 2970 * Image data that will be read or written. 2971 * 2972 * @type { ArrayBuffer } 2973 * @syscap SystemCapability.Multimedia.Image.Core 2974 * @crossplatform 2975 * @since 10 2976 */ 2977 /** 2978 * Image data that will be read or written. 2979 * 2980 * @type { ArrayBuffer } 2981 * @syscap SystemCapability.Multimedia.Image.Core 2982 * @crossplatform 2983 * @atomicservice 2984 * @since 11 2985 */ 2986 /** 2987 * Image data that will be read or written. 2988 * 2989 * @type { ArrayBuffer } 2990 * @syscap SystemCapability.Multimedia.Image.Core 2991 * @crossplatform 2992 * @form 2993 * @atomicservice 2994 * @since 12 2995 */ 2996 pixels: ArrayBuffer; 2997 2998 /** 2999 * Offset for data reading. 3000 * 3001 * @type { number } 3002 * @syscap SystemCapability.Multimedia.Image.Core 3003 * @since 7 3004 */ 3005 /** 3006 * Offset for data reading. 3007 * 3008 * @type { number } 3009 * @syscap SystemCapability.Multimedia.Image.Core 3010 * @crossplatform 3011 * @since 10 3012 */ 3013 /** 3014 * Offset for data reading. 3015 * 3016 * @type { number } 3017 * @syscap SystemCapability.Multimedia.Image.Core 3018 * @crossplatform 3019 * @atomicservice 3020 * @since 11 3021 */ 3022 /** 3023 * Offset for data reading. 3024 * 3025 * @type { number } 3026 * @syscap SystemCapability.Multimedia.Image.Core 3027 * @crossplatform 3028 * @form 3029 * @atomicservice 3030 * @since 12 3031 */ 3032 offset: number; 3033 3034 /** 3035 * Number of bytes to read. 3036 * 3037 * @type { number } 3038 * @syscap SystemCapability.Multimedia.Image.Core 3039 * @since 7 3040 */ 3041 /** 3042 * Number of bytes to read. 3043 * 3044 * @type { number } 3045 * @syscap SystemCapability.Multimedia.Image.Core 3046 * @crossplatform 3047 * @since 10 3048 */ 3049 /** 3050 * Number of bytes to read. 3051 * 3052 * @type { number } 3053 * @syscap SystemCapability.Multimedia.Image.Core 3054 * @crossplatform 3055 * @atomicservice 3056 * @since 11 3057 */ 3058 /** 3059 * Number of bytes to read. 3060 * 3061 * @type { number } 3062 * @syscap SystemCapability.Multimedia.Image.Core 3063 * @crossplatform 3064 * @form 3065 * @atomicservice 3066 * @since 12 3067 */ 3068 stride: number; 3069 3070 /** 3071 * Region to read. 3072 * 3073 * @type { Region } 3074 * @syscap SystemCapability.Multimedia.Image.Core 3075 * @since 7 3076 */ 3077 /** 3078 * Region to read. 3079 * 3080 * @type { Region } 3081 * @syscap SystemCapability.Multimedia.Image.Core 3082 * @crossplatform 3083 * @since 10 3084 */ 3085 /** 3086 * Region to read. 3087 * 3088 * @type { Region } 3089 * @syscap SystemCapability.Multimedia.Image.Core 3090 * @crossplatform 3091 * @atomicservice 3092 * @since 11 3093 */ 3094 /** 3095 * Region to read. 3096 * 3097 * @type { Region } 3098 * @syscap SystemCapability.Multimedia.Image.Core 3099 * @crossplatform 3100 * @form 3101 * @atomicservice 3102 * @since 12 3103 */ 3104 region: Region; 3105 } 3106 3107 /** 3108 * Describes image information. 3109 * 3110 * @typedef ImageInfo 3111 * @syscap SystemCapability.Multimedia.Image.Core 3112 * @since 6 3113 */ 3114 /** 3115 * Describes image information. 3116 * 3117 * @typedef ImageInfo 3118 * @syscap SystemCapability.Multimedia.Image.Core 3119 * @crossplatform 3120 * @since 10 3121 */ 3122 /** 3123 * Describes image information. 3124 * 3125 * @typedef ImageInfo 3126 * @syscap SystemCapability.Multimedia.Image.Core 3127 * @crossplatform 3128 * @atomicservice 3129 * @since 11 3130 */ 3131 /** 3132 * Describes image information. 3133 * 3134 * @typedef ImageInfo 3135 * @syscap SystemCapability.Multimedia.Image.Core 3136 * @crossplatform 3137 * @form 3138 * @atomicservice 3139 * @since 12 3140 */ 3141 interface ImageInfo { 3142 /** 3143 * Indicates image dimensions specified by a {@link Size} interface. 3144 * 3145 * @type { Size } 3146 * @syscap SystemCapability.Multimedia.Image.Core 3147 * @since 6 3148 */ 3149 /** 3150 * Indicates image dimensions specified by a {@link Size} interface. 3151 * 3152 * @type { Size } 3153 * @syscap SystemCapability.Multimedia.Image.Core 3154 * @crossplatform 3155 * @since 10 3156 */ 3157 /** 3158 * Indicates image dimensions specified by a {@link Size} interface. 3159 * 3160 * @type { Size } 3161 * @syscap SystemCapability.Multimedia.Image.Core 3162 * @crossplatform 3163 * @atomicservice 3164 * @since 11 3165 */ 3166 /** 3167 * Indicates image dimensions specified by a {@link Size} interface. 3168 * 3169 * @type { Size } 3170 * @syscap SystemCapability.Multimedia.Image.Core 3171 * @crossplatform 3172 * @form 3173 * @atomicservice 3174 * @since 12 3175 */ 3176 size: Size; 3177 3178 /** 3179 * Indicates image default density. 3180 * 3181 * @type { number } 3182 * @syscap SystemCapability.Multimedia.Image.Core 3183 * @since 9 3184 */ 3185 /** 3186 * Indicates image default density. 3187 * 3188 * @type { number } 3189 * @syscap SystemCapability.Multimedia.Image.Core 3190 * @crossplatform 3191 * @since 10 3192 */ 3193 /** 3194 * Indicates image default density. 3195 * 3196 * @type { number } 3197 * @syscap SystemCapability.Multimedia.Image.Core 3198 * @crossplatform 3199 * @atomicservice 3200 * @since 11 3201 */ 3202 /** 3203 * Indicates image default density. 3204 * 3205 * @type { number } 3206 * @syscap SystemCapability.Multimedia.Image.Core 3207 * @crossplatform 3208 * @form 3209 * @atomicservice 3210 * @since 12 3211 */ 3212 density: number; 3213 3214 /** 3215 * The number of byte per row. 3216 * 3217 * @type { number } 3218 * @syscap SystemCapability.Multimedia.Image.Core 3219 * @atomicservice 3220 * @since 11 3221 */ 3222 /** 3223 * The number of byte per row. 3224 * 3225 * @type { number } 3226 * @syscap SystemCapability.Multimedia.Image.Core 3227 * @form 3228 * @atomicservice 3229 * @since 12 3230 */ 3231 stride: number; 3232 3233 /** 3234 * Indicates image format. 3235 * 3236 * @type { PixelMapFormat } 3237 * @syscap SystemCapability.Multimedia.Image.Core 3238 * @crossplatform 3239 * @form 3240 * @atomicservice 3241 * @since 12 3242 */ 3243 pixelFormat: PixelMapFormat; 3244 3245 /** 3246 * Indicates image alpha type. 3247 * 3248 * @type { AlphaType } 3249 * @syscap SystemCapability.Multimedia.Image.Core 3250 * @crossplatform 3251 * @form 3252 * @atomicservice 3253 * @since 12 3254 */ 3255 alphaType: AlphaType; 3256 3257 /** 3258 * Indicates image mime type. 3259 * 3260 * @type { string } 3261 * @syscap SystemCapability.Multimedia.Image.Core 3262 * @crossplatform 3263 * @since 12 3264 */ 3265 mimeType: string; 3266 3267 /** 3268 * Indicates whether the image high dynamic range 3269 * 3270 * @type { boolean } 3271 * @syscap SystemCapability.Multimedia.Image.Core 3272 * @since 12 3273 */ 3274 isHdr: boolean; 3275 } 3276 3277 /** 3278 * Describes the option for image packing. 3279 * 3280 * @typedef PackingOption 3281 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3282 * @since 6 3283 */ 3284 /** 3285 * Describes the option for image packing. 3286 * 3287 * @typedef PackingOption 3288 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3289 * @crossplatform 3290 * @since 10 3291 */ 3292 /** 3293 * Describes the option for image packing. 3294 * 3295 * @typedef PackingOption 3296 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3297 * @crossplatform 3298 * @atomicservice 3299 * @since 11 3300 */ 3301 interface PackingOption { 3302 /** 3303 * Multipurpose Internet Mail Extensions (MIME) format of the target image, for example, image/jpeg. 3304 * 3305 * @type { string } 3306 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3307 * @since 6 3308 */ 3309 /** 3310 * Multipurpose Internet Mail Extensions (MIME) format of the target image, for example, image/jpeg. 3311 * 3312 * @type { string } 3313 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3314 * @crossplatform 3315 * @since 10 3316 */ 3317 /** 3318 * Multipurpose Internet Mail Extensions (MIME) format of the target image, for example, image/jpeg. 3319 * 3320 * @type { string } 3321 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3322 * @crossplatform 3323 * @atomicservice 3324 * @since 11 3325 */ 3326 format: string; 3327 3328 /** 3329 * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. 3330 * 3331 * @type { number } 3332 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3333 * @since 6 3334 */ 3335 /** 3336 * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. 3337 * 3338 * @type { number } 3339 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3340 * @crossplatform 3341 * @since 10 3342 */ 3343 /** 3344 * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. 3345 * 3346 * @type { number } 3347 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3348 * @crossplatform 3349 * @atomicservice 3350 * @since 11 3351 */ 3352 quality: number; 3353 3354 /** 3355 * BufferSize of the target image. 3356 * If this bufferSize is less than or equal to 0, it will be converted to 10MB. 3357 * 3358 * @type { ?number } 3359 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3360 * @since 9 3361 */ 3362 /** 3363 * BufferSize of the target image. 3364 * If this bufferSize is less than or equal to 0, it will be converted to 10MB. 3365 * 3366 * @type { ?number } 3367 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3368 * @crossplatform 3369 * @since 10 3370 */ 3371 /** 3372 * BufferSize of the target image. 3373 * If this bufferSize is less than or equal to 0, it will be converted to 10MB. 3374 * 3375 * @type { ?number } 3376 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3377 * @crossplatform 3378 * @atomicservice 3379 * @since 11 3380 */ 3381 bufferSize?: number; 3382 3383 /** 3384 * The desired dynamic range of the target image. 3385 * 3386 * @type { ?PackingDynamicRange } 3387 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3388 * @since 12 3389 */ 3390 desiredDynamicRange?: PackingDynamicRange; 3391 3392 /** 3393 * Whether the image properties can be saved, like Exif. 3394 * 3395 * @type { ?boolean } 3396 * @syscap SystemCapability.Multimedia.Image.ImagePacker 3397 * @since 12 3398 */ 3399 needsPackProperties?: boolean; 3400 } 3401 3402 /** 3403 * Describes image properties. 3404 * 3405 * @typedef GetImagePropertyOptions 3406 * @syscap SystemCapability.Multimedia.Image.ImageSource 3407 * @since 7 3408 * @deprecated since 11 3409 * @useinstead image.ImagePropertyOptions 3410 */ 3411 /** 3412 * Describes image properties. 3413 * 3414 * @typedef GetImagePropertyOptions 3415 * @syscap SystemCapability.Multimedia.Image.ImageSource 3416 * @crossplatform 3417 * @since 10 3418 * @deprecated since 11 3419 * @useinstead image.ImagePropertyOptions 3420 */ 3421 interface GetImagePropertyOptions { 3422 /** 3423 * Index of an image. 3424 * 3425 * @type { ?number } 3426 * @syscap SystemCapability.Multimedia.Image.ImageSource 3427 * @since 7 3428 * @deprecated since 11 3429 * @useinstead image.ImagePropertyOptions#index 3430 */ 3431 /** 3432 * Index of an image. 3433 * 3434 * @type { ?number } 3435 * @syscap SystemCapability.Multimedia.Image.ImageSource 3436 * @crossplatform 3437 * @since 10 3438 * @deprecated since 11 3439 * @useinstead image.ImagePropertyOptions#index 3440 */ 3441 index?: number; 3442 3443 /** 3444 * Default property value. 3445 * 3446 * @type { ?string } 3447 * @syscap SystemCapability.Multimedia.Image.ImageSource 3448 * @since 7 3449 * @deprecated since 11 3450 * @useinstead image.ImagePropertyOptions#defaultValue 3451 */ 3452 /** 3453 * Default property value. 3454 * 3455 * @type { ?string } 3456 * @syscap SystemCapability.Multimedia.Image.ImageSource 3457 * @crossplatform 3458 * @since 10 3459 * @deprecated since 11 3460 * @useinstead image.ImagePropertyOptions#defaultValue 3461 */ 3462 defaultValue?: string; 3463 } 3464 3465 /** 3466 * Describes image properties. 3467 * 3468 * @typedef ImagePropertyOptions 3469 * @syscap SystemCapability.Multimedia.Image.ImageSource 3470 * @crossplatform 3471 * @since 11 3472 */ 3473 interface ImagePropertyOptions { 3474 /** 3475 * Index of an image. 3476 * 3477 * @type { ?number } 3478 * @syscap SystemCapability.Multimedia.Image.ImageSource 3479 * @crossplatform 3480 * @since 11 3481 */ 3482 index?: number; 3483 3484 /** 3485 * Default property value. 3486 * 3487 * @type { ?string } 3488 * @syscap SystemCapability.Multimedia.Image.ImageSource 3489 * @crossplatform 3490 * @since 11 3491 */ 3492 defaultValue?: string; 3493 } 3494 3495 /** 3496 * Describes image decoding parameters. 3497 * 3498 * @typedef DecodingOptions 3499 * @syscap SystemCapability.Multimedia.Image.ImageSource 3500 * @since 7 3501 */ 3502 /** 3503 * Describes image decoding parameters. 3504 * 3505 * @typedef DecodingOptions 3506 * @syscap SystemCapability.Multimedia.Image.ImageSource 3507 * @crossplatform 3508 * @since 10 3509 */ 3510 /** 3511 * Describes image decoding parameters. 3512 * 3513 * @typedef DecodingOptions 3514 * @syscap SystemCapability.Multimedia.Image.ImageSource 3515 * @crossplatform 3516 * @atomicservice 3517 * @since 11 3518 */ 3519 /** 3520 * Describes image decoding parameters. 3521 * 3522 * @typedef DecodingOptions 3523 * @syscap SystemCapability.Multimedia.Image.ImageSource 3524 * @crossplatform 3525 * @form 3526 * @atomicservice 3527 * @since 12 3528 */ 3529 interface DecodingOptions { 3530 /** 3531 * Number of image frames. 3532 * 3533 * @type { ?number } 3534 * @syscap SystemCapability.Multimedia.Image.ImageSource 3535 * @since 7 3536 */ 3537 /** 3538 * Number of image frames. 3539 * 3540 * @type { ?number } 3541 * @syscap SystemCapability.Multimedia.Image.ImageSource 3542 * @crossplatform 3543 * @since 10 3544 */ 3545 /** 3546 * Number of image frames. 3547 * 3548 * @type { ?number } 3549 * @syscap SystemCapability.Multimedia.Image.ImageSource 3550 * @crossplatform 3551 * @atomicservice 3552 * @since 11 3553 */ 3554 /** 3555 * Number of image frames. 3556 * 3557 * @type { ?number } 3558 * @syscap SystemCapability.Multimedia.Image.ImageSource 3559 * @crossplatform 3560 * @form 3561 * @atomicservice 3562 * @since 12 3563 */ 3564 index?: number; 3565 3566 /** 3567 * Sampling ratio of the image pixel map. 3568 * 3569 * @type { ?number } 3570 * @syscap SystemCapability.Multimedia.Image.ImageSource 3571 * @since 7 3572 */ 3573 /** 3574 * Sampling ratio of the image pixel map. 3575 * 3576 * @type { ?number } 3577 * @syscap SystemCapability.Multimedia.Image.ImageSource 3578 * @crossplatform 3579 * @since 10 3580 */ 3581 /** 3582 * Sampling ratio of the image pixel map. 3583 * 3584 * @type { ?number } 3585 * @syscap SystemCapability.Multimedia.Image.ImageSource 3586 * @crossplatform 3587 * @atomicservice 3588 * @since 11 3589 */ 3590 /** 3591 * Sampling ratio of the image pixel map. 3592 * 3593 * @type { ?number } 3594 * @syscap SystemCapability.Multimedia.Image.ImageSource 3595 * @crossplatform 3596 * @form 3597 * @atomicservice 3598 * @since 12 3599 */ 3600 sampleSize?: number; 3601 3602 /** 3603 * Rotation angle of the image pixel map. The value ranges from 0 to 360. 3604 * 3605 * @type { ?number } 3606 * @syscap SystemCapability.Multimedia.Image.ImageSource 3607 * @since 7 3608 */ 3609 /** 3610 * Rotation angle of the image pixel map. The value ranges from 0 to 360. 3611 * 3612 * @type { ?number } 3613 * @syscap SystemCapability.Multimedia.Image.ImageSource 3614 * @crossplatform 3615 * @since 10 3616 */ 3617 /** 3618 * Rotation angle of the image pixel map. The value ranges from 0 to 360. 3619 * 3620 * @type { ?number } 3621 * @syscap SystemCapability.Multimedia.Image.ImageSource 3622 * @crossplatform 3623 * @atomicservice 3624 * @since 11 3625 */ 3626 /** 3627 * Rotation angle of the image pixel map. The value ranges from 0 to 360. 3628 * 3629 * @type { ?number } 3630 * @syscap SystemCapability.Multimedia.Image.ImageSource 3631 * @crossplatform 3632 * @form 3633 * @atomicservice 3634 * @since 12 3635 */ 3636 rotate?: number; 3637 3638 /** 3639 * Whether the image pixel map is editable. 3640 * 3641 * @type { ?boolean } 3642 * @syscap SystemCapability.Multimedia.Image.ImageSource 3643 * @since 7 3644 */ 3645 /** 3646 * Whether the image pixel map is editable. 3647 * 3648 * @type { ?boolean } 3649 * @syscap SystemCapability.Multimedia.Image.ImageSource 3650 * @crossplatform 3651 * @since 10 3652 */ 3653 /** 3654 * Whether the image pixel map is editable. 3655 * 3656 * @type { ?boolean } 3657 * @syscap SystemCapability.Multimedia.Image.ImageSource 3658 * @crossplatform 3659 * @atomicservice 3660 * @since 11 3661 */ 3662 /** 3663 * Whether the image pixel map is editable. 3664 * 3665 * @type { ?boolean } 3666 * @syscap SystemCapability.Multimedia.Image.ImageSource 3667 * @crossplatform 3668 * @form 3669 * @atomicservice 3670 * @since 12 3671 */ 3672 editable?: boolean; 3673 3674 /** 3675 * Width and height of the image pixel map. The value (0, 0) indicates that the pixels are decoded 3676 * based on the original image size. 3677 * 3678 * @type { ?Size } 3679 * @syscap SystemCapability.Multimedia.Image.ImageSource 3680 * @since 7 3681 */ 3682 /** 3683 * Width and height of the image pixel map. The value (0, 0) indicates that the pixels are decoded 3684 * based on the original image size. 3685 * 3686 * @type { ?Size } 3687 * @syscap SystemCapability.Multimedia.Image.ImageSource 3688 * @crossplatform 3689 * @since 10 3690 */ 3691 /** 3692 * Width and height of the image pixel map. The value (0, 0) indicates that the pixels are decoded 3693 * based on the original image size. 3694 * 3695 * @type { ?Size } 3696 * @syscap SystemCapability.Multimedia.Image.ImageSource 3697 * @crossplatform 3698 * @atomicservice 3699 * @since 11 3700 */ 3701 /** 3702 * Width and height of the image pixel map. The value (0, 0) indicates that the pixels are decoded 3703 * based on the original image size. 3704 * 3705 * @type { ?Size } 3706 * @syscap SystemCapability.Multimedia.Image.ImageSource 3707 * @crossplatform 3708 * @form 3709 * @atomicservice 3710 * @since 12 3711 */ 3712 desiredSize?: Size; 3713 3714 /** 3715 * Cropping region of the image pixel map. 3716 * 3717 * @type { ?Region } 3718 * @syscap SystemCapability.Multimedia.Image.ImageSource 3719 * @since 7 3720 */ 3721 /** 3722 * Cropping region of the image pixel map. 3723 * 3724 * @type { ?Region } 3725 * @syscap SystemCapability.Multimedia.Image.ImageSource 3726 * @crossplatform 3727 * @since 10 3728 */ 3729 /** 3730 * Cropping region of the image pixel map. 3731 * 3732 * @type { ?Region } 3733 * @syscap SystemCapability.Multimedia.Image.ImageSource 3734 * @crossplatform 3735 * @atomicservice 3736 * @since 11 3737 */ 3738 /** 3739 * Cropping region of the image pixel map. 3740 * 3741 * @type { ?Region } 3742 * @syscap SystemCapability.Multimedia.Image.ImageSource 3743 * @crossplatform 3744 * @form 3745 * @atomicservice 3746 * @since 12 3747 */ 3748 desiredRegion?: Region; 3749 3750 /** 3751 * Data format of the image pixel map. 3752 * 3753 * @type { ?PixelMapFormat } 3754 * @syscap SystemCapability.Multimedia.Image.ImageSource 3755 * @since 7 3756 */ 3757 /** 3758 * Data format of the image pixel map. 3759 * 3760 * @type { ?PixelMapFormat } 3761 * @syscap SystemCapability.Multimedia.Image.ImageSource 3762 * @crossplatform 3763 * @since 10 3764 */ 3765 /** 3766 * Data format of the image pixel map. 3767 * 3768 * @type { ?PixelMapFormat } 3769 * @syscap SystemCapability.Multimedia.Image.ImageSource 3770 * @crossplatform 3771 * @atomicservice 3772 * @since 11 3773 */ 3774 /** 3775 * Data format of the image pixel map. 3776 * 3777 * @type { ?PixelMapFormat } 3778 * @syscap SystemCapability.Multimedia.Image.ImageSource 3779 * @crossplatform 3780 * @form 3781 * @atomicservice 3782 * @since 12 3783 */ 3784 desiredPixelFormat?: PixelMapFormat; 3785 3786 /** 3787 * The density for image pixel map. 3788 * 3789 * @type { ?number } 3790 * @syscap SystemCapability.Multimedia.Image.ImageSource 3791 * @since 9 3792 */ 3793 /** 3794 * The density for image pixel map. 3795 * 3796 * @type { ?number } 3797 * @syscap SystemCapability.Multimedia.Image.ImageSource 3798 * @crossplatform 3799 * @since 10 3800 */ 3801 /** 3802 * The density for image pixel map. 3803 * 3804 * @type { ?number } 3805 * @syscap SystemCapability.Multimedia.Image.ImageSource 3806 * @crossplatform 3807 * @atomicservice 3808 * @since 11 3809 */ 3810 /** 3811 * The density for image pixel map. 3812 * 3813 * @type { ?number } 3814 * @syscap SystemCapability.Multimedia.Image.ImageSource 3815 * @crossplatform 3816 * @form 3817 * @atomicservice 3818 * @since 12 3819 */ 3820 fitDensity?: number; 3821 3822 /** 3823 * Color space of the image pixel map. 3824 * 3825 * @type { ?colorSpaceManager.ColorSpaceManager } 3826 * @syscap SystemCapability.Multimedia.Image.ImageSource 3827 * @crossplatform 3828 * @since 11 3829 */ 3830 desiredColorSpace?: colorSpaceManager.ColorSpaceManager; 3831 3832 /** 3833 * The desired dynamic range of the image pixelmap. 3834 * 3835 * @type { ?DecodingDynamicRange } 3836 * @syscap SystemCapability.Multimedia.Image.ImageSource 3837 * @since 12 3838 */ 3839 desiredDynamicRange?: DecodingDynamicRange; 3840 3841 /** 3842 * Resolution Quality of the image. 3843 * 3844 * @type { ?ResolutionQuality } 3845 * @syscap SystemCapability.Multimedia.Image.ImageSource 3846 * @systemapi 3847 * @since 12 3848 */ 3849 resolutionQuality?: ResolutionQuality; 3850 } 3851 3852 /** 3853 * Describes image color components. 3854 * 3855 * @typedef Component 3856 * @syscap SystemCapability.Multimedia.Image.Core 3857 * @since 9 3858 */ 3859 interface Component { 3860 /** 3861 * Component type. 3862 * 3863 * @type { ComponentType } 3864 * @syscap SystemCapability.Multimedia.Image.Core 3865 * @since 9 3866 */ 3867 readonly componentType: ComponentType; 3868 3869 /** 3870 * Row stride. 3871 * 3872 * @type { number } 3873 * @syscap SystemCapability.Multimedia.Image.Core 3874 * @since 9 3875 */ 3876 readonly rowStride: number; 3877 3878 /** 3879 * Pixel stride. 3880 * 3881 * @type { number } 3882 * @syscap SystemCapability.Multimedia.Image.Core 3883 * @since 9 3884 */ 3885 readonly pixelStride: number; 3886 3887 /** 3888 * Component buffer. 3889 * 3890 * @type { ArrayBuffer } 3891 * @syscap SystemCapability.Multimedia.Image.Core 3892 * @since 9 3893 */ 3894 readonly byteBuffer: ArrayBuffer; 3895 } 3896 3897 /** 3898 * Initialization options for pixelmap. 3899 * 3900 * @typedef InitializationOptions 3901 * @syscap SystemCapability.Multimedia.Image.Core 3902 * @since 8 3903 */ 3904 /** 3905 * Initialization options for pixelmap. 3906 * 3907 * @typedef InitializationOptions 3908 * @syscap SystemCapability.Multimedia.Image.Core 3909 * @crossplatform 3910 * @since 10 3911 */ 3912 /** 3913 * Initialization options for pixelmap. 3914 * 3915 * @typedef InitializationOptions 3916 * @syscap SystemCapability.Multimedia.Image.Core 3917 * @crossplatform 3918 * @atomicservice 3919 * @since 11 3920 */ 3921 /** 3922 * Initialization options for pixelmap. 3923 * 3924 * @typedef InitializationOptions 3925 * @syscap SystemCapability.Multimedia.Image.Core 3926 * @crossplatform 3927 * @form 3928 * @atomicservice 3929 * @since 12 3930 */ 3931 interface InitializationOptions { 3932 /** 3933 * PixelMap size. 3934 * 3935 * @type { Size } 3936 * @syscap SystemCapability.Multimedia.Image.Core 3937 * @since 8 3938 */ 3939 /** 3940 * PixelMap size. 3941 * 3942 * @type { Size } 3943 * @syscap SystemCapability.Multimedia.Image.Core 3944 * @crossplatform 3945 * @since 10 3946 */ 3947 /** 3948 * PixelMap size. 3949 * 3950 * @type { Size } 3951 * @syscap SystemCapability.Multimedia.Image.Core 3952 * @crossplatform 3953 * @atomicservice 3954 * @since 11 3955 */ 3956 /** 3957 * PixelMap size. 3958 * 3959 * @type { Size } 3960 * @syscap SystemCapability.Multimedia.Image.Core 3961 * @crossplatform 3962 * @form 3963 * @atomicservice 3964 * @since 12 3965 */ 3966 size: Size; 3967 3968 /** 3969 * PixelMap source format. 3970 * 3971 * @type { ?PixelMapFormat } 3972 * @syscap SystemCapability.Multimedia.Image.Core 3973 * @since 12 3974 */ 3975 srcPixelFormat?: PixelMapFormat; 3976 3977 /** 3978 * PixelMap expected format. 3979 * 3980 * @type { ?PixelMapFormat } 3981 * @syscap SystemCapability.Multimedia.Image.Core 3982 * @since 8 3983 */ 3984 /** 3985 * PixelMap expected format. 3986 * 3987 * @type { ?PixelMapFormat } 3988 * @syscap SystemCapability.Multimedia.Image.Core 3989 * @crossplatform 3990 * @since 10 3991 */ 3992 /** 3993 * PixelMap expected format. 3994 * 3995 * @type { ?PixelMapFormat } 3996 * @syscap SystemCapability.Multimedia.Image.Core 3997 * @crossplatform 3998 * @atomicservice 3999 * @since 11 4000 */ 4001 /** 4002 * PixelMap expected format. 4003 * 4004 * @type { ?PixelMapFormat } 4005 * @syscap SystemCapability.Multimedia.Image.Core 4006 * @crossplatform 4007 * @form 4008 * @atomicservice 4009 * @since 12 4010 */ 4011 pixelFormat?: PixelMapFormat; 4012 4013 /** 4014 * Editable or not. 4015 * 4016 * @type { ?boolean } 4017 * @syscap SystemCapability.Multimedia.Image.Core 4018 * @since 8 4019 */ 4020 /** 4021 * Editable or not. 4022 * 4023 * @type { ?boolean } 4024 * @syscap SystemCapability.Multimedia.Image.Core 4025 * @crossplatform 4026 * @since 10 4027 */ 4028 /** 4029 * Editable or not. 4030 * 4031 * @type { ?boolean } 4032 * @syscap SystemCapability.Multimedia.Image.Core 4033 * @crossplatform 4034 * @atomicservice 4035 * @since 11 4036 */ 4037 /** 4038 * Editable or not. 4039 * 4040 * @type { ?boolean } 4041 * @syscap SystemCapability.Multimedia.Image.Core 4042 * @crossplatform 4043 * @form 4044 * @atomicservice 4045 * @since 12 4046 */ 4047 editable?: boolean; 4048 4049 /** 4050 * PixelMap expected alpha type. 4051 * 4052 * @type { ?AlphaType } 4053 * @syscap SystemCapability.Multimedia.Image.Core 4054 * @since 9 4055 */ 4056 /** 4057 * PixelMap expected alpha type. 4058 * 4059 * @type { ?AlphaType } 4060 * @syscap SystemCapability.Multimedia.Image.Core 4061 * @crossplatform 4062 * @since 10 4063 */ 4064 /** 4065 * PixelMap expected alpha type. 4066 * 4067 * @type { ?AlphaType } 4068 * @syscap SystemCapability.Multimedia.Image.Core 4069 * @crossplatform 4070 * @atomicservice 4071 * @since 11 4072 */ 4073 /** 4074 * PixelMap expected alpha type. 4075 * 4076 * @type { ?AlphaType } 4077 * @syscap SystemCapability.Multimedia.Image.Core 4078 * @crossplatform 4079 * @form 4080 * @atomicservice 4081 * @since 12 4082 */ 4083 alphaType?: AlphaType; 4084 4085 /** 4086 * PixelMap expected scaling effect. 4087 * 4088 * @type { ?ScaleMode } 4089 * @syscap SystemCapability.Multimedia.Image.Core 4090 * @since 9 4091 */ 4092 /** 4093 * PixelMap expected scaling effect. 4094 * 4095 * @type { ?ScaleMode } 4096 * @syscap SystemCapability.Multimedia.Image.Core 4097 * @crossplatform 4098 * @since 10 4099 */ 4100 /** 4101 * PixelMap expected scaling effect. 4102 * 4103 * @type { ?ScaleMode } 4104 * @syscap SystemCapability.Multimedia.Image.Core 4105 * @crossplatform 4106 * @atomicservice 4107 * @since 11 4108 */ 4109 /** 4110 * PixelMap expected scaling effect. 4111 * 4112 * @type { ?ScaleMode } 4113 * @syscap SystemCapability.Multimedia.Image.Core 4114 * @crossplatform 4115 * @form 4116 * @atomicservice 4117 * @since 12 4118 */ 4119 scaleMode?: ScaleMode; 4120 } 4121 4122 /** 4123 * Initialization options for ImageSource. 4124 * 4125 * @typedef SourceOptions 4126 * @syscap SystemCapability.Multimedia.Image.Core 4127 * @since 9 4128 */ 4129 /** 4130 * Initialization options for ImageSource. 4131 * 4132 * @typedef SourceOptions 4133 * @syscap SystemCapability.Multimedia.Image.Core 4134 * @crossplatform 4135 * @since 10 4136 */ 4137 /** 4138 * Initialization options for ImageSource. 4139 * 4140 * @typedef SourceOptions 4141 * @syscap SystemCapability.Multimedia.Image.Core 4142 * @crossplatform 4143 * @atomicservice 4144 * @since 11 4145 */ 4146 /** 4147 * Initialization options for ImageSource. 4148 * 4149 * @typedef SourceOptions 4150 * @syscap SystemCapability.Multimedia.Image.Core 4151 * @crossplatform 4152 * @form 4153 * @atomicservice 4154 * @since 12 4155 */ 4156 interface SourceOptions { 4157 /** 4158 * The density for ImageSource. 4159 * 4160 * @type { number } 4161 * @syscap SystemCapability.Multimedia.Image.Core 4162 * @since 9 4163 */ 4164 /** 4165 * The density for ImageSource. 4166 * 4167 * @type { number } 4168 * @syscap SystemCapability.Multimedia.Image.Core 4169 * @crossplatform 4170 * @since 10 4171 */ 4172 /** 4173 * The density for ImageSource. 4174 * 4175 * @type { number } 4176 * @syscap SystemCapability.Multimedia.Image.Core 4177 * @crossplatform 4178 * @atomicservice 4179 * @since 11 4180 */ 4181 /** 4182 * The density for ImageSource. 4183 * 4184 * @type { number } 4185 * @syscap SystemCapability.Multimedia.Image.Core 4186 * @crossplatform 4187 * @form 4188 * @atomicservice 4189 * @since 12 4190 */ 4191 sourceDensity: number; 4192 4193 /** 4194 * PixelMap expected format. 4195 * 4196 * @type { ?PixelMapFormat } 4197 * @syscap SystemCapability.Multimedia.Image.Core 4198 * @since 9 4199 */ 4200 /** 4201 * PixelMap expected format. 4202 * 4203 * @type { ?PixelMapFormat } 4204 * @syscap SystemCapability.Multimedia.Image.Core 4205 * @crossplatform 4206 * @since 10 4207 */ 4208 /** 4209 * PixelMap expected format. 4210 * 4211 * @type { ?PixelMapFormat } 4212 * @syscap SystemCapability.Multimedia.Image.Core 4213 * @crossplatform 4214 * @atomicservice 4215 * @since 11 4216 */ 4217 /** 4218 * PixelMap expected format. 4219 * 4220 * @type { ?PixelMapFormat } 4221 * @syscap SystemCapability.Multimedia.Image.Core 4222 * @crossplatform 4223 * @form 4224 * @atomicservice 4225 * @since 12 4226 */ 4227 sourcePixelFormat?: PixelMapFormat; 4228 4229 /** 4230 * PixelMap size. 4231 * 4232 * @type { ?Size } 4233 * @syscap SystemCapability.Multimedia.Image.Core 4234 * @since 9 4235 */ 4236 /** 4237 * PixelMap size. 4238 * 4239 * @type { ?Size } 4240 * @syscap SystemCapability.Multimedia.Image.Core 4241 * @crossplatform 4242 * @since 10 4243 */ 4244 /** 4245 * PixelMap size. 4246 * 4247 * @type { ?Size } 4248 * @syscap SystemCapability.Multimedia.Image.Core 4249 * @crossplatform 4250 * @atomicservice 4251 * @since 11 4252 */ 4253 /** 4254 * PixelMap size. 4255 * 4256 * @type { ?Size } 4257 * @syscap SystemCapability.Multimedia.Image.Core 4258 * @crossplatform 4259 * @form 4260 * @atomicservice 4261 * @since 12 4262 */ 4263 sourceSize?: Size; 4264 } 4265 4266 /** 4267 * Value for HDR_STATIC_METADATA. 4268 * 4269 * @typedef HdrStaticMetadata 4270 * @syscap SystemCapability.Multimedia.Image.Core 4271 * @since 12 4272 */ 4273 interface HdrStaticMetadata { 4274 /** 4275 * The X-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b. 4276 * 4277 * @type { Array<number> } 4278 * @syscap SystemCapability.Multimedia.Image.Core 4279 * @since 12 4280 */ 4281 displayPrimariesX: Array<number>; 4282 4283 /** 4284 * The Y-coordinate of the primary colors. The length of the array is three. Store in the order of r, g, b. 4285 * 4286 * @type { Array<number> } 4287 * @syscap SystemCapability.Multimedia.Image.Core 4288 * @since 12 4289 */ 4290 displayPrimariesY: Array<number>; 4291 4292 /** 4293 * The X-coordinate of the white point value. 4294 * 4295 * @type { number } 4296 * @syscap SystemCapability.Multimedia.Image.Core 4297 * @since 12 4298 */ 4299 whitePointX: number; 4300 4301 /** 4302 * The Y-coordinate of the white point value. 4303 * 4304 * @type { number } 4305 * @syscap SystemCapability.Multimedia.Image.Core 4306 * @since 12 4307 */ 4308 whitePointY: number; 4309 4310 /** 4311 * Max luminance. 4312 * 4313 * @type { number } 4314 * @syscap SystemCapability.Multimedia.Image.Core 4315 * @since 12 4316 */ 4317 maxLuminance: number; 4318 4319 /** 4320 * Min luminance. 4321 * 4322 * @type { number } 4323 * @syscap SystemCapability.Multimedia.Image.Core 4324 * @since 12 4325 */ 4326 minLuminance: number; 4327 4328 /** 4329 * Maximum brightness of displayed content. 4330 * 4331 * @type { number } 4332 * @syscap SystemCapability.Multimedia.Image.Core 4333 * @since 12 4334 */ 4335 maxContentLightLevel: number; 4336 4337 /** 4338 * Maximum average brightness of displayed content. 4339 * 4340 * @type { number } 4341 * @syscap SystemCapability.Multimedia.Image.Core 4342 * @since 12 4343 */ 4344 maxFrameAverageLightLevel: number; 4345 } 4346 4347 /** 4348 * The per-component metadata. 4349 * 4350 * @typedef GainmapChannel 4351 * @syscap SystemCapability.Multimedia.Image.Core 4352 * @since 12 4353 */ 4354 interface GainmapChannel { 4355 /** 4356 * The per-component max gain map values. 4357 * 4358 * @type { number } 4359 * @syscap SystemCapability.Multimedia.Image.Core 4360 * @since 12 4361 */ 4362 gainmapMax: number; 4363 4364 /** 4365 * The per-component min gain map values. 4366 * 4367 * @type { number } 4368 * @syscap SystemCapability.Multimedia.Image.Core 4369 * @since 12 4370 */ 4371 gainmapMin: number; 4372 4373 /** 4374 * The per-component gamma values. 4375 * 4376 * @type { number } 4377 * @syscap SystemCapability.Multimedia.Image.Core 4378 * @since 12 4379 */ 4380 gamma: number; 4381 4382 /** 4383 * The per-component baseline offset. 4384 * 4385 * @type { number } 4386 * @syscap SystemCapability.Multimedia.Image.Core 4387 * @since 12 4388 */ 4389 baseOffset: number; 4390 4391 /** 4392 * The per-component alternate offset. 4393 * 4394 * @type { number } 4395 * @syscap SystemCapability.Multimedia.Image.Core 4396 * @since 12 4397 */ 4398 alternateOffset: number; 4399 } 4400 4401 /** 4402 * Values for HDR_GAINMAP_METADATA. 4403 * 4404 * @typedef HdrGainmapMetadata 4405 * @syscap SystemCapability.Multimedia.Image.Core 4406 * @since 12 4407 */ 4408 interface HdrGainmapMetadata { 4409 /** 4410 * The version used by the writer. 4411 * 4412 * @type { number } 4413 * @syscap SystemCapability.Multimedia.Image.Core 4414 * @since 12 4415 */ 4416 writerVersion: number; 4417 4418 /** 4419 * The minimum version a parser needs to understand. 4420 * 4421 * @type { number } 4422 * @syscap SystemCapability.Multimedia.Image.Core 4423 * @since 12 4424 */ 4425 miniVersion: number; 4426 4427 /** 4428 * The number of gain map channels, with a value of 1 or 3. 4429 * 4430 * @type { number } 4431 * @syscap SystemCapability.Multimedia.Image.Core 4432 * @since 12 4433 */ 4434 gainmapChannelCount: number; 4435 4436 /** 4437 * Indicate whether to use the color space of the base image. 4438 * 4439 * @type { boolean } 4440 * @syscap SystemCapability.Multimedia.Image.Core 4441 * @since 12 4442 */ 4443 useBaseColorFlag: boolean; 4444 4445 /** 4446 * The baseline hdr headroom. 4447 * 4448 * @type { number } 4449 * @syscap SystemCapability.Multimedia.Image.Core 4450 * @since 12 4451 */ 4452 baseHeadroom: number; 4453 4454 /** 4455 * The alternate hdr headroom. 4456 * 4457 * @type { number } 4458 * @syscap SystemCapability.Multimedia.Image.Core 4459 * @since 12 4460 */ 4461 alternateHeadroom: number; 4462 4463 /** 4464 * The per-channel metadata. 4465 * 4466 * @type { Array<GainmapChannel> } 4467 * @syscap SystemCapability.Multimedia.Image.Core 4468 * @since 12 4469 */ 4470 channels: Array<GainmapChannel>; 4471 } 4472 4473 /** 4474 * Defines the hdr metadata value. 4475 * 4476 * @typedef {HdrMetadataType | HdrStaticMetadata | ArrayBuffer | HdrGainmapMetadata} HdrMetadataValue 4477 * @syscap SystemCapability.Multimedia.Image.Core 4478 * @since 12 4479 */ 4480 type HdrMetadataValue = HdrMetadataType | HdrStaticMetadata | ArrayBuffer | HdrGainmapMetadata; 4481 4482 /** 4483 * Create pixelmap by data buffer. 4484 * 4485 * @param { ArrayBuffer } colors The image color buffer. 4486 * @param { InitializationOptions } options Initialization options for pixelmap. 4487 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 4488 * @syscap SystemCapability.Multimedia.Image.Core 4489 * @since 8 4490 */ 4491 /** 4492 * Create pixelmap by data buffer. 4493 * 4494 * @param { ArrayBuffer } colors The image color buffer. 4495 * @param { InitializationOptions } options Initialization options for pixelmap. 4496 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 4497 * @syscap SystemCapability.Multimedia.Image.Core 4498 * @crossplatform 4499 * @since 10 4500 */ 4501 function createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: AsyncCallback<PixelMap>): void; 4502 4503 /** 4504 * Create pixelmap by data buffer. 4505 * 4506 * @param { ArrayBuffer } colors The image color buffer. 4507 * @param { InitializationOptions } options Initialization options for pixelmap. 4508 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 4509 * @syscap SystemCapability.Multimedia.Image.Core 4510 * @since 8 4511 */ 4512 /** 4513 * Create pixelmap by data buffer. 4514 * 4515 * @param { ArrayBuffer } colors The image color buffer. 4516 * @param { InitializationOptions } options Initialization options for pixelmap. 4517 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 4518 * @syscap SystemCapability.Multimedia.Image.Core 4519 * @crossplatform 4520 * @since 10 4521 */ 4522 function createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise<PixelMap>; 4523 4524 /** 4525 * Create pixelmap by data buffer. 4526 * 4527 * @param { ArrayBuffer } colors The image color buffer. 4528 * @param { InitializationOptions } options Initialization options for pixelmap. 4529 * @returns { PixelMap } Returns the instance if the operation is successful;Otherwise, return undefined. 4530 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4531 * 2.Incorrect parameter types. 3.Parameter verification failed. 4532 * @syscap SystemCapability.Multimedia.Image.Core 4533 * @crossplatform 4534 * @since 12 4535 */ 4536 function createPixelMapSync(colors: ArrayBuffer, options: InitializationOptions): PixelMap; 4537 4538 /** 4539 * Create an empty pixelmap. 4540 * 4541 * @param { InitializationOptions } options Initialization options for pixelmap. 4542 * @returns { PixelMap } Returns the instance if the operation is successful;Otherwise, return undefined. 4543 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4544 * 2.Incorrect parameter types. 3.Parameter verification failed. 4545 * @syscap SystemCapability.Multimedia.Image.Core 4546 * @crossplatform 4547 * @since 12 4548 */ 4549function createPixelMapSync(options: InitializationOptions): PixelMap; 4550 4551 /** 4552 * Transforms pixelmap from unpremultiplied alpha format to premultiplied alpha format. 4553 * 4554 * @param { PixelMap } src The source pixelmap. 4555 * @param { PixelMap } dst The destination pixelmap. 4556 * @param { AsyncCallback<void> } callback Callback used to return the operation result. 4557 * If the operation fails, an error message is returned. 4558 * @throws { BusinessError } 62980103 - The image data is not supported. 4559 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4560 * 2.Incorrect parameter types. 3.Parameter verification failed. 4561 * @throws { BusinessError } 62980246 - Failed to read the pixelMap. 4562 * @throws { BusinessError } 62980248 - Pixelmap not allow modify. 4563 * @syscap SystemCapability.Multimedia.Image.Core 4564 * @crossplatform 4565 * @since 12 4566 */ 4567function createPremultipliedPixelMap(src: PixelMap, dst: PixelMap, callback: AsyncCallback<void>): void; 4568 4569 /** 4570 * Transforms pixelmap from premultiplied alpha format to unpremultiplied alpha format. 4571 * 4572 * @param { PixelMap } src The source pixelMap. 4573 * @param { PixelMap } dst The destination pixelmap. 4574 * @returns { Promise<void> } A Promise instance used to return the operation result. 4575 * If the operation fails, an error message is returned. 4576 * @throws { BusinessError } 62980103 - The image data is not supported. 4577 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4578 * 2.Incorrect parameter types. 3.Parameter verification failed. 4579 * @throws { BusinessError } 62980246 - Failed to read the pixelMap. 4580 * @throws { BusinessError } 62980248 - Pixelmap not allow modify. 4581 * @syscap SystemCapability.Multimedia.Image.Core 4582 * @crossplatform 4583 * @since 12 4584 */ 4585function createPremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<void>; 4586 4587 /** 4588 * Transforms pixelmap from premultiplied alpha format to unpremultiplied alpha format. 4589 * 4590 * @param { PixelMap } src The source pixelmap. 4591 * @param { PixelMap } dst The destination pixelmap. 4592 * @param { AsyncCallback<void> } callback Callback used to return the operation result. 4593 * If the operation fails, an error message is returned. 4594 * @throws { BusinessError } 62980103 - The image data is not supported. 4595 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4596 * 2.Incorrect parameter types. 3.Parameter verification failed. 4597 * @throws { BusinessError } 62980246 - Failed to read the pixelMap. 4598 * @throws { BusinessError } 62980248 - Pixelmap not allow modify. 4599 * @syscap SystemCapability.Multimedia.Image.Core 4600 * @crossplatform 4601 * @since 12 4602 */ 4603function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap, callback: AsyncCallback<void>): void; 4604 4605 /** 4606 * Transforms pixelmap from premultiplied alpha format to unpremultiplied alpha format. 4607 * 4608 * @param { PixelMap } src The source pixelmap. 4609 * @param { PixelMap } dst The destination pixelmap. 4610 * @returns { Promise<void> } A Promise instance used to return the operation result. 4611 * If the operation fails, an error message is returned. 4612 * @throws { BusinessError } 62980103 - The image data is not supported. 4613 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4614 * 2.Incorrect parameter types. 3.Parameter verification failed. 4615 * @throws { BusinessError } 62980246 - Failed to read the pixelMap. 4616 * @throws { BusinessError } 62980248 - Pixelmap not allow modify. 4617 * @syscap SystemCapability.Multimedia.Image.Core 4618 * @crossplatform 4619 * @since 12 4620 */ 4621function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise<void>; 4622 4623 /** 4624 * Creates a PixelMap object based on MessageSequence parameter. 4625 * 4626 * @param { rpc.MessageSequence } sequence - rpc.MessageSequence parameter. 4627 * @returns { PixelMap } Returns the instance if the operation is successful;Otherwise, an exception will be thrown. 4628 * @throws { BusinessError } 62980096 - Operation failed. 4629 * @throws { BusinessError } 62980097 - IPC error. 4630 * @throws { BusinessError } 62980115 - Invalid input parameter. 4631 * @throws { BusinessError } 62980105 - Failed to get the data. 4632 * @throws { BusinessError } 62980177 - Abnormal API environment. 4633 * @throws { BusinessError } 62980178 - Failed to create the PixelMap. 4634 * @throws { BusinessError } 62980179 - Abnormal buffer size. 4635 * @throws { BusinessError } 62980180 - FD mapping failed. 4636 * @throws { BusinessError } 62980246 - Failed to read the PixelMap. 4637 * @syscap SystemCapability.Multimedia.Image.Core 4638 * @since 11 4639 */ 4640 function createPixelMapFromParcel(sequence: rpc.MessageSequence): PixelMap; 4641 4642 /** 4643 * Creates a PixelMap object from surface id. 4644 * 4645 * @param { string } surfaceId - surface id. 4646 * @param { Region } region - The region to surface. 4647 * @returns { Promise<PixelMap> } Returns the instance if the operation is successful;Otherwise, an exception will be thrown. 4648 * @throws { BusinessError } 62980115 - If the image parameter invalid. 4649 * @throws { BusinessError } 62980105 - Failed to get the data. 4650 * @throws { BusinessError } 62980178 - Failed to create the PixelMap. 4651 * @syscap SystemCapability.Multimedia.Image.Core 4652 * @since 11 4653 */ 4654 function createPixelMapFromSurface(surfaceId: string, region: Region): Promise<PixelMap>; 4655 4656 /** 4657 * Creates a PixelMap object from surface id. 4658 * 4659 * @param { string } surfaceId - surface id. 4660 * @param { Region } region - The region to surface. 4661 * @returns { PixelMap } Returns the instance if the operation is successful;Otherwise, an exception will be thrown. 4662 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 4663 * 2.Incorrect parameter types. 3.Parameter verification failed. 4664 * @throws { BusinessError } 62980105 - Failed to get the data. 4665 * @throws { BusinessError } 62980178 - Failed to create the PixelMap. 4666 * @syscap SystemCapability.Multimedia.Image.Core 4667 * @since 12 4668 */ 4669 function createPixelMapFromSurfaceSync(surfaceId: string, region: Region): PixelMap; 4670 4671 /** 4672 * Creates an ImageSource instance based on the URI. 4673 * 4674 * @param { string } uri Image source URI. 4675 * @returns { ImageSource } returns the ImageSource instance if the operation is successful; returns null otherwise. 4676 * @syscap SystemCapability.Multimedia.Image.ImageSource 4677 * @since 6 4678 */ 4679 /** 4680 * Creates an ImageSource instance based on the URI. 4681 * 4682 * @param { string } uri Image source URI. 4683 * @returns { ImageSource } returns the ImageSource instance if the operation is successful; returns null otherwise. 4684 * @syscap SystemCapability.Multimedia.Image.ImageSource 4685 * @crossplatform 4686 * @since 10 4687 */ 4688 /** 4689 * Creates an ImageSource instance based on the URI. 4690 * 4691 * @param { string } uri Image source URI. 4692 * @returns { ImageSource } returns the ImageSource instance if the operation is successful; returns null otherwise. 4693 * @syscap SystemCapability.Multimedia.Image.ImageSource 4694 * @crossplatform 4695 * @atomicservice 4696 * @since 11 4697 */ 4698 function createImageSource(uri: string): ImageSource; 4699 4700 /** 4701 * Creates an ImageSource instance based on the URI. 4702 * 4703 * @param { string } uri Image source URI. 4704 * @param { SourceOptions } options The config of Image source. 4705 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4706 * @syscap SystemCapability.Multimedia.Image.ImageSource 4707 * @since 9 4708 */ 4709 /** 4710 * Creates an ImageSource instance based on the URI. 4711 * 4712 * @param { string } uri Image source URI. 4713 * @param { SourceOptions } options The config of Image source. 4714 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4715 * @syscap SystemCapability.Multimedia.Image.ImageSource 4716 * @crossplatform 4717 * @since 10 4718 */ 4719 /** 4720 * Creates an ImageSource instance based on the URI. 4721 * 4722 * @param { string } uri Image source URI. 4723 * @param { SourceOptions } options The config of Image source. 4724 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4725 * @syscap SystemCapability.Multimedia.Image.ImageSource 4726 * @crossplatform 4727 * @atomicservice 4728 * @since 11 4729 */ 4730 /** 4731 * Creates an ImageSource instance based on the URI. 4732 * 4733 * @param { string } uri Image source URI. 4734 * @param { SourceOptions } options The config of Image source. 4735 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4736 * @syscap SystemCapability.Multimedia.Image.ImageSource 4737 * @crossplatform 4738 * @form 4739 * @atomicservice 4740 * @since 12 4741 */ 4742 function createImageSource(uri: string, options: SourceOptions): ImageSource; 4743 4744 /** 4745 * Creates an ImageSource instance based on the file descriptor. 4746 * 4747 * @param { number } fd ID of a file descriptor. 4748 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4749 * @syscap SystemCapability.Multimedia.Image.ImageSource 4750 * @since 7 4751 */ 4752 /** 4753 * Creates an ImageSource instance based on the file descriptor. 4754 * 4755 * @param { number } fd ID of a file descriptor. 4756 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4757 * @syscap SystemCapability.Multimedia.Image.ImageSource 4758 * @crossplatform 4759 * @since 10 4760 */ 4761 /** 4762 * Creates an ImageSource instance based on the file descriptor. 4763 * 4764 * @param { number } fd ID of a file descriptor. 4765 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4766 * @syscap SystemCapability.Multimedia.Image.ImageSource 4767 * @crossplatform 4768 * @atomicservice 4769 * @since 11 4770 */ 4771 function createImageSource(fd: number): ImageSource; 4772 4773 /** 4774 * Creates an ImageSource instance based on the file descriptor. 4775 * 4776 * @param { number } fd ID of a file descriptor. 4777 * @param { SourceOptions } options The config of Image source. 4778 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4779 * @syscap SystemCapability.Multimedia.Image.ImageSource 4780 * @since 9 4781 */ 4782 /** 4783 * Creates an ImageSource instance based on the file descriptor. 4784 * 4785 * @param { number } fd ID of a file descriptor. 4786 * @param { SourceOptions } options The config of Image source. 4787 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4788 * @syscap SystemCapability.Multimedia.Image.ImageSource 4789 * @crossplatform 4790 * @since 10 4791 */ 4792 /** 4793 * Creates an ImageSource instance based on the file descriptor. 4794 * 4795 * @param { number } fd ID of a file descriptor. 4796 * @param { SourceOptions } options The config of Image source. 4797 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4798 * @syscap SystemCapability.Multimedia.Image.ImageSource 4799 * @crossplatform 4800 * @atomicservice 4801 * @since 11 4802 */ 4803 /** 4804 * Creates an ImageSource instance based on the file descriptor. 4805 * 4806 * @param { number } fd ID of a file descriptor. 4807 * @param { SourceOptions } options The config of Image source. 4808 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4809 * @syscap SystemCapability.Multimedia.Image.ImageSource 4810 * @crossplatform 4811 * @form 4812 * @atomicservice 4813 * @since 12 4814 */ 4815 function createImageSource(fd: number, options: SourceOptions): ImageSource; 4816 4817 /** 4818 * Creates an ImageSource instance based on the buffer. 4819 * 4820 * @param { ArrayBuffer } buf The buffer of the image. 4821 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4822 * @syscap SystemCapability.Multimedia.Image.ImageSource 4823 * @since 9 4824 */ 4825 /** 4826 * Creates an ImageSource instance based on the buffer. 4827 * 4828 * @param { ArrayBuffer } buf The buffer of the image. 4829 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4830 * @syscap SystemCapability.Multimedia.Image.ImageSource 4831 * @crossplatform 4832 * @since 10 4833 */ 4834 /** 4835 * Creates an ImageSource instance based on the buffer. 4836 * 4837 * @param { ArrayBuffer } buf The buffer of the image. 4838 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4839 * @syscap SystemCapability.Multimedia.Image.ImageSource 4840 * @crossplatform 4841 * @atomicservice 4842 * @since 11 4843 */ 4844 /** 4845 * Creates an ImageSource instance based on the buffer. 4846 * 4847 * @param { ArrayBuffer } buf The buffer of the image. 4848 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4849 * @syscap SystemCapability.Multimedia.Image.ImageSource 4850 * @crossplatform 4851 * @form 4852 * @atomicservice 4853 * @since 12 4854 */ 4855 function createImageSource(buf: ArrayBuffer): ImageSource; 4856 4857 /** 4858 * Creates an ImageSource instance based on the buffer. 4859 * 4860 * @param { ArrayBuffer } buf The buffer of the image. 4861 * @param { SourceOptions } options The config of Image source. 4862 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4863 * @syscap SystemCapability.Multimedia.Image.ImageSource 4864 * @since 9 4865 */ 4866 /** 4867 * Creates an ImageSource instance based on the buffer. 4868 * 4869 * @param { ArrayBuffer } buf The buffer of the image. 4870 * @param { SourceOptions } options The config of Image source. 4871 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4872 * @syscap SystemCapability.Multimedia.Image.ImageSource 4873 * @crossplatform 4874 * @since 10 4875 */ 4876 /** 4877 * Creates an ImageSource instance based on the buffer. 4878 * 4879 * @param { ArrayBuffer } buf The buffer of the image. 4880 * @param { SourceOptions } options The config of Image source. 4881 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4882 * @syscap SystemCapability.Multimedia.Image.ImageSource 4883 * @crossplatform 4884 * @atomicservice 4885 * @since 11 4886 */ 4887 /** 4888 * Creates an ImageSource instance based on the buffer. 4889 * 4890 * @param { ArrayBuffer } buf The buffer of the image. 4891 * @param { SourceOptions } options The config of Image source. 4892 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4893 * @syscap SystemCapability.Multimedia.Image.ImageSource 4894 * @crossplatform 4895 * @form 4896 * @atomicservice 4897 * @since 12 4898 */ 4899 function createImageSource(buf: ArrayBuffer, options: SourceOptions): ImageSource; 4900 4901 /** 4902 * Creates an ImageSource instance based on the raw file descriptor. 4903 * 4904 * @param { resourceManager.RawFileDescriptor } rawfile The raw file descriptor of the image. 4905 * @param { SourceOptions } options The config of Image source. 4906 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4907 * @syscap SystemCapability.Multimedia.Image.ImageSource 4908 * @crossplatform 4909 * @atomicservice 4910 * @since 11 4911 */ 4912 function createImageSource(rawfile: resourceManager.RawFileDescriptor, options?: SourceOptions): ImageSource; 4913 4914 /** 4915 * Creates an ImageSource instance based on the buffer in incremental. 4916 * 4917 * @param { ArrayBuffer } buf The buffer of the image. 4918 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4919 * @syscap SystemCapability.Multimedia.Image.ImageSource 4920 * @since 9 4921 */ 4922 /** 4923 * Creates an ImageSource instance based on the buffer in incremental. 4924 * 4925 * @param { ArrayBuffer } buf The buffer of the image. 4926 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4927 * @syscap SystemCapability.Multimedia.Image.ImageSource 4928 * @crossplatform 4929 * @since 10 4930 */ 4931 function CreateIncrementalSource(buf: ArrayBuffer): ImageSource; 4932 4933 /** 4934 * Creates an ImageSource instance based on the buffer in incremental. 4935 * 4936 * @param { ArrayBuffer } buf The buffer of the image. 4937 * @param { SourceOptions } options The config of source. 4938 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4939 * @syscap SystemCapability.Multimedia.Image.ImageSource 4940 * @since 9 4941 */ 4942 /** 4943 * Creates an ImageSource instance based on the buffer in incremental. 4944 * 4945 * @param { ArrayBuffer } buf The buffer of the image. 4946 * @param { SourceOptions } options The config of source. 4947 * @returns { ImageSource } Returns the ImageSource instance if the operation is successful; returns null otherwise. 4948 * @syscap SystemCapability.Multimedia.Image.ImageSource 4949 * @crossplatform 4950 * @since 10 4951 */ 4952 function CreateIncrementalSource(buf: ArrayBuffer, options?: SourceOptions): ImageSource; 4953 4954 /** 4955 * Creates an ImagePacker instance. 4956 * 4957 * @returns { ImagePacker } Returns the ImagePacker instance if the operation is successful; returns null otherwise. 4958 * @syscap SystemCapability.Multimedia.Image.ImagePacker 4959 * @since 6 4960 */ 4961 /** 4962 * Creates an ImagePacker instance. 4963 * 4964 * @returns { ImagePacker } Returns the ImagePacker instance if the operation is successful; returns null otherwise. 4965 * @syscap SystemCapability.Multimedia.Image.ImagePacker 4966 * @crossplatform 4967 * @since 10 4968 */ 4969 /** 4970 * Creates an ImagePacker instance. 4971 * 4972 * @returns { ImagePacker } Returns the ImagePacker instance if the operation is successful; returns null otherwise. 4973 * @syscap SystemCapability.Multimedia.Image.ImagePacker 4974 * @crossplatform 4975 * @atomicservice 4976 * @since 11 4977 */ 4978 function createImagePacker(): ImagePacker; 4979 4980 /** 4981 * Creates an ImageReceiver instance. 4982 * 4983 * @param { number } width The default width in pixels of the Images that this receiver will produce. 4984 * @param { number } height The default height in pixels of the Images that this receiver will produce. 4985 * @param { number } format The format of the Image that this receiver will produce. This must be one of the 4986 * {@link ImageFormat} constants. 4987 * @param { number } capacity The maximum number of images the user will want to access simultaneously. 4988 * @returns { ImageReceiver } Returns the ImageReceiver instance if the operation is successful; returns null otherwise. 4989 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 4990 * @since 9 4991 * @deprecated since 11 4992 * @useinstead image#createImageReceiver 4993 */ 4994 function createImageReceiver(width: number, height: number, format: number, capacity: number): ImageReceiver; 4995 4996 /** 4997 * Creates an ImageReceiver instance. 4998 * 4999 * @param { Size } size - The default {@link Size} in pixels of the Images that this receiver will produce. 5000 * @param { ImageFormat } format - The format of the Image that this receiver will produce. This must be one of the 5001 * {@link ImageFormat} constants. 5002 * @param { number } capacity - The maximum number of images the user will want to access simultaneously. 5003 * @returns { ImageReceiver } Returns the ImageReceiver instance if the operation is successful; returns null otherwise. 5004 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 5005 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 5006 * @since 11 5007 */ 5008 function createImageReceiver(size: Size, format: ImageFormat, capacity: number): ImageReceiver; 5009 5010 /** 5011 * Creates an ImageCreator instance. 5012 * 5013 * @param { number } width The default width in pixels of the Images that this creator will produce. 5014 * @param { number } height The default height in pixels of the Images that this creator will produce. 5015 * @param { number } format The format of the Image that this creator will produce. This must be one of the 5016 * {@link ImageFormat} constants. 5017 * @param { number } capacity The maximum number of images the user will want to access simultaneously. 5018 * @returns { ImageCreator } Returns the ImageCreator instance if the operation is successful; returns null otherwise. 5019 * @syscap SystemCapability.Multimedia.Image.ImageCreator 5020 * @since 9 5021 * @deprecated since 11 5022 * @useinstead image#createImageCreator 5023 */ 5024 function createImageCreator(width: number, height: number, format: number, capacity: number): ImageCreator; 5025 5026 /** 5027 * Creates an ImageCreator instance. 5028 * 5029 * @param { Size } size - The default {@link Size} in pixels of the Images that this creator will produce. 5030 * @param { ImageFormat } format - The format of the Image that this creator will produce. This must be one of the 5031 * {@link ImageFormat} constants. 5032 * @param { number } capacity - The maximum number of images the user will want to access simultaneously. 5033 * @returns { ImageCreator } Returns the ImageCreator instance if the operation is successful; returns null otherwise. 5034 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 5035 * @syscap SystemCapability.Multimedia.Image.ImageCreator 5036 * @since 11 5037 */ 5038 function createImageCreator(size: Size, format: ImageFormat, capacity: number): ImageCreator; 5039 /** 5040 * PixelMap instance. 5041 * 5042 * @typedef PixelMap 5043 * @syscap SystemCapability.Multimedia.Image.Core 5044 * @since 7 5045 */ 5046 /** 5047 * PixelMap instance. 5048 * 5049 * @typedef PixelMap 5050 * @syscap SystemCapability.Multimedia.Image.Core 5051 * @crossplatform 5052 * @since 10 5053 */ 5054 /** 5055 * PixelMap instance. 5056 * 5057 * @typedef PixelMap 5058 * @syscap SystemCapability.Multimedia.Image.Core 5059 * @crossplatform 5060 * @atomicservice 5061 * @since 11 5062 */ 5063 /** 5064 * PixelMap instance. 5065 * 5066 * @typedef PixelMap 5067 * @syscap SystemCapability.Multimedia.Image.Core 5068 * @crossplatform 5069 * @form 5070 * @atomicservice 5071 * @since 12 5072 */ 5073 interface PixelMap { 5074 /** 5075 * Whether the image pixel map can be edited. 5076 * 5077 * @type { boolean } 5078 * @syscap SystemCapability.Multimedia.Image.Core 5079 * @since 7 5080 */ 5081 /** 5082 * Whether the image pixel map can be edited. 5083 * 5084 * @type { boolean } 5085 * @syscap SystemCapability.Multimedia.Image.Core 5086 * @crossplatform 5087 * @since 10 5088 */ 5089 /** 5090 * Whether the image pixel map can be edited. 5091 * 5092 * @type { boolean } 5093 * @syscap SystemCapability.Multimedia.Image.Core 5094 * @crossplatform 5095 * @atomicservice 5096 * @since 11 5097 */ 5098 /** 5099 * Whether the image pixel map can be edited. 5100 * 5101 * @type { boolean } 5102 * @syscap SystemCapability.Multimedia.Image.Core 5103 * @crossplatform 5104 * @form 5105 * @atomicservice 5106 * @since 12 5107 */ 5108 readonly isEditable: boolean; 5109 5110 /** 5111 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5112 * a promise to return the result. 5113 * 5114 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5115 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5116 * @syscap SystemCapability.Multimedia.Image.Core 5117 * @since 7 5118 */ 5119 /** 5120 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5121 * a promise to return the result. 5122 * 5123 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5124 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5125 * @syscap SystemCapability.Multimedia.Image.Core 5126 * @crossplatform 5127 * @since 10 5128 */ 5129 /** 5130 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5131 * a promise to return the result. 5132 * 5133 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5134 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5135 * @syscap SystemCapability.Multimedia.Image.Core 5136 * @crossplatform 5137 * @atomicservice 5138 * @since 11 5139 */ 5140 /** 5141 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5142 * a promise to return the result. 5143 * 5144 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5145 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5146 * @syscap SystemCapability.Multimedia.Image.Core 5147 * @crossplatform 5148 * @form 5149 * @atomicservice 5150 * @since 12 5151 */ 5152 readPixelsToBuffer(dst: ArrayBuffer): Promise<void>; 5153 5154 /** 5155 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5156 * a callback to return the result. 5157 * 5158 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5159 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5160 * @syscap SystemCapability.Multimedia.Image.Core 5161 * @since 7 5162 */ 5163 /** 5164 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5165 * a callback to return the result. 5166 * 5167 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5168 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5169 * @syscap SystemCapability.Multimedia.Image.Core 5170 * @crossplatform 5171 * @since 10 5172 */ 5173 /** 5174 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5175 * a callback to return the result. 5176 * 5177 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5178 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5179 * @syscap SystemCapability.Multimedia.Image.Core 5180 * @crossplatform 5181 * @atomicservice 5182 * @since 11 5183 */ 5184 /** 5185 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 5186 * a callback to return the result. 5187 * 5188 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5189 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5190 * @syscap SystemCapability.Multimedia.Image.Core 5191 * @crossplatform 5192 * @form 5193 * @atomicservice 5194 * @since 12 5195 */ 5196 readPixelsToBuffer(dst: ArrayBuffer, callback: AsyncCallback<void>): void; 5197 5198 /** 5199 * Reads image pixel map data and writes the data to an ArrayBuffer. 5200 * 5201 * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. 5202 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5203 * 2.Incorrect parameter types. 3.Parameter verification failed. 5204 * @throws { BusinessError } 501 - Resource Unavailable. 5205 * @syscap SystemCapability.Multimedia.Image.Core 5206 * @crossplatform 5207 * @form 5208 * @atomicservice 5209 * @since 12 5210 */ 5211 readPixelsToBufferSync(dst: ArrayBuffer): void; 5212 5213 /** 5214 * Reads image pixel map data in an area. This method uses a promise to return the data read. 5215 * 5216 * @param { PositionArea } area Area from which the image pixel map data will be read. 5217 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5218 * @syscap SystemCapability.Multimedia.Image.Core 5219 * @since 7 5220 */ 5221 /** 5222 * Reads image pixel map data in an area. This method uses a promise to return the data read. 5223 * 5224 * @param { PositionArea } area Area from which the image pixel map data will be read. 5225 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5226 * @syscap SystemCapability.Multimedia.Image.Core 5227 * @crossplatform 5228 * @since 10 5229 */ 5230 /** 5231 * Reads image pixel map data in an area. This method uses a promise to return the data read. 5232 * 5233 * @param { PositionArea } area Area from which the image pixel map data will be read. 5234 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5235 * @syscap SystemCapability.Multimedia.Image.Core 5236 * @crossplatform 5237 * @atomicservice 5238 * @since 11 5239 */ 5240 /** 5241 * Reads image pixel map data in an area. This method uses a promise to return the data read. 5242 * 5243 * @param { PositionArea } area Area from which the image pixel map data will be read. 5244 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5245 * @syscap SystemCapability.Multimedia.Image.Core 5246 * @crossplatform 5247 * @form 5248 * @atomicservice 5249 * @since 12 5250 */ 5251 readPixels(area: PositionArea): Promise<void>; 5252 5253 /** 5254 * Reads image pixel map data in an area. This method uses a callback to return the data read. 5255 * 5256 * @param { PositionArea } area Area from which the image pixel map data will be read. 5257 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5258 * @syscap SystemCapability.Multimedia.Image.Core 5259 * @since 7 5260 */ 5261 /** 5262 * Reads image pixel map data in an area. This method uses a callback to return the data read. 5263 * 5264 * @param { PositionArea } area Area from which the image pixel map data will be read. 5265 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5266 * @syscap SystemCapability.Multimedia.Image.Core 5267 * @crossplatform 5268 * @since 10 5269 */ 5270 /** 5271 * Reads image pixel map data in an area. This method uses a callback to return the data read. 5272 * 5273 * @param { PositionArea } area Area from which the image pixel map data will be read. 5274 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5275 * @syscap SystemCapability.Multimedia.Image.Core 5276 * @crossplatform 5277 * @atomicservice 5278 * @since 11 5279 */ 5280 /** 5281 * Reads image pixel map data in an area. This method uses a callback to return the data read. 5282 * 5283 * @param { PositionArea } area Area from which the image pixel map data will be read. 5284 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5285 * @syscap SystemCapability.Multimedia.Image.Core 5286 * @crossplatform 5287 * @form 5288 * @atomicservice 5289 * @since 12 5290 */ 5291 readPixels(area: PositionArea, callback: AsyncCallback<void>): void; 5292 5293 /** 5294 * Reads image pixel map data in an area. 5295 * 5296 * @param { PositionArea } area Area from which the image pixel map data will be read. 5297 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5298 * 2.Incorrect parameter types. 3.Parameter verification failed. 5299 * @throws { BusinessError } 501 - Resource Unavailable. 5300 * @syscap SystemCapability.Multimedia.Image.Core 5301 * @crossplatform 5302 * @atomicservice 5303 * @since 12 5304 */ 5305 readPixelsSync(area: PositionArea): void; 5306 5307 /** 5308 * Writes image pixel map data to the specified area. This method uses a promise to return 5309 * the operation result. 5310 * 5311 * @param { PositionArea } area Area to which the image pixel map data will be written. 5312 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5313 * @syscap SystemCapability.Multimedia.Image.Core 5314 * @since 7 5315 */ 5316 /** 5317 * Writes image pixel map data to the specified area. This method uses a promise to return 5318 * the operation result. 5319 * 5320 * @param { PositionArea } area Area to which the image pixel map data will be written. 5321 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5322 * @syscap SystemCapability.Multimedia.Image.Core 5323 * @crossplatform 5324 * @since 10 5325 */ 5326 /** 5327 * Writes image pixel map data to the specified area. This method uses a promise to return 5328 * the operation result. 5329 * 5330 * @param { PositionArea } area Area to which the image pixel map data will be written. 5331 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5332 * @syscap SystemCapability.Multimedia.Image.Core 5333 * @crossplatform 5334 * @atomicservice 5335 * @since 11 5336 */ 5337 /** 5338 * Writes image pixel map data to the specified area. This method uses a promise to return 5339 * the operation result. 5340 * 5341 * @param { PositionArea } area Area to which the image pixel map data will be written. 5342 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5343 * @syscap SystemCapability.Multimedia.Image.Core 5344 * @crossplatform 5345 * @form 5346 * @atomicservice 5347 * @since 12 5348 */ 5349 writePixels(area: PositionArea): Promise<void>; 5350 5351 /** 5352 * Writes image pixel map data to the specified area. This method uses a callback to return 5353 * the operation result. 5354 * 5355 * @param { PositionArea } area Area to which the image pixel map data will be written. 5356 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5357 * @syscap SystemCapability.Multimedia.Image.Core 5358 * @since 7 5359 */ 5360 /** 5361 * Writes image pixel map data to the specified area. This method uses a callback to return 5362 * the operation result. 5363 * 5364 * @param { PositionArea } area Area to which the image pixel map data will be written. 5365 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5366 * @syscap SystemCapability.Multimedia.Image.Core 5367 * @crossplatform 5368 * @since 10 5369 */ 5370 /** 5371 * Writes image pixel map data to the specified area. This method uses a callback to return 5372 * the operation result. 5373 * 5374 * @param { PositionArea } area Area to which the image pixel map data will be written. 5375 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5376 * @syscap SystemCapability.Multimedia.Image.Core 5377 * @crossplatform 5378 * @atomicservice 5379 * @since 11 5380 */ 5381 /** 5382 * Writes image pixel map data to the specified area. This method uses a callback to return 5383 * the operation result. 5384 * 5385 * @param { PositionArea } area Area to which the image pixel map data will be written. 5386 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5387 * @syscap SystemCapability.Multimedia.Image.Core 5388 * @crossplatform 5389 * @form 5390 * @atomicservice 5391 * @since 12 5392 */ 5393 writePixels(area: PositionArea, callback: AsyncCallback<void>): void; 5394 5395 /** 5396 * Writes image pixel map data to the specified area. 5397 * 5398 * @param { PositionArea } area Area to which the image pixel map data will be written. 5399 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5400 * 2.Incorrect parameter types. 3.Parameter verification failed. 5401 * @throws { BusinessError } 501 - Resource Unavailable. 5402 * @syscap SystemCapability.Multimedia.Image.Core 5403 * @crossplatform 5404 * @form 5405 * @atomicservice 5406 * @since 12 5407 */ 5408 writePixelsSync(area: PositionArea): void; 5409 /** 5410 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5411 * uses a promise to return the result. 5412 * 5413 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5414 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5415 * @syscap SystemCapability.Multimedia.Image.Core 5416 * @since 7 5417 */ 5418 /** 5419 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5420 * uses a promise to return the result. 5421 * 5422 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5423 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5424 * @syscap SystemCapability.Multimedia.Image.Core 5425 * @crossplatform 5426 * @since 10 5427 */ 5428 /** 5429 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5430 * uses a promise to return the result. 5431 * 5432 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5433 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5434 * @syscap SystemCapability.Multimedia.Image.Core 5435 * @crossplatform 5436 * @atomicservice 5437 * @since 11 5438 */ 5439 /** 5440 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5441 * uses a promise to return the result. 5442 * 5443 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5444 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5445 * @syscap SystemCapability.Multimedia.Image.Core 5446 * @crossplatform 5447 * @form 5448 * @atomicservice 5449 * @since 12 5450 */ 5451 writeBufferToPixels(src: ArrayBuffer): Promise<void>; 5452 5453 /** 5454 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5455 * uses a callback to return the result. 5456 * 5457 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5458 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5459 * @syscap SystemCapability.Multimedia.Image.Core 5460 * @since 7 5461 */ 5462 /** 5463 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5464 * uses a callback to return the result. 5465 * 5466 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5467 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5468 * @syscap SystemCapability.Multimedia.Image.Core 5469 * @crossplatform 5470 * @since 10 5471 */ 5472 /** 5473 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5474 * uses a callback to return the result. 5475 * 5476 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5477 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5478 * @syscap SystemCapability.Multimedia.Image.Core 5479 * @crossplatform 5480 * @atomicservice 5481 * @since 11 5482 */ 5483 /** 5484 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. This method 5485 * uses a callback to return the result. 5486 * 5487 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5488 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5489 * @syscap SystemCapability.Multimedia.Image.Core 5490 * @crossplatform 5491 * @form 5492 * @atomicservice 5493 * @since 12 5494 */ 5495 writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback<void>): void; 5496 5497 /** 5498 * Reads image data in an ArrayBuffer and writes the data to a PixelMap object. 5499 * 5500 * @param { ArrayBuffer } src A buffer from which the image data will be read. 5501 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5502 * 2.Incorrect parameter types. 3.Parameter verification failed. 5503 * @throws { BusinessError } 501 - Resource Unavailable. 5504 * @syscap SystemCapability.Multimedia.Image.Core 5505 * @crossplatform 5506 * @atomicservice 5507 * @since 12 5508 */ 5509 writeBufferToPixelsSync(src: ArrayBuffer): void; 5510 5511 /** 5512 * Convert pixelmap to standard dynamic range. 5513 * 5514 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5515 * @throws { BusinessError } 62980137 - Invalid image operation. 5516 * @syscap SystemCapability.Multimedia.Image.Core 5517 * @since 12 5518 */ 5519 toSdr(): Promise<void>; 5520 5521 /** 5522 * Obtains pixel map information about this image. This method uses a promise to return the information. 5523 * 5524 * @returns { Promise<ImageInfo> } A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. 5525 * @syscap SystemCapability.Multimedia.Image.Core 5526 * @since 7 5527 */ 5528 /** 5529 * Obtains pixel map information about this image. This method uses a promise to return the information. 5530 * 5531 * @returns { Promise<ImageInfo> } A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. 5532 * @syscap SystemCapability.Multimedia.Image.Core 5533 * @crossplatform 5534 * @since 10 5535 */ 5536 /** 5537 * Obtains pixel map information about this image. This method uses a promise to return the information. 5538 * 5539 * @returns { Promise<ImageInfo> } A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. 5540 * @syscap SystemCapability.Multimedia.Image.Core 5541 * @crossplatform 5542 * @atomicservice 5543 * @since 11 5544 */ 5545 /** 5546 * Obtains pixel map information about this image. This method uses a promise to return the information. 5547 * 5548 * @returns { Promise<ImageInfo> } A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. 5549 * @syscap SystemCapability.Multimedia.Image.Core 5550 * @crossplatform 5551 * @form 5552 * @atomicservice 5553 * @since 12 5554 */ 5555 getImageInfo(): Promise<ImageInfo>; 5556 5557 /** 5558 * Obtains pixel map information about this image. This method uses a callback to return the information. 5559 * 5560 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image pixel map information. 5561 * If the operation fails, an error message is returned. 5562 * @syscap SystemCapability.Multimedia.Image.Core 5563 * @since 7 5564 */ 5565 /** 5566 * Obtains pixel map information about this image. This method uses a callback to return the information. 5567 * 5568 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image pixel map information. 5569 * If the operation fails, an error message is returned. 5570 * @syscap SystemCapability.Multimedia.Image.Core 5571 * @crossplatform 5572 * @since 10 5573 */ 5574 /** 5575 * Obtains pixel map information about this image. This method uses a callback to return the information. 5576 * 5577 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image pixel map information. 5578 * If the operation fails, an error message is returned. 5579 * @syscap SystemCapability.Multimedia.Image.Core 5580 * @crossplatform 5581 * @atomicservice 5582 * @since 11 5583 */ 5584 /** 5585 * Obtains pixel map information about this image. This method uses a callback to return the information. 5586 * 5587 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image pixel map information. 5588 * If the operation fails, an error message is returned. 5589 * @syscap SystemCapability.Multimedia.Image.Core 5590 * @crossplatform 5591 * @form 5592 * @atomicservice 5593 * @since 12 5594 */ 5595 getImageInfo(callback: AsyncCallback<ImageInfo>): void; 5596 5597 /** 5598 * Get image information from image source. 5599 * 5600 * @returns { ImageInfo } the image information. 5601 * @throws { BusinessError } 501 - Resource Unavailable. 5602 * @syscap SystemCapability.Multimedia.Image.ImageSource 5603 * @crossplatform 5604 * @form 5605 * @atomicservice 5606 * @since 12 5607 */ 5608 getImageInfoSync(): ImageInfo; 5609 5610 /** 5611 * Obtains the number of bytes in each line of the image pixel map. 5612 * 5613 * @returns { number } Number of bytes in each line. 5614 * @syscap SystemCapability.Multimedia.Image.Core 5615 * @since 7 5616 */ 5617 /** 5618 * Obtains the number of bytes in each line of the image pixel map. 5619 * 5620 * @returns { number } Number of bytes in each line. 5621 * @syscap SystemCapability.Multimedia.Image.Core 5622 * @crossplatform 5623 * @since 10 5624 */ 5625 /** 5626 * Obtains the number of bytes in each line of the image pixel map. 5627 * 5628 * @returns { number } Number of bytes in each line. 5629 * @syscap SystemCapability.Multimedia.Image.Core 5630 * @crossplatform 5631 * @atomicservice 5632 * @since 11 5633 */ 5634 /** 5635 * Obtains the number of bytes in each line of the image pixel map. 5636 * 5637 * @returns { number } Number of bytes in each line. 5638 * @syscap SystemCapability.Multimedia.Image.Core 5639 * @crossplatform 5640 * @form 5641 * @atomicservice 5642 * @since 12 5643 */ 5644 getBytesNumberPerRow(): number; 5645 5646 /** 5647 * Obtains the total number of bytes of the image pixel map. 5648 * 5649 * @returns { number } Total number of bytes. 5650 * @syscap SystemCapability.Multimedia.Image.Core 5651 * @since 7 5652 */ 5653 /** 5654 * Obtains the total number of bytes of the image pixel map. 5655 * 5656 * @returns { number } Total number of bytes. 5657 * @syscap SystemCapability.Multimedia.Image.Core 5658 * @crossplatform 5659 * @since 10 5660 */ 5661 /** 5662 * Obtains the total number of bytes of the image pixel map. 5663 * 5664 * @returns { number } Total number of bytes. 5665 * @syscap SystemCapability.Multimedia.Image.Core 5666 * @crossplatform 5667 * @atomicservice 5668 * @since 11 5669 */ 5670 /** 5671 * Obtains the total number of bytes of the image pixel map. 5672 * 5673 * @returns { number } Total number of bytes. 5674 * @syscap SystemCapability.Multimedia.Image.Core 5675 * @crossplatform 5676 * @form 5677 * @atomicservice 5678 * @since 12 5679 */ 5680 getPixelBytesNumber(): number; 5681 5682 /** 5683 * Obtains the density of the image pixel map. 5684 * 5685 * @returns { number } The number of density. 5686 * @syscap SystemCapability.Multimedia.Image.Core 5687 * @since 9 5688 */ 5689 /** 5690 * Obtains the density of the image pixel map. 5691 * 5692 * @returns { number } The number of density. 5693 * @syscap SystemCapability.Multimedia.Image.Core 5694 * @crossplatform 5695 * @since 10 5696 */ 5697 /** 5698 * Obtains the density of the image pixel map. 5699 * 5700 * @returns { number } The number of density. 5701 * @syscap SystemCapability.Multimedia.Image.Core 5702 * @crossplatform 5703 * @atomicservice 5704 * @since 11 5705 */ 5706 /** 5707 * Obtains the density of the image pixel map. 5708 * 5709 * @returns { number } The number of density. 5710 * @syscap SystemCapability.Multimedia.Image.Core 5711 * @crossplatform 5712 * @form 5713 * @atomicservice 5714 * @since 12 5715 */ 5716 getDensity(): number; 5717 5718 /** 5719 * Set the transparent rate of pixel map. This method uses a callback to return the operation result. 5720 * 5721 * @param { number } rate The value of transparent rate. 5722 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5723 * @syscap SystemCapability.Multimedia.Image.Core 5724 * @since 9 5725 */ 5726 /** 5727 * Set the transparent rate of pixel map. This method uses a callback to return the operation result. 5728 * 5729 * @param { number } rate The value of transparent rate. 5730 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5731 * @syscap SystemCapability.Multimedia.Image.Core 5732 * @crossplatform 5733 * @since 10 5734 */ 5735 /** 5736 * Set the transparent rate of pixel map. This method uses a callback to return the operation result. 5737 * 5738 * @param { number } rate The value of transparent rate. 5739 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5740 * @syscap SystemCapability.Multimedia.Image.Core 5741 * @crossplatform 5742 * @atomicservice 5743 * @since 11 5744 */ 5745 /** 5746 * Set the transparent rate of pixel map. This method uses a callback to return the operation result. 5747 * 5748 * @param { number } rate The value of transparent rate. 5749 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5750 * @syscap SystemCapability.Multimedia.Image.Core 5751 * @crossplatform 5752 * @form 5753 * @atomicservice 5754 * @since 12 5755 */ 5756 opacity(rate: number, callback: AsyncCallback<void>): void; 5757 5758 /** 5759 * Set the transparent rate of pixel map. This method uses a promise to return the result. 5760 * 5761 * @param { number } rate The value of transparent rate. 5762 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5763 * @syscap SystemCapability.Multimedia.Image.Core 5764 * @since 9 5765 */ 5766 /** 5767 * Set the transparent rate of pixel map. This method uses a promise to return the result. 5768 * 5769 * @param { number } rate The value of transparent rate. 5770 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5771 * @syscap SystemCapability.Multimedia.Image.Core 5772 * @crossplatform 5773 * @since 10 5774 */ 5775 /** 5776 * Set the transparent rate of pixel map. This method uses a promise to return the result. 5777 * 5778 * @param { number } rate The value of transparent rate. 5779 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5780 * @syscap SystemCapability.Multimedia.Image.Core 5781 * @crossplatform 5782 * @atomicservice 5783 * @since 11 5784 */ 5785 /** 5786 * Set the transparent rate of pixel map. This method uses a promise to return the result. 5787 * 5788 * @param { number } rate The value of transparent rate. 5789 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5790 * @syscap SystemCapability.Multimedia.Image.Core 5791 * @crossplatform 5792 * @form 5793 * @atomicservice 5794 * @since 12 5795 */ 5796 opacity(rate: number): Promise<void>; 5797 5798 /** 5799 * Set the transparent rate of pixel map. 5800 * 5801 * @param { number } rate The value of transparent rate. 5802 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5803 * 2.Incorrect parameter types. 3.Parameter verification failed. 5804 * @throws { BusinessError } 501 - Resource Unavailable. 5805 * @syscap SystemCapability.Multimedia.Image.Core 5806 * @crossplatform 5807 * @atomicservice 5808 * @since 12 5809 */ 5810 opacitySync(rate: number): void; 5811 /** 5812 * Obtains new pixel map with alpha information. This method uses a promise to return the information. 5813 * 5814 * @returns { Promise<PixelMap> } A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. 5815 * @syscap SystemCapability.Multimedia.Image.Core 5816 * @since 9 5817 */ 5818 /** 5819 * Obtains new pixel map with alpha information. This method uses a promise to return the information. 5820 * 5821 * @returns { Promise<PixelMap> } A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. 5822 * @syscap SystemCapability.Multimedia.Image.Core 5823 * @crossplatform 5824 * @since 10 5825 */ 5826 /** 5827 * Obtains new pixel map with alpha information. This method uses a promise to return the information. 5828 * 5829 * @returns { Promise<PixelMap> } A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. 5830 * @syscap SystemCapability.Multimedia.Image.Core 5831 * @crossplatform 5832 * @atomicservice 5833 * @since 11 5834 */ 5835 /** 5836 * Obtains new pixel map with alpha information. This method uses a promise to return the information. 5837 * 5838 * @returns { Promise<PixelMap> } A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. 5839 * @syscap SystemCapability.Multimedia.Image.Core 5840 * @crossplatform 5841 * @form 5842 * @atomicservice 5843 * @since 12 5844 */ 5845 createAlphaPixelmap(): Promise<PixelMap>; 5846 5847 /** 5848 * Obtains new pixel map with alpha information. This method uses a callback to return the information. 5849 * 5850 * @param { AsyncCallback<PixelMap> } callback Callback used to return the new image pixel map. If the operation fails, an error message is returned. 5851 * @syscap SystemCapability.Multimedia.Image.Core 5852 * @since 9 5853 */ 5854 /** 5855 * Obtains new pixel map with alpha information. This method uses a callback to return the information. 5856 * 5857 * @param { AsyncCallback<PixelMap> } callback Callback used to return the new image pixel map. If the operation fails, an error message is returned. 5858 * @syscap SystemCapability.Multimedia.Image.Core 5859 * @crossplatform 5860 * @since 10 5861 */ 5862 /** 5863 * Obtains new pixel map with alpha information. This method uses a callback to return the information. 5864 * 5865 * @param { AsyncCallback<PixelMap> } callback Callback used to return the new image pixel map. If the operation fails, an error message is returned. 5866 * @syscap SystemCapability.Multimedia.Image.Core 5867 * @crossplatform 5868 * @atomicservice 5869 * @since 11 5870 */ 5871 /** 5872 * Obtains new pixel map with alpha information. This method uses a callback to return the information. 5873 * 5874 * @param { AsyncCallback<PixelMap> } callback Callback used to return the new image pixel map. If the operation fails, an error message is returned. 5875 * @syscap SystemCapability.Multimedia.Image.Core 5876 * @crossplatform 5877 * @form 5878 * @atomicservice 5879 * @since 12 5880 */ 5881 createAlphaPixelmap(callback: AsyncCallback<PixelMap>): void; 5882 5883 /** 5884 * Obtains new pixel map with alpha information. 5885 * 5886 * @returns { PixelMap } return the new image pixel map. If the operation fails, an error message is returned. 5887 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Parameter verification failed. 5888 * @throws { BusinessError } 501 - Resource Unavailable. 5889 * @syscap SystemCapability.Multimedia.Image.Core 5890 * @crossplatform 5891 * @atomicservice 5892 * @since 12 5893 */ 5894 createAlphaPixelmapSync(): PixelMap; 5895 /** 5896 * Image zoom in width and height. This method uses a callback to return the operation result. 5897 * 5898 * @param { number } x The zoom value of width. 5899 * @param { number } y The zoom value of height. 5900 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5901 * @syscap SystemCapability.Multimedia.Image.Core 5902 * @since 9 5903 */ 5904 /** 5905 * Image zoom in width and height. This method uses a callback to return the operation result. 5906 * 5907 * @param { number } x The zoom value of width. 5908 * @param { number } y The zoom value of height. 5909 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5910 * @syscap SystemCapability.Multimedia.Image.Core 5911 * @crossplatform 5912 * @since 10 5913 */ 5914 /** 5915 * Image zoom in width and height. This method uses a callback to return the operation result. 5916 * 5917 * @param { number } x The zoom value of width. 5918 * @param { number } y The zoom value of height. 5919 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5920 * @syscap SystemCapability.Multimedia.Image.Core 5921 * @crossplatform 5922 * @atomicservice 5923 * @since 11 5924 */ 5925 /** 5926 * Image zoom in width and height. This method uses a callback to return the operation result. 5927 * 5928 * @param { number } x The zoom value of width. 5929 * @param { number } y The zoom value of height. 5930 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 5931 * @syscap SystemCapability.Multimedia.Image.Core 5932 * @crossplatform 5933 * @form 5934 * @atomicservice 5935 * @since 12 5936 */ 5937 scale(x: number, y: number, callback: AsyncCallback<void>): void; 5938 5939 /** 5940 * Image zoom in width and height. This method uses a promise to return the result. 5941 * 5942 * @param { number } x The zoom value of width. 5943 * @param { number } y The zoom value of height. 5944 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5945 * @syscap SystemCapability.Multimedia.Image.Core 5946 * @since 9 5947 */ 5948 /** 5949 * Image zoom in width and height. This method uses a promise to return the result. 5950 * 5951 * @param { number } x The zoom value of width. 5952 * @param { number } y The zoom value of height. 5953 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5954 * @syscap SystemCapability.Multimedia.Image.Core 5955 * @crossplatform 5956 * @since 10 5957 */ 5958 /** 5959 * Image zoom in width and height. This method uses a promise to return the result. 5960 * 5961 * @param { number } x The zoom value of width. 5962 * @param { number } y The zoom value of height. 5963 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5964 * @syscap SystemCapability.Multimedia.Image.Core 5965 * @crossplatform 5966 * @atomicservice 5967 * @since 11 5968 */ 5969 /** 5970 * Image zoom in width and height. This method uses a promise to return the result. 5971 * 5972 * @param { number } x The zoom value of width. 5973 * @param { number } y The zoom value of height. 5974 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 5975 * @syscap SystemCapability.Multimedia.Image.Core 5976 * @crossplatform 5977 * @form 5978 * @atomicservice 5979 * @since 12 5980 */ 5981 scale(x: number, y: number): Promise<void>; 5982 5983 /** 5984 * Image zoom in width and height. 5985 * 5986 * @param { number } x The zoom value of width. 5987 * @param { number } y The zoom value of height. 5988 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 5989 * 2.Incorrect parameter types. 3.Parameter verification failed. 5990 * @throws { BusinessError } 501 - Resource Unavailable. 5991 * @syscap SystemCapability.Multimedia.Image.Core 5992 * @crossplatform 5993 * @atomicservice 5994 * @since 12 5995 */ 5996 scaleSync(x: number, y: number): void; 5997 5998 /** 5999 * Image zoom in width and height width with anti-aliasing. This method uses a promise to return the result. 6000 * 6001 * @param { number } x The zoom value of width. 6002 * @param { number } y The zoom value of height. 6003 * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. 6004 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6005 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6006 * 2.Incorrect parameter types. 3.Parameter verification failed. 6007 * @throws { BusinessError } 501 - Resource Unavailable. 6008 * @syscap SystemCapability.Multimedia.Image.Core 6009 * @crossplatform 6010 * @form 6011 * @atomicservice 6012 * @since 12 6013 */ 6014 scale(x: number, y: number, level: AntiAliasingLevel): Promise<void>; 6015 6016 /** 6017 * Image zoom in width and height with anti-aliasing. 6018 * 6019 * @param { number } x The zoom value of width. 6020 * @param { number } y The zoom value of height. 6021 * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. 6022 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6023 * 2.Incorrect parameter types. 3.Parameter verification failed. 6024 * @throws { BusinessError } 501 - Resource Unavailable. 6025 * @syscap SystemCapability.Multimedia.Image.Core 6026 * @crossplatform 6027 * @atomicservice 6028 * @since 12 6029 */ 6030 scaleSync(x: number, y: number, level: AntiAliasingLevel): void; 6031 6032 /** 6033 * Image position transformation. This method uses a callback to return the operation result. 6034 * 6035 * @param { number } x The position value of width. 6036 * @param { number } y The position value of height. 6037 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6038 * @syscap SystemCapability.Multimedia.Image.Core 6039 * @since 9 6040 */ 6041 /** 6042 * Image position transformation. This method uses a callback to return the operation result. 6043 * 6044 * @param { number } x The position value of width. 6045 * @param { number } y The position value of height. 6046 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6047 * @syscap SystemCapability.Multimedia.Image.Core 6048 * @crossplatform 6049 * @since 10 6050 */ 6051 /** 6052 * Image position transformation. This method uses a callback to return the operation result. 6053 * 6054 * @param { number } x The position value of width. 6055 * @param { number } y The position value of height. 6056 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6057 * @syscap SystemCapability.Multimedia.Image.Core 6058 * @crossplatform 6059 * @atomicservice 6060 * @since 11 6061 */ 6062 /** 6063 * Image position transformation. This method uses a callback to return the operation result. 6064 * 6065 * @param { number } x The position value of width. 6066 * @param { number } y The position value of height. 6067 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6068 * @syscap SystemCapability.Multimedia.Image.Core 6069 * @crossplatform 6070 * @form 6071 * @atomicservice 6072 * @since 12 6073 */ 6074 translate(x: number, y: number, callback: AsyncCallback<void>): void; 6075 6076 /** 6077 * Image position transformation. This method uses a promise to return the result. 6078 * 6079 * @param { number } x The position value of width. 6080 * @param { number } y The position value of height. 6081 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6082 * @syscap SystemCapability.Multimedia.Image.Core 6083 * @since 9 6084 */ 6085 /** 6086 * Image position transformation. This method uses a promise to return the result. 6087 * 6088 * @param { number } x The position value of width. 6089 * @param { number } y The position value of height. 6090 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6091 * @syscap SystemCapability.Multimedia.Image.Core 6092 * @crossplatform 6093 * @since 10 6094 */ 6095 /** 6096 * Image position transformation. This method uses a promise to return the result. 6097 * 6098 * @param { number } x The position value of width. 6099 * @param { number } y The position value of height. 6100 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6101 * @syscap SystemCapability.Multimedia.Image.Core 6102 * @crossplatform 6103 * @atomicservice 6104 * @since 11 6105 */ 6106 /** 6107 * Image position transformation. This method uses a promise to return the result. 6108 * 6109 * @param { number } x The position value of width. 6110 * @param { number } y The position value of height. 6111 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6112 * @syscap SystemCapability.Multimedia.Image.Core 6113 * @crossplatform 6114 * @form 6115 * @atomicservice 6116 * @since 12 6117 */ 6118 translate(x: number, y: number): Promise<void>; 6119 6120 /** 6121 * Image position transformation. 6122 * 6123 * @param { number } x The position value of width. 6124 * @param { number } y The position value of height. 6125 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6126 * 2.Incorrect parameter types. 3.Parameter verification failed. 6127 * @throws { BusinessError } 501 - Resource Unavailable. 6128 * @syscap SystemCapability.Multimedia.Image.Core 6129 * @crossplatform 6130 * @atomicservice 6131 * @since 12 6132 */ 6133 translateSync(x: number, y: number): void; 6134 6135 /** 6136 * Image rotation. This method uses a callback to return the operation result. 6137 * 6138 * @param { number } angle The rotation angle. 6139 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6140 * @syscap SystemCapability.Multimedia.Image.Core 6141 * @since 9 6142 */ 6143 /** 6144 * Image rotation. This method uses a callback to return the operation result. 6145 * 6146 * @param { number } angle The rotation angle. 6147 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6148 * @syscap SystemCapability.Multimedia.Image.Core 6149 * @crossplatform 6150 * @since 10 6151 */ 6152 /** 6153 * Image rotation. This method uses a callback to return the operation result. 6154 * 6155 * @param { number } angle The rotation angle. 6156 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6157 * @syscap SystemCapability.Multimedia.Image.Core 6158 * @crossplatform 6159 * @atomicservice 6160 * @since 11 6161 */ 6162 /** 6163 * Image rotation. This method uses a callback to return the operation result. 6164 * 6165 * @param { number } angle The rotation angle. 6166 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6167 * @syscap SystemCapability.Multimedia.Image.Core 6168 * @crossplatform 6169 * @form 6170 * @atomicservice 6171 * @since 12 6172 */ 6173 rotate(angle: number, callback: AsyncCallback<void>): void; 6174 6175 /** 6176 * Image rotation. This method uses a promise to return the result. 6177 * 6178 * @param { number } angle The rotation angle. 6179 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6180 * @syscap SystemCapability.Multimedia.Image.Core 6181 * @since 9 6182 */ 6183 /** 6184 * Image rotation. This method uses a promise to return the result. 6185 * 6186 * @param { number } angle The rotation angle. 6187 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6188 * @syscap SystemCapability.Multimedia.Image.Core 6189 * @crossplatform 6190 * @since 10 6191 */ 6192 /** 6193 * Image rotation. This method uses a promise to return the result. 6194 * 6195 * @param { number } angle The rotation angle. 6196 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6197 * @syscap SystemCapability.Multimedia.Image.Core 6198 * @crossplatform 6199 * @atomicservice 6200 * @since 11 6201 */ 6202 /** 6203 * Image rotation. This method uses a promise to return the result. 6204 * 6205 * @param { number } angle The rotation angle. 6206 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6207 * @syscap SystemCapability.Multimedia.Image.Core 6208 * @crossplatform 6209 * @form 6210 * @atomicservice 6211 * @since 12 6212 */ 6213 rotate(angle: number): Promise<void>; 6214 6215 /** 6216 * Image rotation. 6217 * 6218 * @param { number } angle The rotation angle. 6219 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6220 * 2.Incorrect parameter types. 3.Parameter verification failed. 6221 * @throws { BusinessError } 501 - Resource Unavailable. 6222 * @syscap SystemCapability.Multimedia.Image.Core 6223 * @crossplatform 6224 * @atomicservice 6225 * @since 12 6226 */ 6227 rotateSync(angle: number): void; 6228 6229 /** 6230 * Image flipping. This method uses a callback to return the operation result. 6231 * 6232 * @param { boolean } horizontal Is flip in horizontal. 6233 * @param { boolean } vertical Is flip in vertical. 6234 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6235 * @syscap SystemCapability.Multimedia.Image.Core 6236 * @since 9 6237 */ 6238 /** 6239 * Image flipping. This method uses a callback to return the operation result. 6240 * 6241 * @param { boolean } horizontal Is flip in horizontal. 6242 * @param { boolean } vertical Is flip in vertical. 6243 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6244 * @syscap SystemCapability.Multimedia.Image.Core 6245 * @crossplatform 6246 * @since 10 6247 */ 6248 /** 6249 * Image flipping. This method uses a callback to return the operation result. 6250 * 6251 * @param { boolean } horizontal Is flip in horizontal. 6252 * @param { boolean } vertical Is flip in vertical. 6253 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6254 * @syscap SystemCapability.Multimedia.Image.Core 6255 * @crossplatform 6256 * @atomicservice 6257 * @since 11 6258 */ 6259 /** 6260 * Image flipping. This method uses a callback to return the operation result. 6261 * 6262 * @param { boolean } horizontal Is flip in horizontal. 6263 * @param { boolean } vertical Is flip in vertical. 6264 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6265 * @syscap SystemCapability.Multimedia.Image.Core 6266 * @crossplatform 6267 * @form 6268 * @atomicservice 6269 * @since 12 6270 */ 6271 flip(horizontal: boolean, vertical: boolean, callback: AsyncCallback<void>): void; 6272 6273 /** 6274 * Image flipping. This method uses a promise to return the result. 6275 * 6276 * @param { boolean } horizontal Is flip in horizontal. 6277 * @param { boolean } vertical Is flip in vertical. 6278 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6279 * @syscap SystemCapability.Multimedia.Image.Core 6280 * @since 9 6281 */ 6282 /** 6283 * Image flipping. This method uses a promise to return the result. 6284 * 6285 * @param { boolean } horizontal Is flip in horizontal. 6286 * @param { boolean } vertical Is flip in vertical. 6287 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6288 * @syscap SystemCapability.Multimedia.Image.Core 6289 * @crossplatform 6290 * @since 10 6291 */ 6292 /** 6293 * Image flipping. This method uses a promise to return the result. 6294 * 6295 * @param { boolean } horizontal Is flip in horizontal. 6296 * @param { boolean } vertical Is flip in vertical. 6297 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6298 * @syscap SystemCapability.Multimedia.Image.Core 6299 * @crossplatform 6300 * @atomicservice 6301 * @since 11 6302 */ 6303 /** 6304 * Image flipping. This method uses a promise to return the result. 6305 * 6306 * @param { boolean } horizontal Is flip in horizontal. 6307 * @param { boolean } vertical Is flip in vertical. 6308 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6309 * @syscap SystemCapability.Multimedia.Image.Core 6310 * @crossplatform 6311 * @form 6312 * @atomicservice 6313 * @since 12 6314 */ 6315 flip(horizontal: boolean, vertical: boolean): Promise<void>; 6316 6317 /** 6318 * Image flipping. 6319 * 6320 * @param { boolean } horizontal Is flip in horizontal. 6321 * @param { boolean } vertical Is flip in vertical. 6322 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6323 * 2.Incorrect parameter types. 3.Parameter verification failed. 6324 * @throws { BusinessError } 501 - Resource Unavailable. 6325 * @syscap SystemCapability.Multimedia.Image.Core 6326 * @crossplatform 6327 * @atomicservice 6328 * @since 12 6329 */ 6330 flipSync(horizontal: boolean, vertical: boolean): void; 6331 6332 /** 6333 * Crop the image. This method uses a callback to return the operation result. 6334 * 6335 * @param { Region } region The region to crop. 6336 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6337 * @syscap SystemCapability.Multimedia.Image.Core 6338 * @since 9 6339 */ 6340 /** 6341 * Crop the image. This method uses a callback to return the operation result. 6342 * 6343 * @param { Region } region The region to crop. 6344 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6345 * @syscap SystemCapability.Multimedia.Image.Core 6346 * @crossplatform 6347 * @since 10 6348 */ 6349 /** 6350 * Crop the image. This method uses a callback to return the operation result. 6351 * 6352 * @param { Region } region The region to crop. 6353 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6354 * @syscap SystemCapability.Multimedia.Image.Core 6355 * @crossplatform 6356 * @atomicservice 6357 * @since 11 6358 */ 6359 /** 6360 * Crop the image. This method uses a callback to return the operation result. 6361 * 6362 * @param { Region } region The region to crop. 6363 * @param { AsyncCallback<void> } callback Callback used to return the operation result. If the operation fails, an error message is returned. 6364 * @syscap SystemCapability.Multimedia.Image.Core 6365 * @crossplatform 6366 * @form 6367 * @atomicservice 6368 * @since 12 6369 */ 6370 crop(region: Region, callback: AsyncCallback<void>): void; 6371 6372 /** 6373 * Crop the image. This method uses a promise to return the result. 6374 * 6375 * @param { Region } region The region to crop. 6376 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6377 * @syscap SystemCapability.Multimedia.Image.Core 6378 * @since 9 6379 */ 6380 /** 6381 * Crop the image. This method uses a promise to return the result. 6382 * 6383 * @param { Region } region The region to crop. 6384 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6385 * @syscap SystemCapability.Multimedia.Image.Core 6386 * @crossplatform 6387 * @since 10 6388 */ 6389 /** 6390 * Crop the image. This method uses a promise to return the result. 6391 * 6392 * @param { Region } region The region to crop. 6393 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6394 * @syscap SystemCapability.Multimedia.Image.Core 6395 * @crossplatform 6396 * @atomicservice 6397 * @since 11 6398 */ 6399 /** 6400 * Crop the image. This method uses a promise to return the result. 6401 * 6402 * @param { Region } region The region to crop. 6403 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6404 * @syscap SystemCapability.Multimedia.Image.Core 6405 * @crossplatform 6406 * @form 6407 * @atomicservice 6408 * @since 12 6409 */ 6410 crop(region: Region): Promise<void>; 6411 6412 /** 6413 * Crop the image. 6414 * 6415 * @param { Region } region The region to crop. 6416 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6417 * 2.Incorrect parameter types. 3.Parameter verification failed. 6418 * @throws { BusinessError } 501 - Resource Unavailable. 6419 * @syscap SystemCapability.Multimedia.Image.Core 6420 * @crossplatform 6421 * @atomicservice 6422 * @since 12 6423 */ 6424 cropSync(region: Region): void; 6425 6426 /** 6427 * Get color space of pixel map. 6428 * 6429 * @returns { colorSpaceManager.ColorSpaceManager } If the operation fails, an error message is returned. 6430 * @throws { BusinessError } 62980101 - The image data is abnormal. 6431 * @throws { BusinessError } 62980103 - The image data is not supported. 6432 * @throws { BusinessError } 62980115 - Invalid image parameter. 6433 * @syscap SystemCapability.Multimedia.Image.Core 6434 * @since 10 6435 */ 6436 /** 6437 * Get color space of pixel map. 6438 * 6439 * @returns { colorSpaceManager.ColorSpaceManager } If the operation fails, an error message is returned. 6440 * @throws { BusinessError } 62980101 - If the image data abnormal. 6441 * @throws { BusinessError } 62980103 - If the image data unsupport. 6442 * @throws { BusinessError } 62980115 - If the image parameter invalid. 6443 * @syscap SystemCapability.Multimedia.Image.Core 6444 * @crossplatform 6445 * @since 11 6446 */ 6447 getColorSpace(): colorSpaceManager.ColorSpaceManager; 6448 6449 /** 6450 * Marshalling pixelmap and write into MessageSequence. 6451 * 6452 * @param { rpc.MessageSequence } sequence rpc.MessageSequence parameter. 6453 * @throws { BusinessError } 62980115 - Invalid image parameter. 6454 * @throws { BusinessError } 62980097 - IPC error. 6455 * @syscap SystemCapability.Multimedia.Image.Core 6456 * @since 10 6457 */ 6458 marshalling(sequence: rpc.MessageSequence): void; 6459 6460 /** 6461 * Creates a PixelMap object based on MessageSequence parameter. 6462 * 6463 * @param { rpc.MessageSequence } sequence rpc.MessageSequence parameter. 6464 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 6465 * @throws { BusinessError } 62980115 - Invalid image parameter. 6466 * @throws { BusinessError } 62980097 - IPC error. 6467 * @throws { BusinessError } 62980096 - The operation failed. 6468 * @syscap SystemCapability.Multimedia.Image.Core 6469 * @since 10 6470 */ 6471 unmarshalling(sequence: rpc.MessageSequence): Promise<PixelMap>; 6472 6473 /** 6474 * Set color space of pixel map. 6475 * 6476 * This method is only used to set the colorspace property of pixelmap, while all pixel data remains the same after calling this method. 6477 * If you want to change colorspace for all pixels, use method {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager)} or 6478 * {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager, AsyncCallback<void>)}. 6479 * 6480 * @param { colorSpaceManager.ColorSpaceManager } colorSpace The color space for pixel map. 6481 * @throws { BusinessError } 62980111 - The image source data is incomplete. 6482 * @throws { BusinessError } 62980115 - Invalid image parameter. 6483 * @syscap SystemCapability.Multimedia.Image.Core 6484 * @since 10 6485 */ 6486 /** 6487 * Set color space of pixel map. 6488 * 6489 * This method is only used to set the colorspace property of pixelmap, while all pixel data remains the same after calling this method. 6490 * If you want to change colorspace for all pixels, use method {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager)} or 6491 * {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager, AsyncCallback<void>)}. 6492 * 6493 * @param { colorSpaceManager.ColorSpaceManager } colorSpace The color space for pixel map. 6494 * @throws { BusinessError } 62980111 - If the operation invalid. 6495 * @throws { BusinessError } 62980115 - If the image parameter invalid. 6496 * @syscap SystemCapability.Multimedia.Image.Core 6497 * @crossplatform 6498 * @since 11 6499 */ 6500 /** 6501 * Set color space of pixel map. 6502 * 6503 * This method is only used to set the colorspace property of pixelmap, while all pixel data remains the same after calling this method. 6504 * If you want to change colorspace for all pixels, use method {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager)} or 6505 * {@Link #applyColorSpace(colorSpaceManager.ColorSpaceManager, AsyncCallback<void>)}. 6506 * 6507 * @param { colorSpaceManager.ColorSpaceManager } colorSpace The color space for pixel map. 6508 * @throws { BusinessError } 62980111 - The image source data is incomplete. 6509 * @throws { BusinessError } 62980115 - If the image parameter invalid. 6510 * @syscap SystemCapability.Multimedia.Image.Core 6511 * @crossplatform 6512 * @since 12 6513 */ 6514 setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void; 6515 6516 /** 6517 * Is it stride Alignment 6518 * 6519 * @type { boolean } 6520 * @readonly 6521 * @syscap SystemCapability.Multimedia.Image.Core 6522 * @since 11 6523 */ 6524 readonly isStrideAlignment: boolean; 6525 6526 /** 6527 * Apply color space of pixel map, the pixels will be changed by input color space. This method uses a callback to return the operation result. 6528 * 6529 * This method is used to change color space of pixelmap. Pixel data will be changed by calling this method. 6530 * If you want to set the colorspace property of pixelmap only, use method {@Link #setColorSpace(colorSpaceManager.ColorSpaceManager)}. 6531 * 6532 * @param { colorSpaceManager.ColorSpaceManager } targetColorSpace - The color space for pixel map. 6533 * @param { AsyncCallback<void> } callback - Callback used to return the operation result. If the operation fails, an error message is returned. 6534 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6535 * 2.Incorrect parameter types. 3.Parameter verification failed. 6536 * @throws { BusinessError } 62980104 - Failed to initialize the internal object. 6537 * @throws { BusinessError } 62980108 - Failed to convert the color space. 6538 * @throws { BusinessError } 62980115 - Invalid image parameter. 6539 * @syscap SystemCapability.Multimedia.Image.Core 6540 * @crossplatform 6541 * @since 11 6542 */ 6543 applyColorSpace(targetColorSpace: colorSpaceManager.ColorSpaceManager, callback: AsyncCallback<void>): void; 6544 6545 /** 6546 * Apply color space of pixel map, the pixels will be changed by input color space. This method uses a promise to return the result. 6547 * 6548 * This method is used to change color space of pixelmap. Pixel data will be changed by calling this method. 6549 * If you want to set the colorspace property of pixelmap only, use method {@Link #setColorSpace(colorSpaceManager.ColorSpaceManager)}. 6550 * 6551 * @param { colorSpaceManager.ColorSpaceManager } targetColorSpace - The color space for pixel map. 6552 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6553 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6554 * 2.Incorrect parameter types. 3.Parameter verification failed. 6555 * @throws { BusinessError } 62980104 - Failed to initialize the internal object. 6556 * @throws { BusinessError } 62980108 - Failed to convert the color space. 6557 * @throws { BusinessError } 62980115 - Invalid image parameter. 6558 * @syscap SystemCapability.Multimedia.Image.Core 6559 * @crossplatform 6560 * @since 11 6561 */ 6562 applyColorSpace(targetColorSpace: colorSpaceManager.ColorSpaceManager): Promise<void>; 6563 6564 /** 6565 * The method is used for the transformation of the image formats. Pixel data will be changed by calling this method. 6566 * 6567 * @param { PixelMapFormat } targetPixelFormat - The pixel format for pixelmap conversion. 6568 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an error message is returned. 6569 * @throws { BusinessError } 62980115 - Invalid input parameter. 6570 * @throws { BusinessError } 62980111 - The image source data is incomplete. 6571 * @throws { BusinessError } 62980274 - The conversion failed. 6572 * @throws { BusinessError } 62980276 - The type to be converted is an unsupported target pixel format. 6573 * @throws { BusinessError } 62980178 - Failed to create the pixelmap. 6574 * @syscap SystemCapability.Multimedia.Image.Core 6575 * @since 12 6576 */ 6577 convertPixelFormat(targetPixelFormat: PixelMapFormat): Promise<void>; 6578 6579 /** 6580 * Releases this PixelMap object. This method uses a callback to return the result. 6581 * 6582 * @param { AsyncCallback<void> } callback Callback invoked for instance release. If the operation fails, an error message is returned. 6583 * @syscap SystemCapability.Multimedia.Image.Core 6584 * @since 7 6585 */ 6586 /** 6587 * Releases this PixelMap object. This method uses a callback to return the result. 6588 * 6589 * @param { AsyncCallback<void> } callback Callback invoked for instance release. If the operation fails, an error message is returned. 6590 * @syscap SystemCapability.Multimedia.Image.Core 6591 * @crossplatform 6592 * @since 10 6593 */ 6594 /** 6595 * Releases this PixelMap object. This method uses a callback to return the result. 6596 * 6597 * @param { AsyncCallback<void> } callback Callback invoked for instance release. If the operation fails, an error message is returned. 6598 * @syscap SystemCapability.Multimedia.Image.Core 6599 * @crossplatform 6600 * @atomicservice 6601 * @since 11 6602 */ 6603 /** 6604 * Releases this PixelMap object. This method uses a callback to return the result. 6605 * 6606 * @param { AsyncCallback<void> } callback Callback invoked for instance release. If the operation fails, an error message is returned. 6607 * @syscap SystemCapability.Multimedia.Image.Core 6608 * @crossplatform 6609 * @form 6610 * @atomicservice 6611 * @since 12 6612 */ 6613 release(callback: AsyncCallback<void>): void; 6614 6615 /** 6616 * Releases this PixelMap object. This method uses a promise to return the result. 6617 * 6618 * @returns { Promise<void> } A Promise instance used to return the instance release result. If the operation fails, an error message is returned. 6619 * @syscap SystemCapability.Multimedia.Image.Core 6620 * @since 7 6621 */ 6622 /** 6623 * Releases this PixelMap object. This method uses a promise to return the result. 6624 * 6625 * @returns { Promise<void> } A Promise instance used to return the instance release result. If the operation fails, an error message is returned. 6626 * @syscap SystemCapability.Multimedia.Image.Core 6627 * @crossplatform 6628 * @since 10 6629 */ 6630 /** 6631 * Releases this PixelMap object. This method uses a promise to return the result. 6632 * 6633 * @returns { Promise<void> } A Promise instance used to return the instance release result. If the operation fails, an error message is returned. 6634 * @syscap SystemCapability.Multimedia.Image.Core 6635 * @crossplatform 6636 * @atomicservice 6637 * @since 11 6638 */ 6639 /** 6640 * Releases this PixelMap object. This method uses a promise to return the result. 6641 * 6642 * @returns { Promise<void> } A Promise instance used to return the instance release result. If the operation fails, an error message is returned. 6643 * @syscap SystemCapability.Multimedia.Image.Core 6644 * @crossplatform 6645 * @form 6646 * @atomicservice 6647 * @since 12 6648 */ 6649 release(): Promise<void>; 6650 6651 /** 6652 * Enables the PixelMap object to be transferred across threads and detaches the reference from the current 6653 * thread upon transfer. 6654 * 6655 * @param { boolean } detached A boolean value indicating whether to enable or disable the transfer and 6656 * detachment feature. 6657 * @throws { BusinessError } 501 - Resource Unavailable. 6658 * @syscap SystemCapability.Multimedia.Image.Core 6659 * @since 12 6660 */ 6661 setTransferDetached(detached: boolean): void; 6662 6663 /** 6664 * Get metadata. 6665 * 6666 * @param { HdrMetadataKey } key Type of metadata. 6667 * @returns { HdrMetadataValue } Returns the value of metadata. 6668 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6669 * 2.Incorrect parameter types. 3.Parameter verification failed. 6670 * @throws { BusinessError } 501 - Resource unavailable. 6671 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 6672 * @throws { BusinessError } 62980302 - Memory copy failed. 6673 * @syscap SystemCapability.Multimedia.Image.Core 6674 * @since 12 6675 */ 6676 getMetadata(key: HdrMetadataKey): HdrMetadataValue; 6677 6678 /** 6679 * Set pixelmap memory name. 6680 * 6681 * @param { string } name The name of the memory that needs to be set 6682 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.The length of the input parameter is too long. 6683 * 2.Parameter verification failed. 6684 * @throws { BusinessError } 501 - Resource unavailable. 6685 * @throws { BusinessError } 62980286 - Memory format not supported. 6686 * @syscap SystemCapability.Multimedia.Image.Core 6687 * @since 13 6688 */ 6689 setMemoryNameSync(name: string): void; 6690 6691 /** 6692 * Set metadata. 6693 * 6694 * @param { HdrMetadataKey } key Type of metadata. 6695 * @param { HdrMetadataValue } value Value of metadata. 6696 * @returns { Promise<void> } A Promise instance used to return the instance release result. If the operation fails, 6697 * an error message is returned. 6698 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6699 * 2.Incorrect parameter types. 3.Parameter verification failed. 6700 * @throws { BusinessError } 501 - Resource unavailable. 6701 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 6702 * @throws { BusinessError } 62980302 - Memory copy failed. 6703 * @syscap SystemCapability.Multimedia.Image.Core 6704 * @since 12 6705 */ 6706 setMetadata(key: HdrMetadataKey, value: HdrMetadataValue): Promise<void>; 6707 } 6708 6709 /** 6710 * Picture instance. 6711 * 6712 * @typedef Picture 6713 * @syscap SystemCapability.Multimedia.Image.Core 6714 * @since 13 6715 */ 6716 interface Picture { 6717 /** 6718 * Obtains the pixel map of the main image. 6719 * 6720 * @returns { PixelMap } Returns the pixel map. 6721 * @syscap SystemCapability.Multimedia.Image.Core 6722 * @since 13 6723 */ 6724 getMainPixelmap(): PixelMap; 6725 6726 /** 6727 * Obtains the hdr pixel map. This method uses a promise to return the PixelMap object. 6728 * 6729 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 6730 * @throws { BusinessError } 7600901 - Unknown error. 6731 * @throws { BusinessError } 7600201 - Unsupported operation. 6732 * @syscap SystemCapability.Multimedia.Image.Core 6733 * @since 13 6734 */ 6735 getHdrComposedPixelmap(): Promise<PixelMap>; 6736 6737 /** 6738 * Obtains the gain map pixel map. 6739 * @returns { PixelMap | null } Returns the pixel map if the operation is successful; returns null otherwise. 6740 * @syscap SystemCapability.Multimedia.Image.Core 6741 * @since 13 6742 */ 6743 getGainmapPixelmap(): PixelMap | null; 6744 6745 /** 6746 * Set auxiliary picture. 6747 * 6748 * @param { AuxiliaryPictureType } type The type of auxiliary picture. 6749 * @param { AuxiliaryPicture } auxiliaryPicture AuxiliaryPicture object. 6750 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6751 * 2.Incorrect parameter types. 3.Parameter verification failed. 6752 * @syscap SystemCapability.Multimedia.Image.Core 6753 * @since 13 6754 */ 6755 setAuxiliaryPicture(type: AuxiliaryPictureType, auxiliaryPicture: AuxiliaryPicture): void; 6756 6757 /** 6758 * Obtains the auxiliary picture based on type. 6759 * 6760 * @param { AuxiliaryPictureType } type The type of auxiliary picture. 6761 * @returns { AuxiliaryPicture | null } Returns the auxiliary picture object. 6762 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6763 * 2.Incorrect parameter types. 3.Parameter verification failed. 6764 * @syscap SystemCapability.Multimedia.Image.Core 6765 * @since 13 6766 */ 6767 getAuxiliaryPicture(type: AuxiliaryPictureType): AuxiliaryPicture | null; 6768 6769 /** 6770 * Set the metadata of main picture. 6771 * 6772 * @param { MetadataType } metadataType The type of metadata. 6773 * @param { Metadata } metadata The metadata of main picture. 6774 * @returns { Promise<void> } A Promise instance used to return the operation result. 6775 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6776 * 2.Incorrect parameter types. 3.Parameter verification failed. 6777 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: Unsupported metadata type. 6778 * @syscap SystemCapability.Multimedia.Image.Core 6779 * @since 13 6780 */ 6781 setMetadata(metadataType: MetadataType, metadata: Metadata): Promise<void> 6782 6783 /** 6784 * Obtains the metadata of main picture. 6785 * 6786 * @param { MetadataType } metadataType The type of metadata. 6787 * @returns { Promise<Metadata> } Return the metadata of main picture. 6788 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6789 * 2.Incorrect parameter types. 3.Parameter verification failed. 6790 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: Unsupported metadata type. 6791 * @syscap SystemCapability.Multimedia.Image.Core 6792 * @since 13 6793 */ 6794 getMetadata(metadataType: MetadataType): Promise<Metadata> 6795 6796 /** 6797 * Marshalling picture and write into MessageSequence. 6798 * 6799 * @param { rpc.MessageSequence } sequence rpc.MessageSequence parameter. 6800 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6801 * 2.Incorrect parameter types; 3.Parameter verification failed. 6802 * @throws { BusinessError } 62980097 - IPC error. 6803 * @syscap SystemCapability.Multimedia.Image.Core 6804 * @since 13 6805 */ 6806 marshalling(sequence: rpc.MessageSequence): void 6807 6808 /** 6809 * Releases this Picture object. 6810 * @syscap SystemCapability.Multimedia.Image.Core 6811 * @since 13 6812 */ 6813 release(): void 6814 } 6815 6816 /** 6817 * Create a Picture object by the pixel map of the main image. 6818 * 6819 * @param { PixelMap } mainPixelmap The pixel map of the main image. 6820 * @returns { Picture } Returns the Picture object. 6821 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 6822 * 2.Incorrect parameter types; 3.Parameter verification failed. 6823 * @syscap SystemCapability.Multimedia.Image.Core 6824 * @since 13 6825 */ 6826 function createPicture(mainPixelmap : PixelMap): Picture; 6827 6828 /** 6829 * Creates a Picture object based on MessageSequence parameter. 6830 * 6831 * @param { rpc.MessageSequence } sequence - rpc.MessageSequence parameter. 6832 * @returns { Picture } Returns the Picture object. 6833 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 6834 * 2.Incorrect parameter types; 3.Parameter verification failed. 6835 * @throws { BusinessError } 62980097 - IPC error. 6836 * @syscap SystemCapability.Multimedia.Image.Core 6837 * @since 13 6838 */ 6839 function createPictureFromParcel(sequence: rpc.MessageSequence): Picture; 6840 6841 /** 6842 * Create a AuxiliaryPicture object by data buffer. 6843 * 6844 * @param { ArrayBuffer } buffer The image data buffer. 6845 * @param { Size } size The size of auxiliary picture. 6846 * @param { AuxiliaryPictureType } type The type of auxiliary picture. 6847 * @returns { AuxiliaryPicture } The AuxiliaryPicture object. 6848 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 6849 * 2.Incorrect parameter types; 3.Parameter verification failed. 6850 * @syscap SystemCapability.Multimedia.Image.Core 6851 * @since 13 6852 */ 6853 function createAuxiliaryPicture(buffer: ArrayBuffer, size: Size, type: AuxiliaryPictureType): AuxiliaryPicture; 6854 6855 /** 6856 * AuxiliaryPicture instance. 6857 * 6858 * @typedef AuxiliaryPicture 6859 * @syscap SystemCapability.Multimedia.Image.Core 6860 * @since 13 6861 */ 6862 interface AuxiliaryPicture { 6863 /** 6864 * Reads auxiliary picture data in an ArrayBuffer and writes the data to a AuxiliaryPicture object. This method 6865 * uses a promise to return the result. 6866 * 6867 * @param { ArrayBuffer } data A buffer from which the auxiliary picture data will be read. 6868 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an 6869 * error message is returned. 6870 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 6871 * 2.Incorrect parameter types. 3.Parameter verification failed. 6872 * @throws { BusinessError } 7600301 - Memory alloc failed. 6873 * @throws { BusinessError } 7600302 - Memory copy failed. 6874 * @syscap SystemCapability.Multimedia.Image.Core 6875 * @since 13 6876 */ 6877 writePixelsFromBuffer(data: ArrayBuffer): Promise<void>; 6878 6879 /** 6880 * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses 6881 * a promise to return the result. 6882 * 6883 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the pixel map data. 6884 * @throws { BusinessError } 7600301 - Memory alloc failed. 6885 * @throws { BusinessError } 7600302 - Memory copy failed. 6886 * @syscap SystemCapability.Multimedia.Image.Core 6887 * @since 13 6888 */ 6889 readPixelsToBuffer(): Promise<ArrayBuffer>; 6890 6891 /** 6892 * Obtains the type of auxiliary picture. 6893 * 6894 * @returns { AuxiliaryPictureType } Returns the type of auxiliary picture. 6895 * @syscap SystemCapability.Multimedia.Image.Core 6896 * @since 13 6897 */ 6898 getType(): AuxiliaryPictureType; 6899 6900 /** 6901 * Set the metadata of auxiliary picture. 6902 * 6903 * @param { MetadataType } metadataType The type of metadata. 6904 * @param { Metadata } metadata The metadata of auxiliary picture. 6905 * @returns { Promise<void> } A Promise instance used to return the operation result. 6906 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6907 * 2.Incorrect parameter types. 3.Parameter verification failed. 6908 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The 6909 * metadata type does not match the auxiliary picture type. 6910 * @syscap SystemCapability.Multimedia.Image.Core 6911 * @since 13 6912 */ 6913 setMetadata(metadataType: MetadataType, metadata: Metadata): Promise<void> 6914 6915 /** 6916 * Obtains the metadata of auxiliary picture. 6917 * 6918 * @param { MetadataType } metadataType The type of metadata. 6919 * @returns { Promise<Metadata> } Return the metadata of auxiliary picture. 6920 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 6921 * 2.Incorrect parameter types. 3.Parameter verification failed. 6922 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The 6923 * metadata type does not match the auxiliary picture type. 6924 * @syscap SystemCapability.Multimedia.Image.Core 6925 * @since 13 6926 */ 6927 getMetadata(metadataType: MetadataType): Promise<Metadata> 6928 6929 /** 6930 * Obtains the information about this auxiliary picture. 6931 * 6932 * @returns { AuxiliaryPictureInfo } Returns the auxiliary picture information. If the operation fails, an error 6933 * message is returned. 6934 * @syscap SystemCapability.Multimedia.Image.Core 6935 * @since 13 6936 */ 6937 getAuxiliaryPictureInfo(): AuxiliaryPictureInfo; 6938 6939 /** 6940 * Set the information about this auxiliary picture. 6941 * 6942 * @param { AuxiliaryPictureInfo } info the auxiliary picture information. 6943 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 6944 * 2.Incorrect parameter types. 3.Parameter verification failed. 6945 * @syscap SystemCapability.Multimedia.Image.Core 6946 * @since 13 6947 */ 6948 setAuxiliaryPictureInfo(info: AuxiliaryPictureInfo): void 6949 6950 /** 6951 * Releases this AuxiliaryPicture object. 6952 * @syscap SystemCapability.Multimedia.Image.Core 6953 * @since 13 6954 */ 6955 release():void 6956 } 6957 6958 /** 6959 * Enumerates auxiliary picture type. 6960 * 6961 * @enum { number } 6962 * @syscap SystemCapability.Multimedia.Image.Core 6963 * @since 13 6964 */ 6965 enum AuxiliaryPictureType { 6966 /** 6967 * Gain map. 6968 * 6969 * @syscap SystemCapability.Multimedia.Image.Core 6970 * @since 13 6971 */ 6972 GAINMAP = 1, 6973 6974 /** 6975 * Depth map. 6976 * 6977 * @syscap SystemCapability.Multimedia.Image.Core 6978 * @since 13 6979 */ 6980 DEPTH_MAP = 2, 6981 6982 /** 6983 * Unrefocus map. 6984 * 6985 * @syscap SystemCapability.Multimedia.Image.Core 6986 * @since 13 6987 */ 6988 UNREFOCUS_MAP = 3, 6989 6990 /** 6991 * Linear map. 6992 * 6993 * @syscap SystemCapability.Multimedia.Image.Core 6994 * @since 13 6995 */ 6996 LINEAR_MAP = 4, 6997 6998 /** 6999 * Fragment map. 7000 * 7001 * @syscap SystemCapability.Multimedia.Image.Core 7002 * @since 13 7003 */ 7004 FRAGMENT_MAP = 5, 7005 } 7006 7007 /** 7008 * Enumerates metadata type. 7009 * 7010 * @enum { number } 7011 * @syscap SystemCapability.Multimedia.Image.Core 7012 * @since 13 7013 */ 7014 enum MetadataType { 7015 /** 7016 * EXIF metadata. 7017 * 7018 * @syscap SystemCapability.Multimedia.Image.Core 7019 * @since 13 7020 */ 7021 EXIF_METADATA = 1, 7022 7023 /** 7024 * Fragment metadata. 7025 * 7026 * @syscap SystemCapability.Multimedia.Image.Core 7027 * @since 13 7028 */ 7029 FRAGMENT_METADATA = 2, 7030 } 7031 7032 /** 7033 * Metadata instance. 7034 * 7035 * @typedef Metadata 7036 * @syscap SystemCapability.Multimedia.Image.Core 7037 * @since 13 7038 */ 7039 interface Metadata { 7040 /** 7041 * Obtains the value of properties in an image. This method uses a promise to return the property values in array 7042 * of records. 7043 * 7044 * @param { Array<string> } key Name of the properties whose value is to be obtained. 7045 * @returns { Promise<Record<string, string | null>> } Array of Records instance used to return the property values. 7046 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 7047 * 2.Incorrect parameter types. 3.Parameter verification failed. 7048 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The 7049 * metadata type does not match the auxiliary picture type. 7050 * @syscap SystemCapability.Multimedia.Image.Core 7051 * @since 13 7052 */ 7053 getProperties(key: Array<string>): Promise<Record<string, string | null>> 7054 7055 /** 7056 * Modify the value of properties in an image with the specified keys. 7057 * 7058 * @param { Record<string, string | null> } records Array of the property Records whose values are to 7059 * be modified. 7060 * @returns { Promise<void> } A Promise instance used to return the operation result. 7061 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 7062 * 2.Incorrect parameter types. 3.Parameter verification failed. 7063 * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The 7064 * metadata type does not match the auxiliary picture type. 7065 * @syscap SystemCapability.Multimedia.Image.Core 7066 * @since 13 7067 */ 7068 setProperties(records: Record<string, string | null>): Promise<void> 7069 7070 /** 7071 * Obtains the value of all properties in an image. This method uses a promise to return the property values 7072 * in array of records. 7073 * 7074 * @returns { Promise<Record<string, string | null>> } Array of Records instance used to return the property values. 7075 * @syscap SystemCapability.Multimedia.Image.Core 7076 * @since 13 7077 */ 7078 getAllProperties(): Promise<Record<string, string | null>> 7079 7080 /** 7081 * Obtains a clone of metadata. This method uses a promise to return the metadata. 7082 * 7083 * @returns { Promise<Metadata> } A Promise instance used to return the metadata. 7084 * @throws { BusinessError } 7600301 - Memory alloc failed. 7085 * @throws { BusinessError } 7600302 - Memory copy failed. 7086 * @syscap SystemCapability.Multimedia.Image.Core 7087 * @since 13 7088 */ 7089 clone(): Promise<Metadata> 7090 } 7091 7092 /** 7093 * Enumerates fragment map information types of an image. 7094 * 7095 * @enum { string } 7096 * @syscap SystemCapability.Multimedia.Image.Core 7097 * @since 13 7098 */ 7099 enum FragmentMapPropertyKey { 7100 /** 7101 * The x-coordinate of the top left corner of the mark cup map in the original image. 7102 * 7103 * @syscap SystemCapability.Multimedia.Image.Core 7104 * @since 13 7105 */ 7106 X_IN_ORIGINAL = 'XInOriginal', 7107 7108 /** 7109 * The y-coordinate of the top left corner of the mark cup map in the original image. 7110 * 7111 * @syscap SystemCapability.Multimedia.Image.Core 7112 * @since 13 7113 */ 7114 Y_IN_ORIGINAL = 'YInOriginal', 7115 7116 /** 7117 * Mark cut map width. 7118 * 7119 * @syscap SystemCapability.Multimedia.Image.Core 7120 * @since 13 7121 */ 7122 WIDTH = 'FragmentImageWidth', 7123 7124 /** 7125 * Mark cut map width. 7126 * 7127 * @syscap SystemCapability.Multimedia.Image.Core 7128 * @since 13 7129 */ 7130 HEIGHT = 'FragmentImageHeight' 7131 } 7132 7133 /** 7134 * Describes image decoding parameters. 7135 * 7136 * @typedef DecodingOptionsForPicture 7137 * @syscap SystemCapability.Multimedia.Image.ImageSource 7138 * @since 13 7139 */ 7140 interface DecodingOptionsForPicture { 7141 /** 7142 * Expected set of auxiliary picture types, default to decoding all auxiliary pictures. 7143 * 7144 * @type { Array<AuxiliaryPictureType> } 7145 * @syscap SystemCapability.Multimedia.Image.Core 7146 * @since 13 7147 */ 7148 desiredAuxiliaryPictures: Array<AuxiliaryPictureType>; 7149 } 7150 7151 /** 7152 * Describes auxiliary picture information. 7153 * 7154 * @typedef AuxiliaryPictureInfo 7155 * @syscap SystemCapability.Multimedia.Image.Core 7156 * @since 13 7157 */ 7158 interface AuxiliaryPictureInfo { 7159 /** 7160 * Indicates auxiliary picture type. 7161 * 7162 * @type { AuxiliaryPictureType } 7163 * @syscap SystemCapability.Multimedia.Image.Core 7164 * @since 13 7165 */ 7166 auxiliaryPictureType: AuxiliaryPictureType; 7167 7168 /** 7169 * Indicates image dimensions specified by a {@link Size} interface. 7170 * 7171 * @type { Size } 7172 * @syscap SystemCapability.Multimedia.Image.Core 7173 * @since 13 7174 */ 7175 size: Size; 7176 7177 /** 7178 * The number of byte per row. 7179 * 7180 * @type { number } 7181 * @syscap SystemCapability.Multimedia.Image.Core 7182 * @since 13 7183 */ 7184 rowStride: number; 7185 7186 /** 7187 * Indicates image format. 7188 * 7189 * @type { PixelMapFormat } 7190 * @syscap SystemCapability.Multimedia.Image.Core 7191 * @since 13 7192 */ 7193 pixelFormat: PixelMapFormat; 7194 7195 /** 7196 * Indicates color space for pixel map. 7197 * 7198 * @type { colorSpaceManager.ColorSpaceManager } 7199 * @syscap SystemCapability.Multimedia.Image.Core 7200 * @since 13 7201 */ 7202 colorSpace: colorSpaceManager.ColorSpaceManager; 7203 } 7204 7205 /** 7206 * ImageSource instance. 7207 * 7208 * @typedef ImageSource 7209 * @syscap SystemCapability.Multimedia.Image.ImageSource 7210 * @since 6 7211 */ 7212 /** 7213 * ImageSource instance. 7214 * 7215 * @typedef ImageSource 7216 * @syscap SystemCapability.Multimedia.Image.ImageSource 7217 * @crossplatform 7218 * @since 10 7219 */ 7220 /** 7221 * ImageSource instance. 7222 * 7223 * @typedef ImageSource 7224 * @syscap SystemCapability.Multimedia.Image.ImageSource 7225 * @crossplatform 7226 * @atomicservice 7227 * @since 11 7228 */ 7229 /** 7230 * ImageSource instance. 7231 * 7232 * @typedef ImageSource 7233 * @syscap SystemCapability.Multimedia.Image.ImageSource 7234 * @crossplatform 7235 * @form 7236 * @atomicservice 7237 * @since 12 7238 */ 7239 interface ImageSource { 7240 /** 7241 * Obtains information about an image with the specified sequence number and uses a callback 7242 * to return the result. 7243 * 7244 * @param { number } index Sequence number of an image. 7245 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7246 * @syscap SystemCapability.Multimedia.Image.ImageSource 7247 * @since 6 7248 */ 7249 /** 7250 * Obtains information about an image with the specified sequence number and uses a callback 7251 * to return the result. 7252 * 7253 * @param { number } index Sequence number of an image. 7254 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7255 * @syscap SystemCapability.Multimedia.Image.ImageSource 7256 * @crossplatform 7257 * @since 10 7258 */ 7259 /** 7260 * Obtains information about an image with the specified sequence number and uses a callback 7261 * to return the result. 7262 * 7263 * @param { number } index Sequence number of an image. 7264 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7265 * @syscap SystemCapability.Multimedia.Image.ImageSource 7266 * @crossplatform 7267 * @atomicservice 7268 * @since 11 7269 */ 7270 /** 7271 * Obtains information about an image with the specified sequence number and uses a callback 7272 * to return the result. 7273 * 7274 * @param { number } index Sequence number of an image. 7275 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7276 * @syscap SystemCapability.Multimedia.Image.ImageSource 7277 * @crossplatform 7278 * @form 7279 * @atomicservice 7280 * @since 12 7281 */ 7282 getImageInfo(index: number, callback: AsyncCallback<ImageInfo>): void; 7283 7284 /** 7285 * Obtains information about this image and uses a callback to return the result. 7286 * 7287 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7288 * @syscap SystemCapability.Multimedia.Image.ImageSource 7289 * @since 6 7290 */ 7291 /** 7292 * Obtains information about this image and uses a callback to return the result. 7293 * 7294 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7295 * @syscap SystemCapability.Multimedia.Image.ImageSource 7296 * @crossplatform 7297 * @since 10 7298 */ 7299 /** 7300 * Obtains information about this image and uses a callback to return the result. 7301 * 7302 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7303 * @syscap SystemCapability.Multimedia.Image.ImageSource 7304 * @crossplatform 7305 * @atomicservice 7306 * @since 11 7307 */ 7308 /** 7309 * Obtains information about this image and uses a callback to return the result. 7310 * 7311 * @param { AsyncCallback<ImageInfo> } callback Callback used to return the image information. 7312 * @syscap SystemCapability.Multimedia.Image.ImageSource 7313 * @crossplatform 7314 * @form 7315 * @atomicservice 7316 * @since 12 7317 */ 7318 getImageInfo(callback: AsyncCallback<ImageInfo>): void; 7319 7320 /** 7321 * Get image information from image source. 7322 * 7323 * @param { number } index Sequence number of an image. If this parameter is not specified, the default value 0 is used. 7324 * @returns { Promise<ImageInfo> } A Promise instance used to return the image information. 7325 * @syscap SystemCapability.Multimedia.Image.ImageSource 7326 * @since 6 7327 */ 7328 /** 7329 * Get image information from image source. 7330 * 7331 * @param { number } index Sequence number of an image. If this parameter is not specified, the default value 0 is used. 7332 * @returns { Promise<ImageInfo> } A Promise instance used to return the image information. 7333 * @syscap SystemCapability.Multimedia.Image.ImageSource 7334 * @crossplatform 7335 * @since 10 7336 */ 7337 /** 7338 * Get image information from image source. 7339 * 7340 * @param { number } index Sequence number of an image. If this parameter is not specified, the default value 0 is used. 7341 * @returns { Promise<ImageInfo> } A Promise instance used to return the image information. 7342 * @syscap SystemCapability.Multimedia.Image.ImageSource 7343 * @crossplatform 7344 * @atomicservice 7345 * @since 11 7346 */ 7347 /** 7348 * Get image information from image source. 7349 * 7350 * @param { number } index Sequence number of an image. If this parameter is not specified, the default value 0 is used. 7351 * @returns { Promise<ImageInfo> } A Promise instance used to return the image information. 7352 * @syscap SystemCapability.Multimedia.Image.ImageSource 7353 * @crossplatform 7354 * @form 7355 * @atomicservice 7356 * @since 12 7357 */ 7358 getImageInfo(index?: number): Promise<ImageInfo>; 7359 7360 /** 7361 * Get image information from image source synchronously. 7362 * 7363 * @param { number } index - Index of sequence images. If this parameter is not specified, default value is 0. 7364 * @returns { ImageInfo } The image information. 7365 * @syscap SystemCapability.Multimedia.Image.ImageSource 7366 * @crossplatform 7367 * @since 12 7368 */ 7369 getImageInfoSync(index?: number): ImageInfo; 7370 7371 /** 7372 * Creates a PixelMap object based on image decoding parameters. This method uses a promise to 7373 * return the object. 7374 * 7375 * @param { DecodingOptions } options Image decoding parameters. 7376 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 7377 * @syscap SystemCapability.Multimedia.Image.ImageSource 7378 * @since 7 7379 */ 7380 /** 7381 * Creates a PixelMap object based on image decoding parameters. This method uses a promise to 7382 * return the object. 7383 * 7384 * @param { DecodingOptions } options Image decoding parameters. 7385 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 7386 * @syscap SystemCapability.Multimedia.Image.ImageSource 7387 * @crossplatform 7388 * @since 10 7389 */ 7390 /** 7391 * Creates a PixelMap object based on image decoding parameters. This method uses a promise to 7392 * return the object. 7393 * 7394 * @param { DecodingOptions } options Image decoding parameters. 7395 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 7396 * @syscap SystemCapability.Multimedia.Image.ImageSource 7397 * @crossplatform 7398 * @atomicservice 7399 * @since 11 7400 */ 7401 /** 7402 * Creates a PixelMap object based on image decoding parameters. This method uses a promise to 7403 * return the object. 7404 * 7405 * @param { DecodingOptions } options Image decoding parameters. 7406 * @returns { Promise<PixelMap> } A Promise instance used to return the PixelMap object. 7407 * @syscap SystemCapability.Multimedia.Image.ImageSource 7408 * @crossplatform 7409 * @form 7410 * @atomicservice 7411 * @since 12 7412 */ 7413 createPixelMap(options?: DecodingOptions): Promise<PixelMap>; 7414 7415 /** 7416 * Creates a PixelMap object. This method uses a callback to return the object. 7417 * 7418 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7419 * @syscap SystemCapability.Multimedia.Image.ImageSource 7420 * @since 7 7421 */ 7422 /** 7423 * Creates a PixelMap object. This method uses a callback to return the object. 7424 * 7425 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7426 * @syscap SystemCapability.Multimedia.Image.ImageSource 7427 * @crossplatform 7428 * @since 10 7429 */ 7430 /** 7431 * Creates a PixelMap object. This method uses a callback to return the object. 7432 * 7433 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7434 * @syscap SystemCapability.Multimedia.Image.ImageSource 7435 * @crossplatform 7436 * @atomicservice 7437 * @since 11 7438 */ 7439 /** 7440 * Creates a PixelMap object. This method uses a callback to return the object. 7441 * 7442 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7443 * @syscap SystemCapability.Multimedia.Image.ImageSource 7444 * @crossplatform 7445 * @form 7446 * @atomicservice 7447 * @since 12 7448 */ 7449 createPixelMap(callback: AsyncCallback<PixelMap>): void; 7450 7451 /** 7452 * Creates a PixelMap object based on image decoding parameters. This method uses a callback to 7453 * return the object. 7454 * 7455 * @param { DecodingOptions } options Image decoding parameters. 7456 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7457 * @syscap SystemCapability.Multimedia.Image.ImageSource 7458 * @since 7 7459 */ 7460 /** 7461 * Creates a PixelMap object based on image decoding parameters. This method uses a callback to 7462 * return the object. 7463 * 7464 * @param { DecodingOptions } options Image decoding parameters. 7465 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7466 * @syscap SystemCapability.Multimedia.Image.ImageSource 7467 * @crossplatform 7468 * @since 10 7469 */ 7470 /** 7471 * Creates a PixelMap object based on image decoding parameters. This method uses a callback to 7472 * return the object. 7473 * 7474 * @param { DecodingOptions } options Image decoding parameters. 7475 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7476 * @syscap SystemCapability.Multimedia.Image.ImageSource 7477 * @crossplatform 7478 * @atomicservice 7479 * @since 11 7480 */ 7481 /** 7482 * Creates a PixelMap object based on image decoding parameters. This method uses a callback to 7483 * return the object. 7484 * 7485 * @param { DecodingOptions } options Image decoding parameters. 7486 * @param { AsyncCallback<PixelMap> } callback Callback used to return the PixelMap object. 7487 * @syscap SystemCapability.Multimedia.Image.ImageSource 7488 * @crossplatform 7489 * @form 7490 * @atomicservice 7491 * @since 12 7492 */ 7493 createPixelMap(options: DecodingOptions, callback: AsyncCallback<PixelMap>): void; 7494 7495 /** 7496 * Create a PixelMap object based on image decoding parameters synchronously. 7497 * 7498 * @param { DecodingOptions } options - Image decoding parameters. 7499 * @returns { PixelMap } Return the PixelMap. If decoding fails, return undefined. 7500 * @syscap SystemCapability.Multimedia.Image.ImageSource 7501 * @crossplatform 7502 * @since 12 7503 */ 7504 createPixelMapSync(options?: DecodingOptions): PixelMap; 7505 7506 /** 7507 * Creates a PixelMap array based on image decoding parameters. This method uses a promise to 7508 * return the array. 7509 * 7510 * @param { DecodingOptions } options Image decoding parameters. 7511 * @returns { Promise<Array<PixelMap>> } A Promise instance used to return the PixelMap array. 7512 * @throws { BusinessError } 62980096 - The operation failed. 7513 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7514 * @throws { BusinessError } 62980101 - The image data is abnormal. 7515 * @throws { BusinessError } 62980103 - The image data is not supported. 7516 * @throws { BusinessError } 62980106 - The image is too large. 7517 * @throws { BusinessError } 62980109 - Failed to crop the image. 7518 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7519 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7520 * @throws { BusinessError } 62980112 - The image format does not match. 7521 * @throws { BusinessError } 62980113 - Unknown image format. 7522 * @throws { BusinessError } 62980115 - Invalid image parameter. 7523 * @throws { BusinessError } 62980116 - Failed to decode the image. 7524 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7525 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7526 * @throws { BusinessError } 62980137 - Invalid media operation. 7527 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7528 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7529 * @syscap SystemCapability.Multimedia.Image.ImageSource 7530 * @crossplatform 7531 * @since 10 7532 */ 7533 /** 7534 * Creates a PixelMap array based on image decoding parameters. This method uses a promise to 7535 * return the array. 7536 * 7537 * @param { DecodingOptions } options Image decoding parameters. 7538 * @returns { Promise<Array<PixelMap>> } A Promise instance used to return the PixelMap array. 7539 * @throws { BusinessError } 62980096 - The operation failed. 7540 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7541 * @throws { BusinessError } 62980101 - The image data is abnormal. 7542 * @throws { BusinessError } 62980103 - The image data is not supported. 7543 * @throws { BusinessError } 62980106 - The image is too large. 7544 * @throws { BusinessError } 62980109 - Failed to crop the image. 7545 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7546 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7547 * @throws { BusinessError } 62980112 - The image format does not match. 7548 * @throws { BusinessError } 62980113 - Unknown image format. 7549 * @throws { BusinessError } 62980115 - Invalid image parameter. 7550 * @throws { BusinessError } 62980116 - Failed to decode the image. 7551 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7552 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7553 * @throws { BusinessError } 62980137 - Invalid media operation. 7554 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7555 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7556 * @syscap SystemCapability.Multimedia.Image.ImageSource 7557 * @crossplatform 7558 * @since 12 7559 */ 7560 createPixelMapList(options?: DecodingOptions): Promise<Array<PixelMap>>; 7561 7562 /** 7563 * Creates a PixelMap array. This method uses a callback to return the array. 7564 * 7565 * @param { AsyncCallback<Array<PixelMap>> } callback Callback used to return the PixelMap array. 7566 * @throws { BusinessError } 62980096 - The operation failed. 7567 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7568 * @throws { BusinessError } 62980101 - The image data is abnormal. 7569 * @throws { BusinessError } 62980103 - The image data is not supported. 7570 * @throws { BusinessError } 62980106 - The image is too large. 7571 * @throws { BusinessError } 62980109 - Failed to crop the image. 7572 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7573 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7574 * @throws { BusinessError } 62980112 - The image format does not match. 7575 * @throws { BusinessError } 62980113 - Unknown image format. 7576 * @throws { BusinessError } 62980115 - Invalid image parameter. 7577 * @throws { BusinessError } 62980116 - Failed to decode the image. 7578 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7579 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7580 * @throws { BusinessError } 62980137 - Invalid media operation. 7581 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7582 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7583 * @syscap SystemCapability.Multimedia.Image.ImageSource 7584 * @crossplatform 7585 * @since 10 7586 */ 7587 /** 7588 * Creates a PixelMap array. This method uses a callback to return the array. 7589 * 7590 * @param { AsyncCallback<Array<PixelMap>> } callback Callback used to return the PixelMap array. 7591 * @throws { BusinessError } 62980096 - The operation failed. 7592 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7593 * @throws { BusinessError } 62980101 - The image data is abnormal. 7594 * @throws { BusinessError } 62980103 - The image data is not supported. 7595 * @throws { BusinessError } 62980106 - The image is too large. 7596 * @throws { BusinessError } 62980109 - Failed to crop the image. 7597 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7598 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7599 * @throws { BusinessError } 62980112 - The image format does not match. 7600 * @throws { BusinessError } 62980113 - Unknown image format. 7601 * @throws { BusinessError } 62980115 - Invalid image parameter. 7602 * @throws { BusinessError } 62980116 - Failed to decode the image. 7603 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7604 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7605 * @throws { BusinessError } 62980137 - Invalid media operation. 7606 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7607 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7608 * @syscap SystemCapability.Multimedia.Image.ImageSource 7609 * @crossplatform 7610 * @since 12 7611 */ 7612 createPixelMapList(callback: AsyncCallback<Array<PixelMap>>): void; 7613 7614 /** 7615 * Creates a PixelMap array based on image decoding parameters. This method uses a callback to 7616 * return the array. 7617 * 7618 * @param { DecodingOptions } options Image decoding parameters. 7619 * @param { AsyncCallback<Array<PixelMap>> } callback Callback used to return the PixelMap array. 7620 * @throws { BusinessError } 62980096 - The operation failed. 7621 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7622 * @throws { BusinessError } 62980101 - The image data is abnormal. 7623 * @throws { BusinessError } 62980103 - The image data is not supported. 7624 * @throws { BusinessError } 62980106 - The image is too large. 7625 * @throws { BusinessError } 62980109 - Failed to crop the image. 7626 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7627 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7628 * @throws { BusinessError } 62980112 - The image format does not match. 7629 * @throws { BusinessError } 62980113 - Unknown image format. 7630 * @throws { BusinessError } 62980115 - Invalid image parameter. 7631 * @throws { BusinessError } 62980116 - Failed to decode the image. 7632 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7633 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7634 * @throws { BusinessError } 62980137 - Invalid media operation. 7635 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7636 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7637 * @syscap SystemCapability.Multimedia.Image.ImageSource 7638 * @crossplatform 7639 * @since 10 7640 */ 7641 /** 7642 * Creates a PixelMap array based on image decoding parameters. This method uses a callback to 7643 * return the array. 7644 * 7645 * @param { DecodingOptions } options Image decoding parameters. 7646 * @param { AsyncCallback<Array<PixelMap>> } callback Callback used to return the PixelMap array. 7647 * @throws { BusinessError } 62980096 - The operation failed. 7648 * @throws { BusinessError } 62980099 - The shared memory data is abnormal. 7649 * @throws { BusinessError } 62980101 - The image data is abnormal. 7650 * @throws { BusinessError } 62980103 - The image data is not supported. 7651 * @throws { BusinessError } 62980106 - The image is too large. 7652 * @throws { BusinessError } 62980109 - Failed to crop the image. 7653 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7654 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7655 * @throws { BusinessError } 62980112 - The image format does not match. 7656 * @throws { BusinessError } 62980113 - Unknown image format. 7657 * @throws { BusinessError } 62980115 - Invalid image parameter. 7658 * @throws { BusinessError } 62980116 - Failed to decode the image. 7659 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7660 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7661 * @throws { BusinessError } 62980137 - Invalid media operation. 7662 * @throws { BusinessError } 62980173 - The DMA memory does not exist. 7663 * @throws { BusinessError } 62980174 - The DMA memory data is abnormal. 7664 * @syscap SystemCapability.Multimedia.Image.ImageSource 7665 * @crossplatform 7666 * @since 12 7667 */ 7668 createPixelMapList(options: DecodingOptions, callback: AsyncCallback<Array<PixelMap>>): void; 7669 7670 /** 7671 * Obtains the array of delay time in an image. This method uses a promise to return the array. 7672 * 7673 * @returns { Promise<Array<number>> } A Promise instance used to return the array. 7674 * @throws { BusinessError } 62980096 - The operation failed. 7675 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7676 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7677 * @throws { BusinessError } 62980112 - The image format does not match. 7678 * @throws { BusinessError } 62980113 - Unknown image format. 7679 * @throws { BusinessError } 62980115 - Invalid image parameter. 7680 * @throws { BusinessError } 62980116 - Failed to decode the image. 7681 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7682 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7683 * @throws { BusinessError } 62980137 - Invalid media operation. 7684 * @throws { BusinessError } 62980149 - Invalid media parameter. 7685 * @syscap SystemCapability.Multimedia.Image.ImageSource 7686 * @crossplatform 7687 * @since 10 7688 */ 7689 /** 7690 * Obtains the array of delay time in an image. This method uses a promise to return the array. 7691 * 7692 * @returns { Promise<Array<number>> } A Promise instance used to return the array. 7693 * @throws { BusinessError } 62980096 - The operation failed. 7694 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7695 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7696 * @throws { BusinessError } 62980112 - The image format does not match. 7697 * @throws { BusinessError } 62980113 - Unknown image format. 7698 * @throws { BusinessError } 62980115 - Invalid image parameter. 7699 * @throws { BusinessError } 62980116 - Failed to decode the image. 7700 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7701 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7702 * @throws { BusinessError } 62980137 - Invalid media operation. 7703 * @throws { BusinessError } 62980149 - Invalid MIME type for the image source. 7704 * @syscap SystemCapability.Multimedia.Image.ImageSource 7705 * @crossplatform 7706 * @since 12 7707 */ 7708 getDelayTimeList(): Promise<Array<number>>; 7709 7710 /** 7711 * Obtains the array of delay time in an image. This method uses a callback to return the array. 7712 * 7713 * @param { AsyncCallback<Array<number>> } callback Callback used to return the array. 7714 * @throws { BusinessError } 62980096 - The operation failed. 7715 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7716 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7717 * @throws { BusinessError } 62980112 - The image format does not match. 7718 * @throws { BusinessError } 62980113 - Unknown image format. 7719 * @throws { BusinessError } 62980115 - Invalid image parameter. 7720 * @throws { BusinessError } 62980116 - Failed to decode the image. 7721 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7722 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7723 * @throws { BusinessError } 62980137 - Invalid media operation. 7724 * @throws { BusinessError } 62980149 - Invalid media parameter. 7725 * @syscap SystemCapability.Multimedia.Image.ImageSource 7726 * @crossplatform 7727 * @since 10 7728 */ 7729 /** 7730 * Obtains the array of delay time in an image. This method uses a callback to return the array. 7731 * 7732 * @param { AsyncCallback<Array<number>> } callback Callback used to return the array. 7733 * @throws { BusinessError } 62980096 - The operation failed. 7734 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7735 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7736 * @throws { BusinessError } 62980112 - The image format does not match. 7737 * @throws { BusinessError } 62980113 - Unknown image format. 7738 * @throws { BusinessError } 62980115 - Invalid image parameter. 7739 * @throws { BusinessError } 62980116 - Failed to decode the image. 7740 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7741 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7742 * @throws { BusinessError } 62980137 - Invalid media operation. 7743 * @throws { BusinessError } 62980149 - Invalid MIME type for the image source. 7744 * @syscap SystemCapability.Multimedia.Image.ImageSource 7745 * @crossplatform 7746 * @since 12 7747 */ 7748 getDelayTimeList(callback: AsyncCallback<Array<number>>): void; 7749 7750 /** 7751 * Obtains the array of disposal type in a gif image. This method uses a promise to return the array. 7752 * 7753 * @returns { Promise<Array<number>> } A Promise instance used to return the array. 7754 * @throws { BusinessError } 62980096 - The operation failed. 7755 * @throws { BusinessError } 62980101 - The image data is abnormal. 7756 * @throws { BusinessError } 62980137 - Invalid media operation. 7757 * @throws { BusinessError } 62980149 - Invalid MIME type for the image source. 7758 * @syscap SystemCapability.Multimedia.Image.ImageSource 7759 * @crossplatform 7760 * @since 12 7761 */ 7762 getDisposalTypeList(): Promise<Array<number>>; 7763 7764 /** 7765 * Obtains the count of frame in an image. This method uses a promise to return the number. 7766 * 7767 * @returns { Promise<number> } A Promise instance used to return the number. 7768 * @throws { BusinessError } 62980096 - The operation failed. 7769 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7770 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7771 * @throws { BusinessError } 62980112 - The image format does not match. 7772 * @throws { BusinessError } 62980113 - Unknown image format. 7773 * @throws { BusinessError } 62980115 - Invalid image parameter. 7774 * @throws { BusinessError } 62980116 - Failed to decode the image. 7775 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7776 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7777 * @throws { BusinessError } 62980137 - Invalid media operation. 7778 * @syscap SystemCapability.Multimedia.Image.ImageSource 7779 * @crossplatform 7780 * @since 10 7781 */ 7782 /** 7783 * Obtains the count of frame in an image. This method uses a promise to return the number. 7784 * 7785 * @returns { Promise<number> } A Promise instance used to return the number. 7786 * @throws { BusinessError } 62980096 - The operation failed. 7787 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7788 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7789 * @throws { BusinessError } 62980112 - The image format does not match. 7790 * @throws { BusinessError } 62980113 - Unknown image format. 7791 * @throws { BusinessError } 62980115 - Invalid image parameter. 7792 * @throws { BusinessError } 62980116 - Failed to decode the image. 7793 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7794 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7795 * @throws { BusinessError } 62980137 - Invalid media operation. 7796 * @syscap SystemCapability.Multimedia.Image.ImageSource 7797 * @crossplatform 7798 * @since 12 7799 */ 7800 getFrameCount(): Promise<number>; 7801 7802 /** 7803 * Obtains the count of frame in an image. This method uses a callback to return the number. 7804 * 7805 * @param { AsyncCallback<number> } callback Callback used to return the number. 7806 * @throws { BusinessError } 62980096 - The operation failed. 7807 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7808 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7809 * @throws { BusinessError } 62980112 - The image format does not match. 7810 * @throws { BusinessError } 62980113 - Unknown image format. 7811 * @throws { BusinessError } 62980115 - Invalid image parameter. 7812 * @throws { BusinessError } 62980116 - Failed to decode the image. 7813 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7814 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7815 * @throws { BusinessError } 62980137 - Invalid media operation. 7816 * @syscap SystemCapability.Multimedia.Image.ImageSource 7817 * @crossplatform 7818 * @since 10 7819 */ 7820 /** 7821 * Obtains the count of frame in an image. This method uses a callback to return the number. 7822 * 7823 * @param { AsyncCallback<number> } callback Callback used to return the number. 7824 * @throws { BusinessError } 62980096 - The operation failed. 7825 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7826 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7827 * @throws { BusinessError } 62980112 - The image format does not match. 7828 * @throws { BusinessError } 62980113 - Unknown image format. 7829 * @throws { BusinessError } 62980115 - Invalid image parameter. 7830 * @throws { BusinessError } 62980116 - Failed to decode the image. 7831 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7832 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7833 * @throws { BusinessError } 62980137 - Invalid media operation. 7834 * @syscap SystemCapability.Multimedia.Image.ImageSource 7835 * @crossplatform 7836 * @since 12 7837 */ 7838 getFrameCount(callback: AsyncCallback<number>): void; 7839 7840 /** 7841 * Obtains the value of a property in an image with the specified index. This method uses a 7842 * promise to return the property value in a string. 7843 * 7844 * @param { PropertyKey } key - Name of the property whose value is to be obtained. 7845 * @param { ImagePropertyOptions } options - Index of the image. 7846 * @returns { Promise<string> } A Promise instance used to return the property value. If the operation fails, the default value is returned. 7847 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;3.Parameter verification failed; 7848 * @throws { BusinessError } 62980096 - The operation failed. 7849 * @throws { BusinessError } 62980103 - The image data is not supported. 7850 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7851 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7852 * @throws { BusinessError } 62980112 - The image format does not match. 7853 * @throws { BusinessError } 62980113 - Unknown image format. 7854 * @throws { BusinessError } 62980115 - Invalid image parameter. 7855 * @throws { BusinessError } 62980116 - Failed to decode the image. 7856 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7857 * @throws { BusinessError } 62980122 - The image decoding header is abnormal. 7858 * @throws { BusinessError } 62980123 - Images in EXIF format are not supported. 7859 * @throws { BusinessError } 62980135 - The EXIF value is invalid. 7860 * @syscap SystemCapability.Multimedia.Image.ImageSource 7861 * @crossplatform 7862 * @since 11 7863 */ 7864 /** 7865 * Obtains the value of a property in an image with the specified index. This method uses a 7866 * promise to return the property value in a string. 7867 * 7868 * @param { PropertyKey } key - Name of the property whose value is to be obtained. 7869 * @param { ImagePropertyOptions } options - Index of the image. 7870 * @returns { Promise<string> } A Promise instance used to return the property value. If the operation fails, the default value is returned. 7871 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;3.Parameter verification failed; 7872 * @throws { BusinessError } 62980096 - The operation failed. 7873 * @throws { BusinessError } 62980103 - The image data is not supported. 7874 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7875 * @throws { BusinessError } 62980111 - The image source data is incomplete. 7876 * @throws { BusinessError } 62980112 - The image format does not match. 7877 * @throws { BusinessError } 62980113 - Unknown image format. 7878 * @throws { BusinessError } 62980115 - Invalid image parameter. 7879 * @throws { BusinessError } 62980116 - Failed to decode the image. 7880 * @throws { BusinessError } 62980118 - Failed to create the image plugin. 7881 * @throws { BusinessError } 62980122 - Failed to decode the image header. 7882 * @throws { BusinessError } 62980123 - Images in EXIF format are not supported. 7883 * @throws { BusinessError } 62980135 - The EXIF value is invalid. 7884 * @syscap SystemCapability.Multimedia.Image.ImageSource 7885 * @crossplatform 7886 * @since 12 7887 */ 7888 getImageProperty(key: PropertyKey, options?: ImagePropertyOptions): Promise<string>; 7889 7890 /** 7891 * Obtains the value of a property in an image with the specified index. This method uses a 7892 * promise to return the property value in a string. 7893 * 7894 * @param { string } key Name of the property whose value is to be obtained. 7895 * @param { GetImagePropertyOptions } options Index of the image. 7896 * @returns { Promise<string> } A Promise instance used to return the property value. If the operation fails, the default value is returned. 7897 * @syscap SystemCapability.Multimedia.Image.ImageSource 7898 * @since 7 7899 * @deprecated since 11 7900 * @useinstead image.ImageSource#getImageProperty 7901 */ 7902 /** 7903 * Obtains the value of a property in an image with the specified index. This method uses a 7904 * promise to return the property value in a string. 7905 * 7906 * @param { string } key Name of the property whose value is to be obtained. 7907 * @param { GetImagePropertyOptions } options Index of the image. 7908 * @returns { Promise<string> } A Promise instance used to return the property value. If the operation fails, the default value is returned. 7909 * @syscap SystemCapability.Multimedia.Image.ImageSource 7910 * @crossplatform 7911 * @since 10 7912 * @deprecated since 11 7913 * @useinstead image.ImageSource#getImageProperty 7914 */ 7915 getImageProperty(key: string, options?: GetImagePropertyOptions): Promise<string>; 7916 7917 /** 7918 * Obtains the value of a property in this image. This method uses a callback to return the 7919 * property value in a string. 7920 * 7921 * @param { string } key Name of the property whose value is to be obtained. 7922 * @param { AsyncCallback<string> } callback Callback used to return the property value. If the operation fails, an error message is returned. 7923 * @syscap SystemCapability.Multimedia.Image.ImageSource 7924 * @since 7 7925 * @deprecated since 11 7926 * @useinstead image.ImageSource#getImageProperty 7927 */ 7928 /** 7929 * Obtains the value of a property in this image. This method uses a callback to return the 7930 * property value in a string. 7931 * 7932 * @param { string } key Name of the property whose value is to be obtained. 7933 * @param { AsyncCallback<string> } callback Callback used to return the property value. If the operation fails, an error message is returned. 7934 * @syscap SystemCapability.Multimedia.Image.ImageSource 7935 * @crossplatform 7936 * @since 10 7937 * @deprecated since 11 7938 * @useinstead image.ImageSource#getImageProperty 7939 */ 7940 getImageProperty(key: string, callback: AsyncCallback<string>): void; 7941 7942 /** 7943 * Obtains the value of a property in an image with the specified index. This method uses 7944 * a callback to return the property value in a string. 7945 * 7946 * @param { string } key Name of the property whose value is to be obtained. 7947 * @param { GetImagePropertyOptions } options Index of the image. 7948 * @param { AsyncCallback<string> } callback Callback used to return the property value. If the operation fails, the default value is returned. 7949 * @syscap SystemCapability.Multimedia.Image.ImageSource 7950 * @since 7 7951 * @deprecated since 11 7952 * @useinstead image.ImageSource#getImageProperty 7953 */ 7954 /** 7955 * Obtains the value of a property in an image with the specified index. This method uses 7956 * a callback to return the property value in a string. 7957 * 7958 * @param { string } key Name of the property whose value is to be obtained. 7959 * @param { GetImagePropertyOptions } options Index of the image. 7960 * @param { AsyncCallback<string> } callback Callback used to return the property value. If the operation fails, the default value is returned. 7961 * @syscap SystemCapability.Multimedia.Image.ImageSource 7962 * @crossplatform 7963 * @since 10 7964 * @deprecated since 11 7965 * @useinstead image.ImageSource#getImageProperty 7966 */ 7967 getImageProperty(key: string, options: GetImagePropertyOptions, callback: AsyncCallback<string>): void; 7968 7969 /** 7970 * Obtains the value of properties in an image. This method uses a promise to return the property values in array 7971 * of records. 7972 * 7973 * @param { Array<PropertyKey> } key - Name of the properties whose value is to be obtained. 7974 * @returns { Promise<Record<PropertyKey, string|null>> } Array of Records instance used to return the 7975 * property values. If the operation fails, the null is returned. 7976 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed; 7977 * @throws { BusinessError } 62980096 - The operation failed. 7978 * @throws { BusinessError } 62980110 - The image source data is incorrect. 7979 * @throws { BusinessError } 62980113 - Unknown image format. 7980 * @throws { BusinessError } 62980116 - Failed to decode the image. 7981 * @syscap SystemCapability.Multimedia.Image.ImageSource 7982 * @crossplatform 7983 * @since 12 7984 */ 7985 getImageProperties(key: Array<PropertyKey>): Promise<Record<PropertyKey, string|null>>; 7986 7987 /** 7988 * Modify the value of a property in an image with the specified key. This method uses a 7989 * promise to return the property value in a string. 7990 * 7991 * @param { PropertyKey } key - Name of the property whose value is to be modified. 7992 * @param { string } value - The value to be set to property. 7993 * @returns { Promise<void> } A Promise instance used to return the property value. 7994 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 7995 * @throws { BusinessError } 62980123 - Images in EXIF format are not supported. 7996 * @throws { BusinessError } 62980133 - The EXIF data is out of range. 7997 * @throws { BusinessError } 62980135 - The EXIF value is invalid. 7998 * @throws { BusinessError } 62980146 - The EXIF data failed to be written to the file. 7999 * @syscap SystemCapability.Multimedia.Image.ImageSource 8000 * @crossplatform 8001 * @since 11 8002 */ 8003 /** 8004 * Modify the value of a property in an image with the specified key. This method uses a 8005 * promise to return the property value in a string. 8006 * 8007 * @param { PropertyKey } key - Name of the property whose value is to be modified. 8008 * @param { string } value - The value to be set to property. 8009 * @returns { Promise<void> } A Promise instance used to return the property value. 8010 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 8011 * @throws { BusinessError } 62980123 - The image does not support EXIF decoding. 8012 * @throws { BusinessError } 62980133 - The EXIF data is out of range. 8013 * @throws { BusinessError } 62980135 - The EXIF value is invalid. 8014 * @throws { BusinessError } 62980146 - The EXIF data failed to be written to the file. 8015 * @syscap SystemCapability.Multimedia.Image.ImageSource 8016 * @crossplatform 8017 * @since 12 8018 */ 8019 modifyImageProperty(key: PropertyKey, value: string): Promise<void>; 8020 8021 /** 8022 * Modify the value of a property in an image with the specified key. This method uses a 8023 * promise to return the property value in a string. 8024 * 8025 * @param { string } key Name of the property whose value is to be modified. 8026 * @param { string } value The value to be set to property. 8027 * @returns { Promise<void> } A Promise instance used to return the property value. 8028 * @syscap SystemCapability.Multimedia.Image.ImageSource 8029 * @since 9 8030 * @deprecated since 11 8031 * @useinstead image.ImageSource#modifyImageProperty 8032 */ 8033 /** 8034 * Modify the value of a property in an image with the specified key. This method uses a 8035 * promise to return the property value in a string. 8036 * 8037 * @param { string } key Name of the property whose value is to be modified. 8038 * @param { string } value The value to be set to property. 8039 * @returns { Promise<void> } A Promise instance used to return the property value. 8040 * @syscap SystemCapability.Multimedia.Image.ImageSource 8041 * @crossplatform 8042 * @since 10 8043 * @deprecated since 11 8044 * @useinstead image.ImageSource#modifyImageProperty 8045 */ 8046 modifyImageProperty(key: string, value: string): Promise<void>; 8047 8048 /** 8049 * Modify the value of a property in an image with the specified key. This method uses a callback to return the 8050 * property value in a string. 8051 * 8052 * @param { string } key Name of the property whose value is to be obtained. 8053 * @param { string } value The value to be set to property. 8054 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8055 * @syscap SystemCapability.Multimedia.Image.ImageSource 8056 * @since 9 8057 * @deprecated since 11 8058 * @useinstead image.ImageSource#modifyImageProperty 8059 */ 8060 /** 8061 * Modify the value of a property in an image with the specified key. This method uses a callback to return the 8062 * property value in a string. 8063 * 8064 * @param { string } key Name of the property whose value is to be obtained. 8065 * @param { string } value The value to be set to property. 8066 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8067 * @syscap SystemCapability.Multimedia.Image.ImageSource 8068 * @crossplatform 8069 * @since 10 8070 * @deprecated since 11 8071 * @useinstead image.ImageSource#modifyImageProperty 8072 */ 8073 modifyImageProperty(key: string, value: string, callback: AsyncCallback<void>): void; 8074 8075 /** 8076 * Modify the value of properties in an image with the specified keys. 8077 * 8078 * @param { Record<PropertyKey, string|null> } records - Array of the property Records whose values are to 8079 * be modified. 8080 * @returns { Promise<void> } A Promise instance used to return the operation result. If the operation fails, an 8081 * error message is returned. 8082 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed; 8083 * @throws { BusinessError } 62980123 - The image does not support EXIF decoding. 8084 * @throws { BusinessError } 62980133 - The EXIF data is out of range. 8085 * @throws { BusinessError } 62980135 - The EXIF value is invalid. 8086 * @throws { BusinessError } 62980146 - The EXIF data failed to be written to the file. 8087 * @syscap SystemCapability.Multimedia.Image.ImageSource 8088 * @crossplatform 8089 * @since 12 8090 */ 8091 modifyImageProperties(records: Record<PropertyKey, string|null>): Promise<void>; 8092 8093 /** 8094 * Update the data in the incremental ImageSource. 8095 * 8096 * @param { ArrayBuffer } buf The data to be updated. 8097 * @param { boolean } isFinished If is it finished. 8098 * @param { number } value The offset of data. 8099 * @param { number } length The length fo buf. 8100 * @returns { Promise<void> } A Promise instance used to return the property value. 8101 * @syscap SystemCapability.Multimedia.Image.ImageSource 8102 * @since 9 8103 */ 8104 /** 8105 * Update the data in the incremental ImageSource. 8106 * 8107 * @param { ArrayBuffer } buf The data to be updated. 8108 * @param { boolean } isFinished If is it finished. 8109 * @param { number } value The offset of data. 8110 * @param { number } length The length fo buf. 8111 * @returns { Promise<void> } A Promise instance used to return the property value. 8112 * @syscap SystemCapability.Multimedia.Image.ImageSource 8113 * @crossplatform 8114 * @since 10 8115 */ 8116 /** 8117 * Update the data in the incremental ImageSource. 8118 * 8119 * @param { ArrayBuffer } buf The data to be updated. 8120 * @param { boolean } isFinished If is it finished. 8121 * @param { number } offset The offset of data. 8122 * @param { number } length The length fo buf. 8123 * @returns { Promise<void> } A Promise instance used to return the property value. 8124 * @syscap SystemCapability.Multimedia.Image.ImageSource 8125 * @crossplatform 8126 * @since 11 8127 */ 8128 updateData(buf: ArrayBuffer, isFinished: boolean, offset: number, length: number): Promise<void>; 8129 8130 /** 8131 * Update the data in the incremental ImageSource. 8132 * 8133 * @param { ArrayBuffer } buf The data to be updated. 8134 * @param { boolean } isFinished If is it finished. 8135 * @param { number } value The offset of data. 8136 * @param { number } length The length fo buf. 8137 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8138 * @syscap SystemCapability.Multimedia.Image.ImageSource 8139 * @since 9 8140 */ 8141 /** 8142 * Update the data in the incremental ImageSource. 8143 * 8144 * @param { ArrayBuffer } buf The data to be updated. 8145 * @param { boolean } isFinished If is it finished. 8146 * @param { number } value The offset of data. 8147 * @param { number } length The length fo buf. 8148 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8149 * @syscap SystemCapability.Multimedia.Image.ImageSource 8150 * @crossplatform 8151 * @since 10 8152 */ 8153 /** 8154 * Update the data in the incremental ImageSource. 8155 * 8156 * @param { ArrayBuffer } buf The data to be updated. 8157 * @param { boolean } isFinished If is it finished. 8158 * @param { number } offset The offset of data. 8159 * @param { number } length The length fo buf. 8160 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8161 * @syscap SystemCapability.Multimedia.Image.ImageSource 8162 * @crossplatform 8163 * @since 11 8164 */ 8165 updateData( 8166 buf: ArrayBuffer, 8167 isFinished: boolean, 8168 offset: number, 8169 length: number, 8170 callback: AsyncCallback<void> 8171 ): void; 8172 8173 /** 8174 * Releases an ImageSource instance and uses a callback to return the result. 8175 * 8176 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8177 * @syscap SystemCapability.Multimedia.Image.ImageSource 8178 * @since 6 8179 */ 8180 /** 8181 * Releases an ImageSource instance and uses a callback to return the result. 8182 * 8183 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8184 * @syscap SystemCapability.Multimedia.Image.ImageSource 8185 * @crossplatform 8186 * @since 10 8187 */ 8188 release(callback: AsyncCallback<void>): void; 8189 8190 /** 8191 * Releases an ImageSource instance and uses a promise to return the result. 8192 * 8193 * @returns { Promise<void> } A Promise instance used to return the operation result. 8194 * @syscap SystemCapability.Multimedia.Image.ImageSource 8195 * @since 6 8196 */ 8197 /** 8198 * Releases an ImageSource instance and uses a promise to return the result. 8199 * 8200 * @returns { Promise<void> } A Promise instance used to return the operation result. 8201 * @syscap SystemCapability.Multimedia.Image.ImageSource 8202 * @crossplatform 8203 * @since 10 8204 */ 8205 release(): Promise<void>; 8206 8207 /** 8208 * Creates a Picture object based on image decoding parameters. This method uses a promise to 8209 * return the object. 8210 * 8211 * @param { DecodingOptionsForPicture } options Image decoding parameters. 8212 * @returns { Promise<Picture> } A Promise instance used to return the Picture object. 8213 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 8214 * 2.Incorrect parameter types; 3.Parameter verification failed. 8215 * @throws { BusinessError } 7700301 - Decode failed. 8216 * @syscap SystemCapability.Multimedia.Image.ImageSource 8217 * @since 13 8218 */ 8219 createPicture(options?: DecodingOptionsForPicture): Promise<Picture> 8220 8221 /** 8222 * Supported image formats. 8223 * 8224 * @type { Array<string> } 8225 * @syscap SystemCapability.Multimedia.Image.ImageSource 8226 * @since 6 8227 */ 8228 /** 8229 * Supported image formats. 8230 * 8231 * @type { Array<string> } 8232 * @syscap SystemCapability.Multimedia.Image.ImageSource 8233 * @crossplatform 8234 * @since 10 8235 */ 8236 readonly supportedFormats: Array<string>; 8237 } 8238 8239 /** 8240 * ImagePacker instance. 8241 * 8242 * @typedef ImagePacker 8243 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8244 * @since 6 8245 */ 8246 /** 8247 * ImagePacker instance. 8248 * 8249 * @typedef ImagePacker 8250 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8251 * @crossplatform 8252 * @since 10 8253 */ 8254 /** 8255 * ImagePacker instance. 8256 * 8257 * @typedef ImagePacker 8258 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8259 * @crossplatform 8260 * @atomicservice 8261 * @since 11 8262 */ 8263 interface ImagePacker { 8264 /** 8265 * Compresses or packs an image and uses a callback to return the result. 8266 * 8267 * @param { ImageSource } source Image to be processed. 8268 * @param { PackingOption } option Option for image packing. 8269 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8270 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8271 * @since 6 8272 * @deprecated since 13 8273 * @useinstead image.ImagePacker#packToData 8274 */ 8275 /** 8276 * Compresses or packs an image and uses a callback to return the result. 8277 * 8278 * @param { ImageSource } source Image to be processed. 8279 * @param { PackingOption } option Option for image packing. 8280 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8281 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8282 * @crossplatform 8283 * @since 10 8284 * @deprecated since 13 8285 * @useinstead image.ImagePacker#packToData 8286 */ 8287 /** 8288 * Compresses or packs an image and uses a callback to return the result. 8289 * 8290 * @param { ImageSource } source Image to be processed. 8291 * @param { PackingOption } option Option for image packing. 8292 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8293 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8294 * @crossplatform 8295 * @atomicservice 8296 * @since 11 8297 * @deprecated since 13 8298 * @useinstead image.ImagePacker#packToData 8299 */ 8300 packing(source: ImageSource, option: PackingOption, callback: AsyncCallback<ArrayBuffer>): void; 8301 8302 /** 8303 * Compresses or packs an image and uses a promise to return the result. 8304 * 8305 * @param { ImageSource } source Image to be processed. 8306 * @param { PackingOption } option Option for image packing. 8307 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8308 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8309 * @since 6 8310 * @deprecated since 13 8311 * @useinstead image.ImagePacker#packToData 8312 */ 8313 /** 8314 * Compresses or packs an image and uses a promise to return the result. 8315 * 8316 * @param { ImageSource } source Image to be processed. 8317 * @param { PackingOption } option Option for image packing. 8318 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8319 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8320 * @crossplatform 8321 * @since 10 8322 * @deprecated since 13 8323 * @useinstead image.ImagePacker#packToData 8324 */ 8325 /** 8326 * Compresses or packs an image and uses a promise to return the result. 8327 * 8328 * @param { ImageSource } source Image to be processed. 8329 * @param { PackingOption } option Option for image packing. 8330 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8331 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8332 * @crossplatform 8333 * @atomicservice 8334 * @since 11 8335 * @deprecated since 13 8336 * @useinstead image.ImagePacker#packToData 8337 */ 8338 packing(source: ImageSource, option: PackingOption): Promise<ArrayBuffer>; 8339 8340 /** 8341 * Compresses or packs an image and uses a promise to return the result. 8342 * 8343 * @param { ImageSource } source Image to be processed. 8344 * @param { PackingOption } options Option for image packing. 8345 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8346 * @throws { BusinessError } 401 - If the parameter is invalid. 8347 * @throws { BusinessError } 62980096 - The Operation failed. 8348 * @throws { BusinessError } 62980101 - The image data is abnormal. 8349 * @throws { BusinessError } 62980106 - The image is too large. 8350 * @throws { BusinessError } 62980113 - Unknown image format. 8351 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8352 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8353 * @throws { BusinessError } 62980172 - Failed to encode icc. 8354 * @throws { BusinessError } 62980252 - Failed to create surface. 8355 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8356 * @crossplatform 8357 * @atomicservice 8358 * @since 13 8359 */ 8360 packToData(source: ImageSource, options: PackingOption): Promise<ArrayBuffer>; 8361 8362 /** 8363 * Compresses or packs an image and uses a callback to return the result. 8364 * 8365 * @param { PixelMap } source PixelMap to be processed. 8366 * @param { PackingOption } option Option for image packing. 8367 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8368 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8369 * @since 8 8370 * @deprecated since 13 8371 * @useinstead image.ImagePacker#packToData 8372 */ 8373 /** 8374 * Compresses or packs an image and uses a callback to return the result. 8375 * 8376 * @param { PixelMap } source PixelMap to be processed. 8377 * @param { PackingOption } option Option for image packing. 8378 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8379 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8380 * @crossplatform 8381 * @since 10 8382 * @deprecated since 13 8383 * @useinstead image.ImagePacker#packToData 8384 */ 8385 /** 8386 * Compresses or packs an image and uses a callback to return the result. 8387 * 8388 * @param { PixelMap } source PixelMap to be processed. 8389 * @param { PackingOption } option Option for image packing. 8390 * @param { AsyncCallback<ArrayBuffer> } callback Callback used to return the packed data. 8391 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8392 * @crossplatform 8393 * @atomicservice 8394 * @since 11 8395 * @deprecated since 13 8396 * @useinstead image.ImagePacker#packToData 8397 */ 8398 packing(source: PixelMap, option: PackingOption, callback: AsyncCallback<ArrayBuffer>): void; 8399 8400 /** 8401 * Compresses or packs an image and uses a promise to return the result. 8402 * 8403 * @param { PixelMap } source PixelMap to be processed. 8404 * @param { PackingOption } option Option for image packing. 8405 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8406 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8407 * @since 8 8408 * @deprecated since 13 8409 * @useinstead image.ImagePacker#packToData 8410 */ 8411 /** 8412 * Compresses or packs an image and uses a promise to return the result. 8413 * 8414 * @param { PixelMap } source PixelMap to be processed. 8415 * @param { PackingOption } option Option for image packing. 8416 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8417 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8418 * @crossplatform 8419 * @since 10 8420 * @deprecated since 13 8421 * @useinstead image.ImagePacker#packToData 8422 */ 8423 /** 8424 * Compresses or packs an image and uses a promise to return the result. 8425 * 8426 * @param { PixelMap } source PixelMap to be processed. 8427 * @param { PackingOption } option Option for image packing. 8428 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8429 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8430 * @crossplatform 8431 * @atomicservice 8432 * @since 11 8433 * @deprecated since 13 8434 * @useinstead image.ImagePacker#packToData 8435 */ 8436 packing(source: PixelMap, option: PackingOption): Promise<ArrayBuffer>; 8437 8438 /** 8439 * Compresses or packs an image and uses a promise to return the result. 8440 * 8441 * @param { PixelMap } source PixelMap to be processed. 8442 * @param { PackingOption } options Option for image packing. 8443 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8444 * @throws { BusinessError } 401 - If the parameter is invalid. 8445 * @throws { BusinessError } 62980096 - The Operation failed. 8446 * @throws { BusinessError } 62980101 - The image data is abnormal. 8447 * @throws { BusinessError } 62980106 - The image is too large. 8448 * @throws { BusinessError } 62980113 - Unknown image format. 8449 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8450 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8451 * @throws { BusinessError } 62980172 - Failed to encode icc. 8452 * @throws { BusinessError } 62980252 - Failed to create surface. 8453 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8454 * @crossplatform 8455 * @atomicservice 8456 * @since 13 8457 */ 8458 packToData(source: PixelMap, options: PackingOption): Promise<ArrayBuffer>; 8459 8460 /** 8461 * Compresses or packs an image into a file and uses a callback to return the result. 8462 * 8463 * @param { ImageSource } source Image to be processed. 8464 * @param { number } fd ID of a file descriptor. 8465 * @param { PackingOption } options Options for image packing. 8466 * @param { AsyncCallback<void> } callback Callback used to return the operation result. 8467 * @throws { BusinessError } 62980096 - The Operation failed. 8468 * @throws { BusinessError } 62980101 - The image data is abnormal. 8469 * @throws { BusinessError } 62980106 - The image is too large. 8470 * @throws { BusinessError } 62980113 - Unknown image format. 8471 * @throws { BusinessError } 62980115 - If the parameter is invalid. 8472 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8473 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8474 * @throws { BusinessError } 62980172 - Failed to encode icc. 8475 * @throws { BusinessError } 62980252 - Failed to create surface. 8476 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8477 * @crossplatform 8478 * @since 11 8479 */ 8480 packToFile(source: ImageSource, fd: number, options: PackingOption, callback: AsyncCallback<void>): void; 8481 8482 /** 8483 * Compresses or packs an image into a file and uses a promise to return the result. 8484 * 8485 * @param { ImageSource } source Image to be processed. 8486 * @param { number } fd ID of a file descriptor. 8487 * @param { PackingOption } options Options for image packing. 8488 * @returns { Promise<void> } A Promise instance used to return the operation result. 8489 * @throws { BusinessError } 62980096 - The Operation failed. 8490 * @throws { BusinessError } 62980101 - The image data is abnormal. 8491 * @throws { BusinessError } 62980106 - The image is too large. 8492 * @throws { BusinessError } 62980113 - Unknown image format. 8493 * @throws { BusinessError } 62980115 - If the parameter is invalid. 8494 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8495 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8496 * @throws { BusinessError } 62980172 - Failed to encode icc. 8497 * @throws { BusinessError } 62980252 - Failed to create surface. 8498 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8499 * @crossplatform 8500 * @since 11 8501 */ 8502 packToFile(source: ImageSource, fd: number, options: PackingOption): Promise<void>; 8503 8504 /** 8505 * Compresses or packs an image into a file and uses a callback to return the result. 8506 * 8507 * @param { PixelMap } source PixelMap to be processed. 8508 * @param { number } fd ID of a file descriptor. 8509 * @param { PackingOption } options Options for image packing. 8510 * @param { AsyncCallback<void> } callback Callback used to return the operation result. 8511 * @throws { BusinessError } 62980096 - The Operation failed. 8512 * @throws { BusinessError } 62980101 - The image data is abnormal. 8513 * @throws { BusinessError } 62980106 - The image is too large. 8514 * @throws { BusinessError } 62980113 - Unknown image format. 8515 * @throws { BusinessError } 62980115 - If the parameter is invalid. 8516 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8517 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8518 * @throws { BusinessError } 62980172 - Failed to encode icc. 8519 * @throws { BusinessError } 62980252 - Failed to create surface. 8520 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8521 * @crossplatform 8522 * @since 11 8523 */ 8524 packToFile(source: PixelMap, fd: number, options: PackingOption, callback: AsyncCallback<void>): void; 8525 8526 /** 8527 * Compresses or packs an image into a file and uses a promise to return the result. 8528 * 8529 * @param { PixelMap } source PixelMap to be processed. 8530 * @param { number } fd ID of a file descriptor. 8531 * @param { PackingOption } options Options for image packing. 8532 * @returns { Promise<void> } A Promise instance used to return the operation result. 8533 * @throws { BusinessError } 62980096 - The Operation failed. 8534 * @throws { BusinessError } 62980101 - The image data is abnormal. 8535 * @throws { BusinessError } 62980106 - The image is too large. 8536 * @throws { BusinessError } 62980113 - Unknown image format. 8537 * @throws { BusinessError } 62980115 - If the parameter is invalid. 8538 * @throws { BusinessError } 62980119 - If encoder occur error during encoding. 8539 * @throws { BusinessError } 62980120 - Add pixelmap out of range. 8540 * @throws { BusinessError } 62980172 - Failed to encode icc. 8541 * @throws { BusinessError } 62980252 - Failed to create surface. 8542 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8543 * @crossplatform 8544 * @since 11 8545 */ 8546 packToFile(source: PixelMap, fd: number, options: PackingOption): Promise<void>; 8547 8548 /** 8549 * Releases an ImagePacker instance and uses a callback to return the result. 8550 * 8551 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8552 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8553 * @since 6 8554 */ 8555 /** 8556 * Releases an ImagePacker instance and uses a callback to return the result. 8557 * 8558 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8559 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8560 * @crossplatform 8561 * @since 10 8562 */ 8563 release(callback: AsyncCallback<void>): void; 8564 8565 /** 8566 * Releases an ImagePacker instance and uses a promise to return the result. 8567 * 8568 * @returns { Promise<void> } A Promise instance used to return the operation result. 8569 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8570 * @since 6 8571 */ 8572 /** 8573 * Releases an ImagePacker instance and uses a promise to return the result. 8574 * 8575 * @returns { Promise<void> } A Promise instance used to return the operation result. 8576 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8577 * @crossplatform 8578 * @since 10 8579 */ 8580 release(): Promise<void>; 8581 8582 /** 8583 * Compresses or packs an image and uses a promise to return the result. 8584 * 8585 * @param { Picture } picture Picture to be processed. 8586 * @param { PackingOption } options Option for image packing. 8587 * @returns { Promise<ArrayBuffer> } A Promise instance used to return the compressed or packed data. 8588 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 8589 * 2.Incorrect parameter types. 3.Parameter verification failed. 8590 * @throws { BusinessError } 7800301 - Encode failed. 8591 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8592 * @since 13 8593 */ 8594 packing(picture: Picture, options: PackingOption): Promise<ArrayBuffer>; 8595 8596 /** 8597 * Compresses or packs an image into a file and uses a promise to return the result. 8598 * 8599 * @param { Picture } picture Picture to be processed. 8600 * @param { number } fd ID of a file descriptor. 8601 * @param { PackingOption } options Options for image packing. 8602 * @returns { Promise<void> } A Promise instance used to return the operation result. 8603 * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. 8604 * 2.Incorrect parameter types. 3.Parameter verification failed. 8605 * @throws { BusinessError } 7800301 - Encode failed. 8606 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8607 * @since 13 8608 */ 8609 packToFile(picture: Picture, fd: number, options: PackingOption): Promise<void> 8610 8611 /** 8612 * Supported image formats. 8613 * 8614 * @type { Array<string> } 8615 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8616 * @since 6 8617 */ 8618 /** 8619 * Supported image formats. 8620 * 8621 * @type { Array<string> } 8622 * @syscap SystemCapability.Multimedia.Image.ImagePacker 8623 * @crossplatform 8624 * @since 10 8625 */ 8626 readonly supportedFormats: Array<string>; 8627 } 8628 8629 /** 8630 * Provides basic image operations, including obtaining image information, and reading and writing image data. 8631 * 8632 * @typedef Image 8633 * @syscap SystemCapability.Multimedia.Image.Core 8634 * @since 9 8635 */ 8636 interface Image { 8637 /** 8638 * Sets or gets the image area to crop, default is size. 8639 * 8640 * @type { Region } 8641 * @syscap SystemCapability.Multimedia.Image.Core 8642 * @since 9 8643 */ 8644 clipRect: Region; 8645 8646 /** 8647 * Image size. 8648 * 8649 * @type { Size } 8650 * @syscap SystemCapability.Multimedia.Image.Core 8651 * @since 9 8652 */ 8653 readonly size: Size; 8654 8655 /** 8656 * Image format. 8657 * 8658 * @type { number } 8659 * @syscap SystemCapability.Multimedia.Image.Core 8660 * @since 9 8661 */ 8662 readonly format: number; 8663 8664 /** 8665 * Image timestamp. 8666 * 8667 * @type { number } 8668 * @syscap SystemCapability.Multimedia.Image.Core 8669 * @since 12 8670 */ 8671 readonly timestamp: number; 8672 8673 /** 8674 * Get component buffer from image and uses a callback to return the result. 8675 * 8676 * @param { ComponentType } componentType The component type of image. 8677 * @param { AsyncCallback<Component> } callback Callback used to return the component buffer. 8678 * @syscap SystemCapability.Multimedia.Image.Core 8679 * @since 9 8680 */ 8681 getComponent(componentType: ComponentType, callback: AsyncCallback<Component>): void; 8682 8683 /** 8684 * Get component buffer from image and uses a promise to return the result. 8685 * 8686 * @param { ComponentType } componentType The component type of image. 8687 * @returns { Promise<Component> } A Promise instance used to return the component buffer. 8688 * @syscap SystemCapability.Multimedia.Image.Core 8689 * @since 9 8690 */ 8691 getComponent(componentType: ComponentType): Promise<Component>; 8692 8693 /** 8694 * Release current image to receive another and uses a callback to return the result. 8695 * 8696 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8697 * @syscap SystemCapability.Multimedia.Image.Core 8698 * @since 9 8699 */ 8700 release(callback: AsyncCallback<void>): void; 8701 8702 /** 8703 * Release current image to receive another and uses a promise to return the result. 8704 * 8705 * @returns { Promise<void> } A Promise instance used to return the operation result. 8706 * @syscap SystemCapability.Multimedia.Image.Core 8707 * @since 9 8708 */ 8709 release(): Promise<void>; 8710 } 8711 8712 /** 8713 * Image receiver object. 8714 * 8715 * @typedef ImageReceiver 8716 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8717 * @since 9 8718 */ 8719 interface ImageReceiver { 8720 /** 8721 * Image size. 8722 * 8723 * @type { Size } 8724 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8725 * @since 9 8726 */ 8727 readonly size: Size; 8728 8729 /** 8730 * Image capacity. 8731 * 8732 * @type { number } 8733 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8734 * @since 9 8735 */ 8736 readonly capacity: number; 8737 8738 /** 8739 * Image format. 8740 * 8741 * @type { ImageFormat } 8742 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8743 * @since 9 8744 */ 8745 readonly format: ImageFormat; 8746 8747 /** 8748 * Get an id which indicates a surface and can be used to set to Camera or other component can receive a surface 8749 * and uses a callback to return the result. 8750 * 8751 * @param { AsyncCallback<string> } callback Callback used to return the surface id. 8752 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8753 * @since 9 8754 */ 8755 getReceivingSurfaceId(callback: AsyncCallback<string>): void; 8756 8757 /** 8758 * Get an id which indicates a surface and can be used to set to Camera or other component can receive a surface 8759 * and uses a promise to return the result. 8760 * 8761 * @returns { Promise<string> } A Promise instance used to return the surface id. 8762 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8763 * @since 9 8764 */ 8765 getReceivingSurfaceId(): Promise<string>; 8766 8767 /** 8768 * Get lasted image from receiver and uses a callback to return the result. 8769 * 8770 * @param { AsyncCallback<Image> } callback Callback used to return the latest image. 8771 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8772 * @since 9 8773 */ 8774 readLatestImage(callback: AsyncCallback<Image>): void; 8775 8776 /** 8777 * Get lasted image from receiver and uses a promise to return the result. 8778 * 8779 * @returns { Promise<Image> } A Promise instance used to return the latest image. 8780 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8781 * @since 9 8782 */ 8783 readLatestImage(): Promise<Image>; 8784 8785 /** 8786 * Get next image from receiver and uses a callback to return the result. 8787 * 8788 * @param { AsyncCallback<Image> } callback Callback used to return the next image. 8789 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8790 * @since 9 8791 */ 8792 readNextImage(callback: AsyncCallback<Image>): void; 8793 8794 /** 8795 * Get next image from receiver and uses a promise to return the result. 8796 * 8797 * @returns { Promise<Image> } A Promise instance used to return the next image. 8798 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8799 * @since 9 8800 */ 8801 readNextImage(): Promise<Image>; 8802 8803 /** 8804 * Subscribe callback when receiving an image 8805 * 8806 * @param { 'imageArrival' } type Callback used to return the next image. 8807 * @param { AsyncCallback<void> } callback Callback used to return image. 8808 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8809 * @since 9 8810 */ 8811 on(type: 'imageArrival', callback: AsyncCallback<void>): void; 8812 8813 /** 8814 * Remove callback subscriptions when releasing buffer 8815 * 8816 * @param { 'imageArrival' } type - Event type. 8817 * @param { AsyncCallback<void> } callback Callback to be removed. 8818 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8819 * @since 13 8820 */ 8821 off(type: 'imageArrival', callback?: AsyncCallback<void>): void; 8822 8823 /** 8824 * Release image receiver instance and uses a callback to return the result. 8825 * 8826 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8827 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8828 * @since 9 8829 */ 8830 release(callback: AsyncCallback<void>): void; 8831 8832 /** 8833 * Release image receiver instance and uses a promise to return the result. 8834 * 8835 * @returns { Promise<void> } A Promise instance used to return the operation result. 8836 * @syscap SystemCapability.Multimedia.Image.ImageReceiver 8837 * @since 9 8838 */ 8839 release(): Promise<void>; 8840 } 8841 8842 /** 8843 * Image creator object. 8844 * 8845 * @typedef ImageCreator 8846 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8847 * @since 9 8848 */ 8849 interface ImageCreator { 8850 /** 8851 * Image capacity. 8852 * 8853 * @type { number } 8854 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8855 * @since 9 8856 */ 8857 readonly capacity: number; 8858 8859 /** 8860 * Image format. 8861 * 8862 * @type { ImageFormat } 8863 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8864 * @since 9 8865 */ 8866 readonly format: ImageFormat; 8867 8868 /** 8869 * Apply for new graphic buffer from free queue and use a callback to return the result. 8870 * 8871 * @param { AsyncCallback<Image> } callback Callback to return the operation result. 8872 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8873 * @since 9 8874 */ 8875 dequeueImage(callback: AsyncCallback<Image>): void; 8876 8877 /** 8878 * Apply for new graphic buffer from free queue and uses a promise to return the result. 8879 * 8880 * @returns { Promise<Image> } A Promise instance used to return the operation result. 8881 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8882 * @since 9 8883 */ 8884 dequeueImage(): Promise<Image>; 8885 8886 /** 8887 * Queue buffer to dirty queue and uses a callback to return the result. 8888 * 8889 * @param { Image } interface 8890 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8891 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8892 * @since 9 8893 */ 8894 queueImage(interface: Image, callback: AsyncCallback<void>): void; 8895 8896 /** 8897 * Queue buffer to dirty queue and uses a promise to return the result. 8898 * 8899 * @param { Image } interface 8900 * @returns { Promise<void> } A Promise instance used to return the operation result. 8901 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8902 * @since 9 8903 */ 8904 queueImage(interface: Image): Promise<void>; 8905 8906 /** 8907 * Subscribe callback when releasing buffer 8908 * 8909 * @param { 'imageRelease' } type Callback used to return the operation result. 8910 * @param { AsyncCallback<void> } callback Callback used to return the operation result. 8911 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8912 * @since 9 8913 */ 8914 on(type: 'imageRelease', callback: AsyncCallback<void>): void; 8915 8916 /** 8917 * Remove callback subscriptions when releasing buffer 8918 * 8919 * @param { 'imageRelease' } type - Event type. 8920 * @param { AsyncCallback<void> } callback Callback to be removed. 8921 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8922 * @since 13 8923 */ 8924 off(type: 'imageRelease', callback?: AsyncCallback<void>): void; 8925 8926 /** 8927 * Releases buffer in bufferqueue instance and uses a callback to return the result. 8928 * 8929 * @param { AsyncCallback<void> } callback Callback to return the operation result. 8930 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8931 * @since 9 8932 */ 8933 release(callback: AsyncCallback<void>): void; 8934 8935 /** 8936 * Releases buffer in bufferqueue instance and uses a promise to return the result. 8937 * 8938 * @returns { Promise<void> } A Promise instance used to return the operation result. 8939 * @syscap SystemCapability.Multimedia.Image.ImageCreator 8940 * @since 9 8941 */ 8942 release(): Promise<void>; 8943 } 8944} 8945 8946export default image; 8947