Gimp-Forum.net

Full Version: ofn-erase-background
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
That's very odd.

I tried it with a 640x400 image and got the border as described by Espermaschine

If I then cropped it to 300x300, or made a new image 300x300 then I don't get a border !?

Keeping the aspect ratio:
500x312 = border
400x249 = border
390x243 = border
383x240 = no border
375x234 = no border
Curiouser and curiouser. Still works OK for me, even on a 800x600 text image.

I notice that both of you are on Windows... but are you using the latest version(*)?

(*) header says: "v0.2: 2016-10-31: Replace color-to-alpha with bucket-fill in color-erase mode"
Im on win7 64bit.

(10-31-2016, 02:37 PM)Ofnuts Wrote: [ -> ]Just in case this is the C2A plugin, I changed the code to use the bucket-fill in color-erase mode, which is strictly equivalent. Can you donwload latest (zip is 2723 bytes) and give it a shot?

I downloaded the new script version.
I get the exact same results with the console as before (progress bar stuck at approx. 95%; color gets removed anyway), but when i use fuzzy select plus script, i get the borders again (on a 640x400px canvas).
Hmm. I can reproduce the problem... in a WinXP virtual box. So it looks Windows-specific. News at 10 Smile
(10-31-2016, 08:10 PM)Ofnuts Wrote: [ -> ]News at 10 Smile

Does not run on my machine.
I think I cornered it... plugin-pixelize doesn't produce the same result on Windows and Linux (both in 2.8.18).
OK, need volunteers on Windows. Try this:
  • Start Gimp (need a fresh Gimp instance)
  • Create a 800x800 image
  • Add an alpha channel to the white background
  • Make a rectangle selection that covers on half of the rectangle
  • [delete]
  • You should know have a layer which is pure white on one half andfully transparent on the other
  • Using the pointer dialog you can verify that the transparent bit is still 255,255,255, only the alpha changed.
  • Remove the selection
  • Filter>Blur pixellize and use a tile as big as the image (800x800)
  • Use the pointer dialog again. The image should be a very drak gray (I get 44,44,44) with an alpha of 127.
Now, do the same thing on a small image (200x200). Your result should be half-transparent white
(255,255,255,127). If you confirm this I'll file a bug...

The script doesn't work because on "big" images (actually, big selections...), pixellize is producing the wrong color so the Color-erase which uses it doesn't work properly.
OK, uploaded a "fixed" version that doesn't attempt to determine the color to remove. Instead it will use the background color as set in the Tools palette for this.
(10-31-2016, 10:14 PM)Ofnuts Wrote: [ -> ]OK, need volunteers on Windows. Try this:

  • Start Gimp (need a fresh Gimp instance)
  • Create a 800x800 image
  • Add an alpha channel to the white background
  • Make a rectangle selection that covers on half of the rectangle
  • [delete]
  • You should know have a layer which is pure white on one half andfully transparent on the other
  • Using the pointer dialog you can verify that the transparent bit is still 255,255,255, only the alpha changed.
  • Remove the selection
  • Filter>Blur pixellize and use a tile as big as the image (800x800)
  • Use the pointer dialog again. The image should be a very drak gray (I get 44,44,44) with an alpha of 127.

Now, do the same thing on a small image (200x200). Your result should be half-transparent white
(255,255,255,127). If you confirm this I'll file a bug...

Confirmed. I followed your steps and the outcome is exactly the way you describe it.

(10-31-2016, 10:28 PM)Ofnuts Wrote: [ -> ]OK, uploaded a "fixed" version that doesn't attempt to determine the color to remove. Instead it will use the background color as set in the Tools palette for this.

It worked on a white BG with a black circle, but when i used a red BG with a green circle, i was left with a border again.
(10-31-2016, 10:51 PM)Espermaschine Wrote: [ -> ]
(10-31-2016, 10:14 PM)Ofnuts Wrote: [ -> ]OK, need volunteers on Windows. Try this:

  • Start Gimp (need a fresh Gimp instance)
  • Create a 800x800 image
  • Add an alpha channel to the white background
  • Make a rectangle selection that covers on half of the rectangle
  • [delete]
  • You should know have a layer which is pure white on one half andfully transparent on the other
  • Using the pointer dialog you can verify that the transparent bit is still 255,255,255, only the alpha changed.
  • Remove the selection
  • Filter>Blur pixellize and use a tile as big as the image (800x800)
  • Use the pointer dialog again. The image should be a very drak gray (I get 44,44,44) with an alpha of 127.

Now, do the same thing on a small image (200x200). Your result should be half-transparent white
(255,255,255,127). If you confirm this I'll file a bug...

Confirmed. I followed your steps and the outcome is exactly the way you describe it.

(10-31-2016, 10:28 PM)Ofnuts Wrote: [ -> ]OK, uploaded a "fixed" version that doesn't attempt to determine the color to remove. Instead it will use the background color as set in the Tools palette for this.

It worked on a white BG with a black circle, but when i used a red BG with a green circle, i was left with a border again.

Did you set Gimp's paint background color to match (for instance using the color picker) before calling the script?

[attachment=75]
Pages: 1 2 3 4