this post was submitted on 05 Jan 2025
22 points (100.0% liked)

Ask Lemmy

27802 readers
1749 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try [email protected] or [email protected]


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

I'm open to using GIMP or a web-based online tool

I'd like to take a source image and posterize it, but instead of letting the application pick the resulting colors, I'd like to pick them manually. So for every pixel, the app would change the color to one of my chosen colors

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I don't know if it's identical to the posterize effect, but in GIMP, you can reduce an image to indexed color using a fixed, user-specified palette and then back to RGB.

Image->Mode->Indexed...

Select your palette. Set dithering to None. Hit OK.

Image->Mode->RGB

You might try adding a subsequent despeckle...I think that Posterize might do something along those lines as well.

EDIT: Okay, after running a test image in GIMP, and then examining histograms on the output is that it looks like what Posterize does in GIMP is to take a "number of levels" input, then strictly divide each channel evenly along those lines (e.g. for "3", you'll have 0%, 50% brightness, and 100% brightness for each of red, green, and blue channels), and then it reduces the number of colors using only those colors. I don't think that it does a despeckle. I used to enjoy making "more-poster-like" images than Posterize did, and usually did a despeckle to simplify them before running outlines on it, stuff like this:

But looking at a test image from GIMP posterization, it clearly has single-color single pixel regions, so Posterize isn't doing any sort of despeckling:

[–] [email protected] 7 points 3 weeks ago

this worked perfectly thank you

[–] [email protected] 8 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I'm pretty sure imagemagick posterize would allow you to specify a palette but I've not done it myself

Edit: this seems to be what you're after

[–] [email protected] 4 points 3 weeks ago

perfect thank you