[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] hq3x magnification algorithm



Eric Burgess wrote:
"hq3x" is the name of a very cool algorithm for enlarging low-color (cartoonish) low-resolution images.
Yes, I've checked this out. Currently pygame has a builtin version of the "AdvanceMAME Scale2x". I think these hq scaling algorithms are better because they work on 'similar' colors. The AdvanceMAME only does its magic on exact matching colors, which means gradients make it work like a regular pixel doubler.

I've been thinking about replacing the current scale2x with the one found at hiend3d. There is also a 3x and 4x scaler which wouldn't be bad to add if it happens.

Anyways, you can experiment with pygame.transform.scale2x. I have a few example images online. My game entry for the recent 48 hour contest made good use of the scale2x algorithm.

http://www.pygame.org/ftp/contrib/scalecompare.png
http://www.pygame.org/ftp/contrib/scalecompare2.png