Image R

This snippet contains a function `ResizeImage` within the `DitherProcessor` class which resizes an image to the given width and height using a custom image resize function.
 avatar
unknown
c_cpp
9 months ago
400 B
1
Indexable
int ResizeImage(int width, int height);


int DitherProcessor::ResizeImage(int newWidth, int newHeight)
{
    uint8_t* src = source_image.release();
    int ret =  img_resize_JY(&src, &width, &height, newWidth, newHeight, 3);
    if (ret == BMPVIEW_SUCESS) {
        source_image.reset(src);
        current_image = std::make_unique<uint8_t[]>(width * height * 3);
    }
    return ret;
}
Editor is loading...
Leave a Comment