PhotoDemon icon indicating copy to clipboard operation
PhotoDemon copied to clipboard

Suggestion: Built in 'Retro' palette effects.

Open Kroc opened this issue 6 years ago • 5 comments

I wanted to do some batch conversion of images to particular palettes, but PhotoDemon isn't really designed for indexed-colour work (it doesn't have to); but this led me to think that some neat special effects you could add easily would be some 'Retro' filters that palletize an image to suit a particular hardware-platform's limitations. See https://en.wikipedia.org/wiki/List_of_color_palettes but particularly the sub-pages for "8/16-bit computer hardware palettes" and "videogame console palettes".

NB: On the more powerful systems, there are few restrictions other than the number of colours available per-pixel, but on weaker (typically 8-bit) systems, there are restrictions on the number of colours that can be used in any 8x8 area. For simplicity's sake you could choose to ignore these restrictions, but a future version could perhaps support restrictions for those perhaps wishing to convert images to actual hardware, e.g. C64.

Kroc avatar Dec 10 '17 17:12 Kroc

This is a great suggestion, Kroc. Thank you.

90% of the required code is already available thanks to the Effects > Stylize > Palettize menu. To complete a new "Retro" effect, I guess we'd still need:

  • [ ] Code to import various types of palette files (this looks fairly easy)
  • [ ] A good collection of freely available "retro" palette files we can ship

I can manually produce palette files from the Wikipedia page you mention, obviously, but if you already have any palettes on-hand (or know of a good online collection), that would be a huge help, too. Thanks in advance.

tannerhelland avatar Dec 11 '17 21:12 tannerhelland

Try here: the author has taken them from the Wikipedia article and made Photoshop palette files: http://fornaxvoid.com/colorpalettes/

Kroc avatar Dec 13 '17 22:12 Kroc

It just occurred to me that in the absence of an already existing palette file, you could write a function to produce a palette by counting the unique colours in an image -- you already have half the code. That way you can download the Wikipedia samples and just produce the palettes quickly. It'll also make the process easier if someone requests another palette in the future, just find any sample picture.

Kroc avatar Dec 13 '17 23:12 Kroc

Perfect, thank you! Both suggestions are great.

tannerhelland avatar Dec 14 '17 15:12 tannerhelland

Just discovered this highly interesting tool for 'retro-izing' images; could be a source of some inspiration: https://kronbits.itch.io/pixatool

Kroc avatar Feb 24 '18 21:02 Kroc