News for hackers. Stuff that matters.
Re:Rotating Images by bajsejohannes on Saturday August 17, 2013 @09:58AM (#6229089)
While the result isn't great, it's a neat algorithm, and it will actually do gamma correction correctly. Sampling and weighing the four pixels will not, unless you specifically code for it. And looking at the history of gamma correction in software, most developers don't care about that.
Re:Rotating Images by svantana on Saturday August 17, 2013 @04:22PM (#6230267)
That's not fair - you can look at this algorithm as doing nearest neighbor interpolation. No matter how you look at it, (bi-)linear interpolation will be more accurate, whether gamma corrected or not.
Re:Rotating Images by michaelerule on Sunday August 18, 2013 @11:09AM (#6232854)
It is my understanding that gamma correction occurs in the display driver ( or possibly display itself, in some cases ). The colors that your application manipulates are the "raw" colors. Linearly interpolating in this space is correct. Gamma correction will be applied automatically later in the display pipeline.