Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing White Pixels from Grayscale
#1
I have used Gimp a bit in the past but have decided to adopt it as my main image editing software.

One of my most frequently performed tasks in Photoshop is removing the white background from pure black-and-white grayscales by dragging the gray channel onto the dotted circle option in the channel menu (sorry, away from my laptop at the moment so can't be more precise) which selects all the white pixels allowing me to delete the white pixels in one fell swoop.

Is there an equivalent workflow in Gimp? Thanks!
Reply
#2
Maybe Gimp menu: Color -> Color-to-alpha
see: https://docs.gimp.org/en/plug-in-colortoalpha.html

White is the default to remove

edit: If the menu entry is greyed out your black/white image is in indexed/grey mode. Change to RGB Gimp menu: Image -> Mode -> RGB

sorry, I have absolutely no idea what PS..dotted circle option in the channel menu is

another edit: Since you are using a Mac and Gimp help might not be installed a useful resource is the Gimp help in PDF format see: http://gimp.linux.it/www/meta/
Reply
#3
(02-03-2018, 07:19 PM)pongiste Wrote: I have used Gimp a bit in the past but have decided to adopt it as my main image editing software.

One of my most frequently performed tasks in Photoshop is removing the white background from pure black-and-white grayscales by dragging the gray channel onto the dotted circle option in the channel menu (sorry, away from my laptop at the moment so can't be more precise) which selects all the white pixels allowing me to delete the white pixels in one fell swoop.

Is there an equivalent workflow in Gimp? Thanks!

To select all the white pixels, use the color selector ( SelectByColor ) and click on any white pixel.

But as Rich says, Color-to-alpha may give better results.
Reply
#4
rich2005 Wrote:sorry, I have absolutely no idea what PS..dotted circle option in the channel menu is

load selection from channel


(02-03-2018, 08:33 PM)Ofnuts Wrote: But as Rich says, Color-to-alpha may give better results.

ofn-erase-background !!
Reply
#5
(02-04-2018, 03:21 AM)Espermaschine Wrote:
rich2005 Wrote:sorry, I have absolutely no idea what PS..dotted circle option in the channel menu is

load selection from channel
Then it's Open Layer list>Right click channel>Channel to selection

(02-04-2018, 03:21 AM)Espermaschine Wrote:
(02-03-2018, 08:33 PM)Ofnuts Wrote: But as Rich says, Color-to-alpha may give better results.

ofn-erase-background !!
Possibly, but the problem hasn't been exposed as a high-level goal...
Reply
#6
(02-04-2018, 07:27 AM)Ofnuts Wrote:
(02-04-2018, 03:21 AM)Espermaschine Wrote: ofn-erase-background !!

Possibly, but the problem hasn't been exposed as a high-level goal...

Well the PS routine leaves the semi transparent pixels as a white-ish halo and OP is trying to get rid of the background.
So your script is the best tool for the job.



P.S: what is a high level-goal ?
Reply
#7
High level (aka "X"): I want to remove the background
Low level (aka "Y"): I want to select the white pixels to delete them

See https://meta.stackexchange.com/a/66378/329457
Reply
#8
Another day, another way. Without having to go out of greyscale. Maybe this is PS equivalent.

Copy-paste-anchor an image copy into a layer mask.
Colour -> Invert the layermask.

[Image: yytUeVU.jpg]
Reply
#9
(02-04-2018, 08:16 AM)Ofnuts Wrote: See https://meta.stackexchange.com/a/66378/329457

That is some level 30 wizard stuff in a world full of 5 XP apprentices XD
Reply
#10
(02-04-2018, 08:31 AM)rich2005 Wrote: Another day, another way. Without having to go out of greyscale. Maybe this is PS equivalent.

Copy-paste-anchor an image copy into a layer mask.
Colour -> Invert the layermask.

Much simpler to do Layer>Add layer mask, and tick "Init with grayscale copy of layer", and "invert mask".
Reply


Forum Jump: