Score:1

GIMP: How do I make all pixels transparent except for ones with a certain color?

ae flag

Not sure if this is the right place for this, but I did see another GIMP question on this forum, so here we go:

I have an image of a hand-written note written in blue ink on lined paper. The lines are black. What I'd like to do is to make everything except for the writing transparent. So the end result should be a transparent png with just the blue writing on it. Is this doable in GIMP? I mean because of the lighting, not all of the blue pixels will have the same RGB value even though it was written in the same ink. So, do I define a range or something?

cn flag
or go the other way: select the black text and put it on another layer. Then make the 1st layer transparent or remove it. I doubt gimp can do a range of colors. as a coder i would use python: get each pixel, and make it transparent if between 2 hex codes ;-)
n00dles avatar
ae flag
@Rinzwind I suppose this would be easier with Python. Guess I'll just use OpenCV then.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.