| 624 | } |
| 625 | |
| 626 | image_channels_t imresize(const image_channels_t &A, size_t height, |
| 627 | size_t width, image_interpolation m) { |
| 628 | auto cimg_image = channels2cimg(A); |
| 629 | int interpolation_type = 0; |
| 630 | switch (m) { |
| 631 | case image_interpolation::raw: |
| 632 | interpolation_type = -1; |
| 633 | break; |
| 634 | case image_interpolation::additional_space: |
| 635 | interpolation_type = 0; |
| 636 | break; |
| 637 | case image_interpolation::nearest: |
| 638 | interpolation_type = 1; |
| 639 | break; |
| 640 | case image_interpolation::moving_average: |
| 641 | interpolation_type = 2; |
| 642 | break; |
| 643 | case image_interpolation::bilinear: |
| 644 | interpolation_type = 3; |
| 645 | break; |
| 646 | case image_interpolation::grid: |
| 647 | interpolation_type = 4; |
| 648 | break; |
| 649 | case image_interpolation::bicubic: |
| 650 | interpolation_type = 5; |
| 651 | break; |
| 652 | case image_interpolation::lanczos: |
| 653 | interpolation_type = 6; |
| 654 | break; |
| 655 | } |
| 656 | cimg_image.resize(static_cast<int>(width), static_cast<int>(height), 1, |
| 657 | static_cast<int>(A.size()), interpolation_type); |
| 658 | return cimg2channels(cimg_image); |
| 659 | } |
| 660 | |
| 661 | image_channels_t imresize(const image_channels_t &A, double scale, |
| 662 | image_interpolation m) { |
no test coverage detected