How do I do high quality scaling of a image?

后端 未结 11 1228
温柔的废话
温柔的废话 2021-01-30 15:19

I\'m writing some code to scale a 32 bit RGBA image in C/C++. I have written a few attempts that have been somewhat successful, but they\'re slow and most importantly the qualit

11条回答
  •  感动是毒
    2021-01-30 15:45

    Is it possible that OpenGL is doing the scaling in the vector domain? If so, there is no way that any pixel-based scaling is going to be near it in quality. This is the big advantage of vector based images.

    The bicubic algorithm can be tuned for sharpness vs. artifacts - I'm trying to find a link, I'll edit it in when I do.

    Edit: It was the Mitchell-Netravali work that I was thinking of, which is referenced at the bottom of this link:

    http://www.cg.tuwien.ac.at/~theussl/DA/node11.html

    You might also look into Lanczos resampling as an alternative to bicubic.

提交回复
热议问题