Image scaling and rotating in C/C++

前端 未结 10 1620
情深已故
情深已故 2020-11-29 07:55

What is the best way to scale a 2D image array? For instance, suppose I have an image of 1024 x 2048 bytes, with each byte being a pixel. Each pixel is a grayscale level fro

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 08:30

    CxImage resizing methods produce strange result. I used Resample and Resample2 functions with all available variations of interpolation methods with same result. For example, try to resize 1024 x 768 image filled with white color to size 802 x 582. You'll find that there are pixels on the image that have color different to white! You can check this: open resized image in Windows Paint and try to fill it with black color. Result will surely amuse you.

提交回复
热议问题