How do I do high quality scaling of a image?

后端 未结 11 1226
温柔的废话
温柔的废话 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:28

    As a follow up, Jeremy Rudd posted this article above. It implements filtered two pass resizing. The sources are C# but it looks clear enough that I can port it to give it a try. I found very similar C code yesterday that was much harder to understand (very bad variable names). I got it to sort-of-work, but it was very slow and did not produce good results which led me to believe there was an error in my adaptation. I may have better luck writing it from scratch with this as a reference, which I'll try.

    But considering how the two pass algorithm works I wonder if there isn't a faster way of doing it, perhaps even in one pass?

提交回复
热议问题