It is currently Mon Sep 21, 2026 5:54 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: "Posterize" filter?
PostPosted: Wed Aug 14, 2019 12:19 pm  (#1) 
Offline
GimpChat Member

Joined: Aug 14, 2019
Posts: 7
GIMP Version: 2.10.12
Operating System: Windows
OS Version: Windows 7 Professional
GIMP Experience: Basic Level



Hi all,

I've been wondering, if there is a filter for GIMP that corresponds to the "Posterize" filter from Adobe Photoshop?

I've found this filter very useful for reducing the number of colours needed by a picture. I suppose I don't really need it at the time of writing, except perhaps for toying around.

Cheers,
Albert.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: "Posterize" filter?
PostPosted: Wed Aug 14, 2019 12:52 pm  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2615
Posterize is towards the bottom of the Colors menu

...but.. a tip for Gimp 2.10 Make sure there is a canvas open. The forward slash key brings up a search facility. Type in a search term, click on a result.

Attachment:
search.jpg
search.jpg [ 127.54 KiB | Viewed 9171 times ]


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Wed Aug 14, 2019 1:50 pm  (#3) 
Offline
GimpChat Member

Joined: Aug 14, 2019
Posts: 7
Playing around with reducing pictures to 16 or less colours reminds me of DOS graphics, especially the 16-colour modes.

Is there an easy way to constrain the choice of colours to VGA default palettes? I mean 0=black, 1=blue, 2=green, 7=gray, etc.

-Albert.


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Wed Aug 14, 2019 2:22 pm  (#4) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 317
awik wrote:
Is there an easy way to constrain the choice of colours to VGA default palettes? I mean 0=black, 1=blue, 2=green, 7=gray, etc.


1. Create an image with a black background
2. Image > Mode > Indexed and set to 16 colours
3.Windows > Dockable Dialogues > Colormap
4. Set foreground colour to blue
5. In the colormap click on "Add current foreground color"
Repeat 5. until all 16 colours have been added
6. Select colours from the colormap


Attachments:
Indexed1.jpg
Indexed1.jpg [ 13.96 KiB | Viewed 9150 times ]
Top
 Post subject: Re: "Posterize" filter?
PostPosted: Wed Aug 14, 2019 3:56 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1442
Location: Finland
Custom palettes. You can find retro/oldschool palettes for Gimp using google search.
I attached few, the ones that are highlighted.
If you convert image to C64 or Spectrum palette, it won't be correct though because of the graphic modes those systems had.

Drop the palettes in the user palettes folder = C:/Users/Yourname/AppData/Roaming/GIMP/2.10/palettes
Refresh palettes.
Menu: Image/Mode/Indexed...use custom palette, pick the one you want to use.

Image


Attachments:
retro-palettes.zip [4.84 KiB]
Downloaded 148 times
Top
 Post subject: Re: "Posterize" filter?
PostPosted: Thu Aug 15, 2019 3:15 am  (#6) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2615
Gimp is an RGB editor and I really advise working in RGB. For example if you start with a blank white canvas, convert to Indexed and whatever palette is chosen there are no colours in the colormap and you will have to add as described by Blighty. So stick with RGB mode. If you need indexed, convert as a final operation.

You need to make sure that the colors you use are in the chosen palette.
If the palette dialogue is not open then Windows -> Dockable Dialogues -> Palettes will open it. That allows selection of a palette and there are default ones that will do. Default 23 colours and EGA (240) actually has 16.

Using them:
You can click in the FG/BG icon which brings up the Change FG(BG) dialogue. There is a Palette Tab that shows the active palette. Choose the colour there.

Alternative if you do a lot of drawing. Open the Colors Dialogue Windows -> Dockable Dialogues -> Colours Same as before choose the palette tab. Pick your colours there.

Bit of a jumbled up screenshot, but it is all there ;)

Attachment:
palettes.jpg
palettes.jpg [ 163.34 KiB | Viewed 9095 times ]


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Thu Aug 15, 2019 10:44 am  (#7) 
Offline
GimpChat Member

Joined: Aug 14, 2019
Posts: 7
The problem is that converting to indexed mode, in and of itself, reduces the number of colours, so there is not much left for posterize to work with.

I did an experiment, testing two operations; a) posterize with 10 levels, and b) change to indexed mode with a 186 colour optimised palette. 186 was chosen because that was the result of operation (a), as reported by color cube analysis. The result is that operation (b) yields a somewhat better picture.

I don't understand what's going on here. According to the help for posterize, 10 levels allows 10*10*10=1000 colours, so why does it use only 186?

The original picture has 68117 unique colours according to the color cube analysis.

Setting to indexed mode with CGA palette (16 colours) results in a very poor image, using only 7 colours, mostly light gray and dark gray. It does not appear to use blue at all, even though the picture has a blue shirt and the sky is largely blue.

With CGA palette and dithering, the picture looks great given only 16 colours. Colorcube analysis reports that it uses 15 colours; why not 16?

-Albert.


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Thu Aug 15, 2019 11:57 am  (#8) 
Offline
GimpChat Member

Joined: Aug 14, 2019
Posts: 7
Nidhogg wrote:
Custom palettes. You can find retro/oldschool palettes for Gimp using google search.
I attached few, the ones that are highlighted.


I found that the CGA palette has the colours in the wrong order. See: Wikipedia CGA article

Quote:
If you convert image to C64 or Spectrum palette, it won't be correct though because of the graphic modes those systems had.


What would be wrong about it?

Quote:
Drop the palettes in the user palettes folder ...


I did so, and I added a correct CGA palette I found.

-Albert.


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Thu Aug 15, 2019 12:11 pm  (#9) 
Offline
GimpChat Member

Joined: Aug 14, 2019
Posts: 7
rich2005 wrote:
Gimp is an RGB editor and I really advise working in RGB. For example if you start with a blank white canvas, convert to Indexed and whatever palette is chosen there are no colours in the colormap and you will have to add as described by Blighty. So stick with RGB mode. If you need indexed, convert as a final operation.


I agree. I'm just playing.

Quote:
Alternative if you do a lot of drawing.


I don't. Mostly I edit photographs.

-Albert.


Top
 Post subject: Re: "Posterize" filter?
PostPosted: Fri Aug 16, 2019 1:33 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1442
Location: Finland
Quote:
If you convert image to C64 or Spectrum palette, it won't be correct though because of the graphic modes those systems had.

What would be wrong about it?


Too many colors in a cell. I lived my childhood with C64, but Spectrum also had similar limitations.
The image on those systems was divided into cells, and you could use only certain amount of colors in a single cell.
To get "correct" C64 or Spectrum image I would use emulator, or application you can draw it correctly like Timanthes.
There is also gimp-cbmplugs that I used earlier in Linux.
If you just play around it doesn't matter if you don't follow the graphic mode rules,
palette conversion make them look retro and nice in my opinion.

And yes, if you convert to indexed mode do it last.
When I make little retro images I export them to png without saving to XCF like bigger projects.

This is Gimp forum, but GrafX2 is also cool for oldschool.

Edit. Just found this will test later.
https://github.com/thojor79/bacillus_c64/blob/master/convert/gimp-plugin-c64fy.py


Amiga Palette in python, with bit planes and 4 dithering possibilities.
https://github.com/alexalkis/palette_amigaOCS


Image


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group