Skip to content

Instantly share code, notes, and snippets.

@TronPaul
Last active August 29, 2015 13:57
Show Gist options
  • Save TronPaul/9598070 to your computer and use it in GitHub Desktop.
Save TronPaul/9598070 to your computer and use it in GitHub Desktop.
Pixel Art

pixel_art (convert image to pixel art)
desired number of colors, size, original_image -> pixel art

  1. resize image using nearest neighbor
  2. reduce colors with low pixel count (< X% of pixels)
  3. while desired number of colors < number of colors
    1. reduce similar adjacent colors
    2. reduce similar non-adjacent colors
    3. Dither
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment