Blurring alphatransparent images

You think you have found a bug ? You've got a suggestion to modify PhotoFiltre ? /
Ĉu vi opinias vi trovis malbonadĵon ? Ĉu vi havas sugeston por modifi PhotoFiltre ?

Modérateur : Modérateurs

Répondre
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Blurring alphatransparent images

Message par Pac-Man »

Hi there,

do you think you could make it possible to blur alphatransparent images? Actually, blurring only affects the colors of the pixels, not the transparency value. E.g. you could make the borders less sharp with blurring images which are alpha transparent. As seen in the dices in the background of this picture:
Image

Actually resizing alphatransparent images still doesn't correctly compute the alpha transparency (borders become black if the image size was decreased).

I'm working much with alphatransparency but I have to use other programs to workaround the problems stated above ;D
Tom
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 13191
Inscription : 02 févr. 2005 9:35
Contact :

Re: Blurring alphatransparent images

Message par Tom »

Hi,

i have tried to blur and reduce size of image and i don't see what you are talking about. :shock:
I get no black borders when i decrease the size either of the image or the layer,
but the png image must be opened as image or layer, and not be pasted as new image.
Bien plus facile avec PhotoFiltre. Cordialement.
. . Image . . Image
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Re: Blurring alphatransparent images

Message par Pac-Man »

It depends on the "color" of the fully transparent pixels. If they are black (RGBA 0, 0, 0, 0), a black border is going to appear at blurring or resizing. You won't see this effect so heavily if the transparent pixels have a white color (RGBA 255, 255, 255, 0), but it is certainly ugly with mixed colors of transparent pixels (like RGBA 255, 0, 0, 0).

Here are some reference images explaining what I mean ;)
In the first column you see the original image. In the second column you see the background pixels made visible. Notice that the shadow around Pac-Mans feet is totally black. When blurring, you can slightly see a black border coming up around his shoes.
This effect can be seen clearly after making the transparent pixels red. If I start blurring the image, a red border appears around the whole image.

In the first image of last row, you can see that blurring doesn't make borders really blurry, only the "inner content".
The second image there is a blurring how I would expect it, done with Inkscape.
The third image shows a scaled down version of Pac-Man, left made with PFS, right with inkscape. Zoom in and you can see opaque black pixels at the bottom right outline of the character (mostly near the shoes) in photofiltre, those are a result of background pixels which became opaque after decreasing the image size.
Image
Tom
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 13191
Inscription : 02 févr. 2005 9:35
Contact :

Re: Blurring alphatransparent images

Message par Tom »

Did you try in the Preferences panel, thumbnail Other, to check or uncheck : Expand layer for drawing, and Draw on Alpha transparency ?
Generaly it gets some rather different behaviours. :|

I would appreciate to try with an original pac-man in png format with transparency. :)
Bien plus facile avec PhotoFiltre. Cordialement.
. . Image . . Image
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Re: Blurring alphatransparent images

Message par Pac-Man »

The two options are checked at the moment. I don't get any differencies if I disable one of it or both, I have the same issues as seen above :(

I've uploaded the testing image here: http://pacman.highfsb.com/pacman.png
Tom
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 13191
Inscription : 02 févr. 2005 9:35
Contact :

Re: Blurring alphatransparent images

Message par Tom »

Yes you are right, i have just understood. When bluring the Alpha channel is not processed, it's true.
I will tell that to Antonio.
Bien plus facile avec PhotoFiltre. Cordialement.
. . Image . . Image
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Re: Blurring alphatransparent images

Message par Pac-Man »

Thank you so much!
The alphatransparency support is the only thing I dislike about PFS, all the other stuff is great ;)
Tom
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 13191
Inscription : 02 févr. 2005 9:35
Contact :

Re: Blurring alphatransparent images

Message par Tom »

Ok the message is done to Antonio.
I use transparency for retouch quite each photo taken by my wife, for enhance them a little bit by a contrast mask application, and if i compare with The Gimp,
It's realy very fast to paste a mask as Alpha channel, even if it's easier to bind a mask to a layer in Gimp.

For the problem related you can extract the Alpha channel to blur it, but not necessarily at the same level as RVB channel.
After that you can paste again the Mask as Alpha channel. Alt + Y + A + P
Other way you can also use the Border effect as progressive contour with a radius control.
Bien plus facile avec PhotoFiltre. Cordialement.
. . Image . . Image
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Re: Blurring alphatransparent images

Message par Pac-Man »

Thanks for the tips. I've already found that "Edit Alpha channel" feature but were never able to use it back in the source channel (all I had was the black-white mask in another window seperated from the original image). You said something like that can be done with Alt + Y + A + P but I'm using the German language file and the hotkeys changed :(
Tom
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 13191
Inscription : 02 févr. 2005 9:35
Contact :

Re: Blurring alphatransparent images

Message par Tom »

Ach so ! :) It's quite so easy in German language, for most of all Windows Applications :
Press an hold the Alt key and you can observe un underscore line which appears above one letter of each function.
The compleat path in english is : Layer/Transparency/Paste as Alpha channel.

I have'nt a very good memory, but for repetitives items i use systematicaly the key short-cuts.
Bien plus facile avec PhotoFiltre. Cordialement.
. . Image . . Image
Pac-Man
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 24
Inscription : 17 août 2009 17:17

Re: Blurring alphatransparent images

Message par Pac-Man »

Thanks for the advice! That gives me some nicer sounds than smoothing the sharp borders. However it's not perfect (colors of the transparent pixels still blending in like the red border in the extreme example seen above) but the best workaround yet.
Example without the exaggerated background colors:
Image

Using the method for decreasing the image sizes gives a perfect result (didn't test it with red background colors yet), at least I couldn't spot any ugly pixels anymore.
Répondre