async resize(image) {
        const [newWidth, newHeight] = this.get_resize_output_image_size(image, this.size);
        return await image.resize(newWidth, newHeight, {
            // @ts-expect-error TS2322
            resample: this.resample,
        });
    }
Resizes the image.
@param {RawImage} image The image to resize.
@returns {Promise<RawImage>} The resized image.