PHP image resize using nearest-neighbor interpolation?

Posted by shipshape on Stack Overflow See other posts from Stack Overflow or by shipshape
Published on 2010-12-25T16:22:33Z Indexed on 2011/01/03 2:53 UTC
Read the original article Hit count: 247

Filed under:
|
|

I have a 16x16 sprite in PNG or GIF image format, and would like to display it on a website at 64 x 64 in all its pixelated glory. In Firefox 3.6+ and IE I can do this easily with CSS using image-rendering and -ms-interpolation-mode, but as this doesn't work in all browsers I'd like to resize the image on the fly using PHP instead. What's the best way to resize images using nearest-neighbor interpolation in PHP?

© Stack Overflow or respective owner

Related posts about php

Related posts about resize