Using Nvidia NPP to resize image

I’m attempting to use the Nvidia performance primatives library to resize an image, but the nppiResize_8u_C3R function is throwing a NPP_RESIZE_FACTOR_ERROR that is not listed in the documentation as one of the error return codes for that function. Here is my hopefully simple code:

#include <iostream>
#include <nppi.h>

int image_a_pitch;
NppiSize image_a_size = {.width = 960, .height = 540};
NppiRect image_a_roi = {.x = 0, .y = 0, .width = 960, .height = 540};
Npp8u* image_a = nppiMalloc_8u_C3(960, 540, &image_a_pitch);

int image_b_pitch;
NppiSize image_b_size = {.width = 960, .height = 540};
NppiRect image_b_roi = {.x = 0, .y = 0, .width = 960, .height = 540};
Npp8u* image_b = nppiMalloc_8u_C3(960, 540, &image_b_pitch);

NppStatus result = nppiResize_8u_C3R(image_a, image_a_pitch, image_a_size, image_a_roi, image_b, image_b_pitch, image_b_size, image_b_roi, NPPI_INTER_SUPER);

if (result != NPP_SUCCESS) {
    std::cerr << "Error executing Resize -- code: " << result << std::endl;
}

You might note I’m not actually resizing the image, and yes, that is true, but I’m attempting to create the simplest case for this error. From what I’ve been testing, it doesn’t seem to matter what sizes I use for the images, I still get the same return error code, which does not seem to be a valid error code for that function, but rather an error code for nppiResizeSqrPixel_8u_C3R.

a possible workaround is on your cross posting:

[url]c++ - Undocumented resize error when using Nvidia NPP to resize image - Stack Overflow

Hi,

Yes, that solved the issue, thank you!

Since NPP_RESIZE_FACTOR_ERROR isn’t listed as an error return value for the nppiResize family of functions (compared to nppiResizeSqrPixel), and also that error is listed as being due to a scaling factor of zero or less, and not something related to the scaling algorithm, should I file a report?