Skip to content

davidatbailey/pixelator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pixelator

icon

Pixelator is a Paint.NET plugin enhancement to reduce colour depth and pixelate images, you can use to create artwork and game assets. It enhances the built-in pixelate effect in Paint.NET with several extra features as shown in the examples below.

The output's colour palette be auto-generated, or it can use a fixed retro palette like MSDOS or Gameboy.

The plugin was written by DATB (not using AI!) and compiled in CodeLab.

pixelator_demo.mp4

How to install and use Pixelator

  1. Download and unzip pixelator.zip
  2. Close Paint.NET
  3. Right-click Install_Pixelator.bat, and choose Run as administrator.
  4. Open an image in Paint.NET
  5. Choose Effects > Distort > Pixelator

Options

  • Flatten Applies a bilateral surface blur to reduce noise and produce cleaner result.

  • Pixelate Reduce the pixel count by a percentage, default 25%.

  • Antialias Use bicubic resampling to soften colour differences.

  • Resample Nudge the pixelation image sampling, as it's sensitive to the sampling reference point.

  • Colour palette Choice of wplace, 8 colour, 27 colour, MSDOS, Commodore 64, RISC OS, Auto (smart/balanced).

  • Number of colours For auto-generated palettes

  • Brightness / Contrast

  • Dither style None, Normal (retro style) and Photo (Floyd-Steinberg 4x4 grid)

Image

Examples

Palettes
Original img img img
Wplace img img img
Gameboy img img img
8 colours img img img
27 colours img img img
MSDOS img img img
Commodore 64 img img img
RISC OS img img img
Auto (smart), 6 colours img img img
Auto (balanced), 6 colours img img img
Effects
Flatten, wplace palette, normal dither img img img
Flatten, 8 colours, normal dither img img img
No dither img img img
Photo dither img img img
Pixelate img img img

How it works

All Paint.NET plugins implement Prerender and Render functions which process a source image into a destination image. Prerender is used when combining multiple images, which is not needed here. The effect plugin has a UI which is defined using special comments in the code.

Pixelator defines each pixel using BRGA channels: blue, green, red, alpha; where the transparent alpha channel is duplicated from the source unchanged.

Colours are simplified using a euclidean mean comparison of each pixel with the target palette. Dithering is then achieved by finding the remainder between the source pixel's RGB values and the selected palette colour's RGB values, and spreading that difference across nearby pixels in a regular pattern.

The colours for auto-generated palettes are selected using either a k-means (smart) or median cut (balanced) algorithm:

  • "K-means" is an iterative method that refines groupings of similar pixels - this is better at capturing extreme values and usually produces a better result, although it's more computationally intensive and sensitive to the initial conditions.

  • "Median cut" sorts all pixels by their overall brightness (luminosity) and evenly selects the required number of colours from the list. It's less intensive, but the results are usually blander.

Pls get in touch with any questions or requests 😊🌈

About

Paint.NET plugin for pixelating images

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors