Inferis said:
Wisk, can you point me at some good bicubic algorithm links? I might include stuff like this later on...
There is a load of stuff all over the net that I've found, but no definite conclusions yet. Searching for this stuff is rather hidden by Google, because there are more search hits on how to use Photoshop than explanations of algorithms.
What I've discovered is that you use a function called a filter which resamples each pixel based on its neighbours. The filter seems to be a matrix which determines how you should weight source pixels. If I understand it right, you basically take the sum of the source pixels multiplied by the filter matrix and that gives you your final value for the resultant pixel. The general algorithm in computer graphics for this is called convolution. What is interesting is that convolution is used for all kinds of thing which I previous considered unrelated. For example, blurring and sharpening are both convolution operations but with a different filter. Emboss and posterize are similarly just a different filter.
When reducing an image, what's important to the eye is that the image is still relatively sharp. On the other hand, you don't want it to have jagged edges or 'ringing' (ghost effects around edges or different colored areas). Since we are reducing images quite considerably, we are very likely to lose much of the detail. So what I've been searching for is a filter which works well in image reduction as opposed to enlargement, will retain changes in contrast, but won't introduce
many artefacts. At the moment I'm looking at the Lanczos filter, but it is slow (two calls of sine per pixel -- I think), and there seem to be several variations of which I don't understand what they are all for.
So when I've been able to compare a couple of the filters and look at the results, I'll post more about my research.