Bi-Cubic Interpolation Algorithm for Image Scaling

后端 未结 4 1824
说谎
说谎 2021-02-06 01:03

I\'m trying to write a basic bicubic resize algorithm to resize a 24-bit RGB bitmap. I have a general understanding of the math involved, and I\'m using this i

4条回答
  •  温柔的废话
    2021-02-06 01:51

    You should switch the x and z when you call getpixel, and in getpixel you should index the array using:

    [(y * 3 * src_width) + (3 * x) + channel]
    

提交回复
热议问题