Ask Your Question

Revision history [back]

Use flags! and don't save in a compress format

cv::resize(img, img2, size, cv::INTER_NEAREST);
imwrite("nearest.png",img2);
cv::resize(img, img2, size, cv::INTER_LINEAR );
imwrite("bilinear.png",img2);
cv::resize(img, img2, size, INTER_CUBIC );
imwrite("cubic.png",img2);