Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
Programming

Pixel art scaling algorithms

p0ss
Sunday, February 27, 2011 - 00:22
p0ss's picture

I saw this posted on reddit and thought it might be of use to a lot of the programmers here:

https://secure.wikimedia.org/wikipedia/en/wiki/Pixel_art_scaling_algorithms

 

 Just in case the game developers here didn't know, there are a number of high quality open source pixel art scaling algorithms around that can be used in their entirity in your games!

  • Log in or register to post comments
hc
joined 14 years 10 months ago
Monday, February 28, 2011 - 01:26

Just want to add some useful links I found on this topic for the imagemagic-tool:

Discussion about best approach: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=17447

Seems they recommend a triangle filter to keep diagonal edges. And it seems they are considering to add special pixel-art-scaling algorithms. But they can't use available source code because of licensing issues.

These links contain reference on available imagemagic methods:

Resizing-Reference with pictured examples: http://www.imagemagick.org/Usage/resize/

Downscaling esp. for aspect ratio changes: http://www.imagemagick.org/Usage/resize/#liquid-rescale

Blury upscale and then sharpening: http://www.imagemagick.org/Usage/resize/#resize_unsharp

The resize_unsharp is a general purpose method when you want to preserve edges and crispness not (only) for pixel-art.

 

  • Log in or register to post comments
Gaurav
joined 14 years 6 months ago
Thursday, May 26, 2011 - 08:27
Gaurav's picture

I would love to be able to use the hqnx pixel art scaling algorithms on some of the art here, especially Antifarea's stuff. But the only tools I found are for the command line, only work with uncompressed bmps, and don't handle transparency properly. I wish someone would write a nice plugin for GIMP or Paint.NET (hint hint).

HTML5 Canvas Old School RPG

HTML5 Canvas Old School RPG

  • Log in or register to post comments
Beast
joined 14 years 2 months ago
Thursday, May 26, 2011 - 12:47
Beast's picture

There is Scale2x and SuperScale2x. Imho both are preferable over HQ2x. For Scale2x there is an GIMP plugin avaiable.

  • Log in or register to post comments
Gaurav
joined 14 years 6 months ago
Thursday, May 26, 2011 - 14:01
Gaurav's picture

I'll be the first to admit that Scale2x could be better if you need to preserve texture / dithering patterns or keep the number of colors down, but for most small pixel art (which I plan to use it for) hq2x is just way, way better. It was so much better that it practically brought back old games from the dead. Its only disadvantage is that it takes a huge amount of cpu time, but when you're scaling the images in advance rather than in the game, that doesn't matter. There is a nice comparison of the algorithms here.

HTML5 Canvas Old School RPG

 

HTML5 Canvas Old School RPG

  • Log in or register to post comments
Gaurav
joined 14 years 6 months ago
Sunday, January 29, 2012 - 15:09
Gaurav's picture

Great News!!!

I finally found a hqnx program that works on pngs with transparency support. Unfortunately it is command line only at this point, but here it is. It is LGPL too, so if someone wants to finish the job and turn it into a GIMP filter...

Anyway here are the results of scaling by 2x on http://opengameart.org/content/twelve-16x18-rpg-sprites-plus-base Feel free to compare to http://opengameart.org/content/antifareas-rpg-sprite-set-1-enlarged-w-tr...

Enjoy!

Gaurav

 

 

HTML5 Canvas Old School RPG

Attachments: 
  • Log in or register to post comments
devnewton
joined 13 years 5 months ago
Sunday, February 10, 2013 - 10:32
devnewton's picture

Here is a rotsprite scale/rotate tool: http://www.pineight.com/pc/

  • Log in or register to post comments
Syrsly
joined 12 years 6 months ago
Sunday, March 10, 2013 - 15:39
Syrsly's picture

Very interesting site, devnewton.  Thanks for sharing.  I'm going to look into that bmp2tiles app.

As for pixel scaling, I just use a straight square scale.  It is best not to scale up, though.  Always better to make higher resolution images and scale them down when you need to.  Performance-wise, lower resolutions are better, but right now, computers simply do not need us to limit ourselves very much unless we're developing for mobile devices, like phones and Nintendo 3DS systems.

Syrsly
Twitch Streamer, Web/Game Developer, & Artist

syrsly.com - contact me for commissions, thanks!

  • Log in or register to post comments