[Gimp-user] Turn black background into white -- with fuzzy edges
Hi, I'd like to turn a black background into white, or transparency (in which case it should look cut if displayed on a white background). My practical use case is photos of objects with black backgrounds that I'd like to improve for Wikipedia. The problem is that the boundary between background and object is usually fuzzy. I've created a pair of example images (attached): Say I start off with the image fuzzy-circle.png (a gray-patterned circle on a black background); what I would like to get is something like fuzzy-circle-goal.png (the gray-patterned circle on a white background) -- but that seems pretty hard to achieve: If I select by color: black and then cut the selection, the corners look either aliased/too sharp (for high thresholds in the select-by-color tool), or they have dark pixels in them (for low thresholds). Selecting the black background, growing the selection (2px), feathering it (2px), and then cutting the selection *kinda* works, but it cuts off the blurry part of the object boundary. Any ideas on this one? Best wishes, Lea inline: fuzzy-circle.pnginline: fuzzy-circle-goal.pnginline: fuzzy-circle-too-sharp.pnginline: fuzzy-circle-darks-pixels.png___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
In GIMP 2.2, If I use a selection tool (such as rectangle, elipse, freehand, etc) then once the selection is made and I release the mouse button, I can click and drag the contents of that selected area. However this behaviour has changed in 2.4 and trying to drag the selection now just moves the selection outline rather than the contents itself (previously done by holding Alt down while dragging). Is there any way to restore the old behaviour or do I now have to hold down keys to drag contents? Also, if I select an area and then choose the fill tool, 2.4 only fills that area if I click directly on it while previous versions would let me click anywhere on the entire layer to make the fill. Can this behavior anso be restored (it still works as expected when drawing gradients in selections)? It makes matters worse when you select an area with low alpha values and the marchin ants outline either doesn't appear or only covers tiny areas. And on the subject of filling, am I right in percieving filling to be notably slower than it was in 2.2? Another annoyance is that I no longer seem able to hold the Ctrl key down while clicking on a palet colour to set the background colour. Can this also be restored? Additionally, I've encountered an annoyance that has appeared in 2.4. When saving an image as a JPG, the first dialogue to pop up is the large one asking for the file name and path. Then, the next one to appear is the one with the JPEG settings, which of course has an option to preview the image before saving. However, the large save dialogue is now always above the window containing the image so you can't actually see the image unless you drag the save dialogue off of the screen. The JPEG settings window still goes behind the image window, it's only the 'save' dialogue that won't go below it. Can this be fixed? Oh, I also notice that when I use the quick eye dropper in the colour dock, the colour it sets is wrong. It's lighter than the actual colour I clicked on. The main eye dropper tool sets the colour correctly so is this a bug? This is all in GIMP 2.4.2 on Windows XP so I'm not sure if that last issue applies to any other platforms. _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Turn black background into white -- with fuzzy edges
On Mon, 26 Nov 2007 03:59:23 -0500 Lea Wiemann [EMAIL PROTECTED] wrote: Hi, I'd like to turn a black background into white, or transparency (in which case it should look cut if displayed on a white background). My practical use case is photos of objects with black backgrounds that I'd like to improve for Wikipedia. The problem is that the boundary between background and object is usually fuzzy. I've created a pair of example images (attached): Say I start off with the image fuzzy-circle.png (a gray-patterned circle on a black background); what I would like to get is something like fuzzy-circle-goal.png (the gray-patterned circle on a white background) -- but that seems pretty hard to achieve: If I select by color: black and then cut the selection, the corners look either aliased/too sharp (for high thresholds in the select-by-color tool), or they have dark pixels in them (for low thresholds). Selecting the black background, growing the selection (2px), feathering it (2px), and then cutting the selection *kinda* works, but it cuts off the blurry part of the object boundary. Any ideas on this one? If you are using 2.4, Colours-Colour to alpha or in 2.2 Filters-Colours-Colour to alpha After that, make a new layer and fill with whatever colour you want Owen ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Turn black background into white -- with fuzzy edges
Hi Lea, On Nov 26, 2007 7:29 PM, Lea Wiemann [EMAIL PROTECTED] wrote: Hi, I'd like to turn a black background into white, or transparency (in which case it should look cut if displayed on a white background). My practical use case is photos of objects with black backgrounds that I'd like to improve for Wikipedia. The problem is that the boundary between background and object is usually fuzzy. There is no real good way to do this for arbitrary photos; For this particular photo, the best result I could achieve was by: 1. Use magic wand to select background 2. Convert the selection to a path, and convert the path back into a selection (this has the effect of smoothing the edges of the selection.. PoTrace produces better results than the GIMP sel2path plugin, I assume you have to work with standard GIMP plugins only though.) 3. Fill with white. The result of applying this is attached. Notably this shows a smooth black outline around the object. The method I tried to convert white to black without causing an outline effected the overall color of the object too much instead. (this method was: 1. layers-transparency-color to alpha (select black); 2. flatten with bgcolor = white.) attachment: fuzzy-circle-done.png___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
On Nov 26, 2007 7:48 PM, Shin Diggar [EMAIL PROTECTED] wrote: In GIMP 2.2, If I use a selection tool (such as rectangle, elipse, freehand, etc) then once the selection is made and I release the mouse button, I can click and drag the contents of that selected area. However this behaviour has changed in 2.4 and trying to drag the selection now just moves the selection outline rather than the contents itself (previously done by holding Alt down while dragging). Is there any way to restore the old behaviour or do I now have to hold down keys to drag contents? Ctrl-Alt-Drag to cut the selection and drag it. Alt-Shift-Drag to copy the selection and drag it. The rectangle select and ellipse select tools are not cooperative with these, though. Also, if I select an area and then choose the fill tool, 2.4 only fills that area if I click directly on it while previous versions would let me click anywhere on the entire layer to make the fill. Can this behavior anso be restored (it still works as expected when drawing gradients in selections)? Shift+Click instead, or set the 'fill entire selection' radiobutton in the tool options. It makes matters worse when you select an area with low alpha values and the marchin ants outline either doesn't appear or only covers tiny areas. And on the subject of filling, am I right in percieving filling to be notably slower than it was in 2.2? Another annoyance is that I no longer seem able to hold the Ctrl key down while clicking on a palet colour to set the background colour. Can this also be restored? You are trying to use the new Palette color selector instead of the Palette editor. The palette editor retains that functionality; the Palette color selector never had it (I agree that it should.) Additionally, I've encountered an annoyance that has appeared in 2.4. When saving an image as a JPG, the first dialogue to pop up is the large one asking for the file name and path. Then, the next one to appear is the one with the JPEG settings, which of course has an option to preview the image before saving. However, the large save dialogue is now always above the window containing the image so you can't actually see the image unless you drag the save dialogue off of the screen. The JPEG settings window still goes behind the image window, it's only the 'save' dialogue that won't go below it. Can this be fixed? Oh, I also notice that when I use the quick eye dropper in the colour dock, the colour it sets is wrong. It's lighter than the actual colour I clicked on. The main eye dropper tool sets the colour correctly so is this a bug? They both set the color correctly. The difference is the difference between the displayed color (after color adjustment), and the image color before adjustment. Since the colordock eyedropper picks colors from the screen, it returns the color that is actually displayed, while the eyedropper tool/ ctrl+click with a paint tool returns the color that is stored in the image. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Turn black background into white -- with fuzzy edges
On Nov 26, 2007 3:57 AM, Owen [EMAIL PROTECTED] wrote: On Mon, 26 Nov 2007 03:59:23 -0500 Lea Wiemann [EMAIL PROTECTED] wrote: Any ideas on this one? If you are using 2.4, Colours-Colour to alpha or in 2.2 Filters-Colours-Colour to alpha After that, make a new layer and fill with whatever colour you want Owen I don't know if that satisfies her need, but it is a useful technique I did not know about but will use extensively. Thank you. Dave ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Turn black background into white -- with fuzzy edges
El dl 26 de 11 del 2007 a les 03:59 -0500, en/na Lea Wiemann va escriure: Hi, I'd like to turn a black background into white, or transparency (in which case it should look cut if displayed on a white background). My practical use case is photos of objects with black backgrounds that I'd like to improve for Wikipedia. The problem is that the boundary between background and object is usually fuzzy. I've created a pair of example images (attached): Say I start off with the image fuzzy-circle.png (a gray-patterned circle on a black background); what I would like to get is something like fuzzy-circle-goal.png (the gray-patterned circle on a white background) -- but that seems pretty hard to achieve: If I select by color: black and then cut the selection, the corners look either aliased/too sharp (for high thresholds in the select-by-color tool), or they have dark pixels in them (for low thresholds). Selecting the black background, growing the selection (2px), feathering it (2px), and then cutting the selection *kinda* works, but it cuts off the blurry part of the object boundary. Any ideas on this one? I am doing a script that might help you. It is not specyfic to your purpose but hope it helps. Install mktpstamp.scm from here to your gimp-version/scripts directory http://fornol.no-ip.org/linux/tuxpaint/scripts Then open Gimp Select by fuzzy select or by color black with threshold 50 Show the layers dialog. add a layer mask inverted from selection You get something like fuzzy-circle-darks-pixels.png you posted Active the image, not the mask, add an alpha channel to it. Select by fuzzy select or by color black with threshold 50 grow the selection by the number of pixels needed to cover the dark ones.(1 or 2) CTRL X to delete all the selection. You get a image that lacks the edge pixels, they will be regenerated from the current edges when running the script. Run mktpstamp (It appears in filters artistic in gimp 2.4.x or in script-fu alquemy on 2.2.xx) Uncheck Scale Create .txt file and Create .dat file If you are confident, select a proper filename and keep Save and close. This will make a transparent .png file Else Change Save and close to Don't save and keep for editing. This will make a new image with 4 layers A backup layer two contrast layers and the working layer. You can then make the contrast layers visible/invisible by turn to check if there is any weird effect. When happy fill the green contrast layer with wite or any color you want, flat the image and save. If you want transparency, do a new image from the top layer(just drag the layer to the toolbox) and save it. More instructions to run it you can find at http://sourceforge.net/mailarchive/forum.php?thread_name=1185622883.26911.151.camel%40hola.fou.netforum_name=tuxpaint-devel BTW any comments on how to improve it are welcome. Best wishes, Lea Yours Pere attachment: mystamp.png___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
The alt+shift+drag and ctrl-alt-drag doesn't work for me (gimp 2.4.2 on linux). I didn't find any way to change the mouse shortcuts but maybe I have just not searched enough, if anybody could point me to a right direction I'd be grateful. cheers On 11/26/07, David Gowers [EMAIL PROTECTED] wrote: On Nov 26, 2007 7:48 PM, Shin Diggar [EMAIL PROTECTED] wrote: In GIMP 2.2, If I use a selection tool (such as rectangle, elipse, freehand, etc) then once the selection is made and I release the mouse button, I can click and drag the contents of that selected area. However this behaviour has changed in 2.4 and trying to drag the selection now just moves the selection outline rather than the contents itself (previously done by holding Alt down while dragging). Is there any way to restore the old behaviour or do I now have to hold down keys to drag contents? Ctrl-Alt-Drag to cut the selection and drag it. Alt-Shift-Drag to copy the selection and drag it. The rectangle select and ellipse select tools are not cooperative with these, though. Also, if I select an area and then choose the fill tool, 2.4 only fills that area if I click directly on it while previous versions would let me click anywhere on the entire layer to make the fill. Can this behavior anso be restored (it still works as expected when drawing gradients in selections)? Shift+Click instead, or set the 'fill entire selection' radiobutton in the tool options. It makes matters worse when you select an area with low alpha values and the marchin ants outline either doesn't appear or only covers tiny areas. And on the subject of filling, am I right in percieving filling to be notably slower than it was in 2.2? Another annoyance is that I no longer seem able to hold the Ctrl key down while clicking on a palet colour to set the background colour. Can this also be restored? You are trying to use the new Palette color selector instead of the Palette editor. The palette editor retains that functionality; the Palette color selector never had it (I agree that it should.) Additionally, I've encountered an annoyance that has appeared in 2.4. When saving an image as a JPG, the first dialogue to pop up is the large one asking for the file name and path. Then, the next one to appear is the one with the JPEG settings, which of course has an option to preview the image before saving. However, the large save dialogue is now always above the window containing the image so you can't actually see the image unless you drag the save dialogue off of the screen. The JPEG settings window still goes behind the image window, it's only the 'save' dialogue that won't go below it. Can this be fixed? Oh, I also notice that when I use the quick eye dropper in the colour dock, the colour it sets is wrong. It's lighter than the actual colour I clicked on. The main eye dropper tool sets the colour correctly so is this a bug? They both set the color correctly. The difference is the difference between the displayed color (after color adjustment), and the image color before adjustment. Since the colordock eyedropper picks colors from the screen, it returns the color that is actually displayed, while the eyedropper tool/ ctrl+click with a paint tool returns the color that is stored in the image. ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user -- LEGENY Jozef ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
Hi, On Mon, 2007-11-26 at 21:41 +1030, David Gowers wrote: Ctrl-Alt-Drag to cut the selection and drag it. Alt-Shift-Drag to copy the selection and drag it. The rectangle select and ellipse select tools are not cooperative with these, though. They are. After you committed the selection by pressing Enter. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] tool affect all layers?
In attempting to make photos look as though they are on the pages of a book, I have an image with ten layers. I'd now like to use the curve/bend tool to make the book sink in the middle (spine). Must I flatten the image in order for the tool to affect all ten layers? Thanks, Helen, using Giimp 2.2.10 -- using Linux, SuSE 10 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] tool affect all layers?
Hi, On Mon, 2007-11-26 at 15:04 -0500, Helen wrote: In attempting to make photos look as though they are on the pages of a book, I have an image with ten layers. I'd now like to use the curve/bend tool to make the book sink in the middle (spine). Must I flatten the image in order for the tool to affect all ten layers? You might have luck using the GIMP Animation Package. This is a third-party package that adds functionality which is useful for working on animations. It allows to apply a filter on all layers. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] tool affect all layers?
Thanks Sven -- this seems unreasonable, though, to have to install a plug-in for animation in order to use a tool on all layers. I could not figure any way, so I flattened and saved under a new name and ran the curve/bend on the new file. I wonder if other Gimp users find this to be a limitation. Helen On Nov 26, 2007 3:10 PM, Sven Neumann [EMAIL PROTECTED] wrote: Hi, On Mon, 2007-11-26 at 15:04 -0500, Helen wrote: In attempting to make photos look as though they are on the pages of a book, I have an image with ten layers. I'd now like to use the curve/bend tool to make the book sink in the middle (spine). Must I flatten the image in order for the tool to affect all ten layers? You might have luck using the GIMP Animation Package. This is a third-party package that adds functionality which is useful for working on animations. It allows to apply a filter on all layers. Sven -- using Linux, SuSE 10 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
On Nov 27, 2007 6:31 AM, Sven Neumann [EMAIL PROTECTED] wrote: Hi, On Mon, 2007-11-26 at 21:41 +1030, David Gowers wrote: Ctrl-Alt-Drag to cut the selection and drag it. Alt-Shift-Drag to copy the selection and drag it. The rectangle select and ellipse select tools are not cooperative with these, though. They are. After you committed the selection by pressing Enter. They are not. I specifically tried that before my first reply, and it made no difference. I had to switch to a different selection tool before they would work. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
David Gowers wrote: They are. After you committed the selection by pressing Enter. They are not. I specifically tried that before my first reply, and it made no difference. I had to switch to a different selection tool before they would work. Works fine for me. What is different on your system? Michael -- GIMP http://www.gimp.org | IRC: irc://irc.gimp.org/gimp Wiki http://wiki.gimp.org | .de: http://gimpforum.de Plug-ins http://registry.gimp.org | ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] tool affect all layers?
Hi Helen, On Nov 27, 2007 6:34 AM, Helen [EMAIL PROTECTED] wrote: In attempting to make photos look as though they are on the pages of a book, I have an image with ten layers. I'd now like to use the curve/bend tool to make the book sink in the middle (spine). Must I flatten the image in order for the tool to affect all ten layers? Just use the 'Repeat' action, at the top of the Plugins menu, for each layer. I have a keyboard shortcut assigned to it, so I can just press PgUp, R, PgUp, R ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
Hi, On Tue, 2007-11-27 at 09:33 +1030, David Gowers wrote: They are. After you committed the selection by pressing Enter. They are not. I specifically tried that before my first reply, and it made no difference. I had to switch to a different selection tool before they would work. Definitely works for me. For 2.6 we hope to eliminate the need to confirm the selection before it can be floated. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] tool affect all layers?
I think I have only had to do something like this once. But yes GAP does have a nice add-on that puts in an menu entry for filter all layers. There are other things that GAP comes in handy for. You can use it to make image pipe brushes that would otherwise be a lot of work to do in regular Gimp. I don't like to have Gimp without it, and I imagine there are a lot of Gimpers who think likewise. --- Helen [EMAIL PROTECTED] wrote: Thanks Sven -- this seems unreasonable, though, to have to install a plug-in for animation in order to use a tool on all layers. I could not figure any way, so I flattened and saved under a new name and ran the curve/bend on the new file. I wonder if other Gimp users find this to be a limitation. Helen On Nov 26, 2007 3:10 PM, Sven Neumann [EMAIL PROTECTED] wrote: Hi, On Mon, 2007-11-26 at 15:04 -0500, Helen wrote: In attempting to make photos look as though they are on the pages of a book, I have an image with ten layers. I'd now like to use the curve/bend tool to make the book sink in the middle (spine). Must I flatten the image in order for the tool to affect all ten layers? You might have luck using the GIMP Animation Package. This is a third-party package that adds functionality which is useful for working on animations. It allows to apply a filter on all layers. Sven -- using Linux, SuSE 10 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Changes in select and fill tools in 2.4, and a few new problems
Hi Sven, On Nov 27, 2007 9:40 AM, Sven Neumann [EMAIL PROTECTED] wrote: Hi, On Tue, 2007-11-27 at 09:33 +1030, David Gowers wrote: They are. After you committed the selection by pressing Enter. They are not. I specifically tried that before my first reply, and it made no difference. I had to switch to a different selection tool before they would work. Definitely works for me. Actually, now I try it again on a different picture, it works for me too. Looks like I was trying to cut out an empty part earlier. For 2.6 we hope to eliminate the need to confirm the selection before it can be floated. Sven ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] Turn black background into white -- with fuzzy edges
David Gowers wrote: On Nov 26, 2007 7:29 PM, Lea Wiemann [EMAIL PROTECTED] wrote: I'd like to turn a black background into white [...] The problem is that the boundary between background and object is usually fuzzy. 1. Use magic wand to select background 2. Convert the selection to a path, and convert the path back into a selection 3. Fill with white. Notably this shows a smooth black outline around the object. Cool, thanks a lot! If I grow the resulting selection by 1px before filling with white, I get a very smooth edge without any dark outline (attached). It makes me lose the very outermost pixels of the edge of the object, but I think I can live with that. (In more complex images I found that that the paths needed manual fine-tuning, but it's still fast enough.) Best wishes, Lea inline: fuzzy-circle-done2.png___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user