RSS/Atom feed Twitter
Site is read-only, email is disabled

Bug with Sobel filter !

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Bug with Sobel filter ? G.DeSercey@bton.ac.uk 25 Jul 17:33
  Bug with Sobel filter ? Guillermo S. Romero / Familia Romero 25 Jul 18:20
  Bug with Sobel filter ! Joao S. O. Bueno 25 Jul 18:47
G.DeSercey@bton.ac.uk
2003-07-25 17:33:12 UTC (over 20 years ago)

Bug with Sobel filter ?

Hello,

I think I've found a bug with the sobel filter. However before I fill a bug report I'd like to know if it is just specific to the windows version. Can people on Linux reproduce this:

-Create a new image (default: 256 x 256, white background) -Swap foreground and background colour so that white is foreground -Use the text tool to create some text, do not anchor the text but promote it to a new layer
-text layer to image size
-uncheck keep transparency
-Apply sobel

This result in the outline of the text layer before it was resized. How can that be ?

However if you do this (which should be equivalent to what is above):

-Create a new image(default: 256 x 256, white background) -Swap foreground and background colour so that white is foreground -Create a new transparent layer
-Use the text tool to create some text, anchor it to the transparent layer The result is the same as above but when I apply sobel, it works

Guillaume

Guillermo S. Romero / Familia Romero
2003-07-25 18:20:08 UTC (over 20 years ago)

Bug with Sobel filter ?

G.DeSercey@bton.ac.uk (2003-07-25 at 1633.12 +0100):

I think I've found a bug with the sobel filter. However before I fill a bug report I'd like to know if it is just specific to the windows version. Can people on Linux reproduce this:

I think it is due the way pixels are initialized. Transparent has colour, just not shown. ;]

Use unerase to see the colour, instead of sobel. In first case you get the old area in white, then grow area in black. In second case all is black. New area created by layer to image size is black, and text function fills all with FG, and just does the heavy work in the alpha channel.

Lots of code has to be reviewed and checked for this kind of problems, But what do you do in text and grow cases? Fill with BG a pixel away from text limit? Fill with black? You have to fill with something, the RGB part of RGBA can not have a "undefined" (blame computers ;] ). In sobel case, probably check Alpha channel to avoid operation in transparent areas (supposing it makes sense and can be done), but that is a different thing than text and grow operations.

GSR

Joao S. O. Bueno
2003-07-25 18:47:22 UTC (over 20 years ago)

Bug with Sobel filter !

Hi.

I just tried it with gim 1.2.5 on a GNU/Linux system, it did happen here.

I figured out what is happening, and indeed, it may be filled in as a bug.

It happens that a transparente region of the layer has got hidden RGB information. This is unseen, but you can maximize the alpha channel to Full opacity using the Curves tool.

What happens is that the text tool sets the RGB color in the transparent region to a different color than Layer to Image Size does.

The Sobel filter - and here is your bug - seens to ignore the alpha channel when doing it's work. Thus, your layer is seen as a white rectangle surrounded by a black background, by the Sobel filter.

If you happen to have gimp-perl working, use Image->Alpha->Clear Alpha before applying the sobel filter and it will work.

Actually this whole procedure shows up a bug in the text tool also - the background color it uses should not be the same as the foreground.

But since the text tool is being totally rewritten for the next GIMP, and this bug doesn't "byte", you can leave it off the reports, IMHO.

JS ->

G.DeSercey@bton.ac.uk wrote:

Hello,

I think I've found a bug with the sobel filter. However before I fill a bug report I'd like to know if it is just specific to the windows version. Can people on Linux reproduce this:

-Create a new image (default: 256 x 256, white background) -Swap foreground and background colour so that white is foreground -Use the text tool to create some text, do not anchor the text but promote it to a new layer
-text layer to image size
-uncheck keep transparency
-Apply sobel

This result in the outline of the text layer before it was resized. How can that be ?

However if you do this (which should be equivalent to what is above):

-Create a new image(default: 256 x 256, white background) -Swap foreground and background colour so that white is foreground -Create a new transparent layer
-Use the text tool to create some text, anchor it to the transparent layer The result is the same as above but when I apply sobel, it works

Guillaume