PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Bitmap Scaling Algorithm Needed

Okay graphic gurus, I'm in need of an algorithm to scale bitmaps. I think this request is a little different from the typical type of routine needed for games. The algorithm must have the following qualities:

1: Quality is paramount.
2: Antialiasing is required.
3: Must handle very small bitmaps optimally (like 16x16 -> 12x12, or 16x16 -> 20x20).
4: Performance is not an issue.
5: Will primarily be used only with 16x16 source bitmaps.
6: All scaling will maintain existing aspect ratio.

Thanks!

Dan East
SDL has a stretching routine you may want to look at. It uses anti-aliasing, etc. I think this is the right link. It also rotates, but should give you a good gist of the algorithm. http://www.ferzkopp.net/Software/SDL_ro ... index.html
I'd use a bilinear filtered texture mapper.