Transparent PNG alpha channel window

Just starting out? Need help? Post your questions and find answers here.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: Transparent PNG alpha channel window

Post by Olli »

netmaestro wrote:How to achieve faster performance for the blur ?
If we have a set of pixel like below:

Code: Select all

0000F0000
If we grab this set and display it in two times :
- in a left shift
- in a right shift
through an graduate alphablending, the result is:

Code: Select all

0007F7000
This provides a blur on a line.

Now, on a plane, let's imagine 8 specific alpha values for the 8 directions over a pixel :

Code: Select all

 a  b  a
 b  P  b
 a  b  a
where a = sqr(2)/4 and
b = 1/2

If we do a grab of an image and apply 8 copies of this image matching the eight following shifts:

Code: Select all

 x  y  alpha
-1 -1  a
-1  0  b
-1 +1 a
 0 -1  b
 0 +1 b
+1 -1  a
+1  0  b
+1 +1 a
A fast blur is done. We can make fast blur, but the cumulative result is not mathematical. So, we must choose between a slow perfect blur, or a fast cumulative blur.
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Transparent PNG alpha channel window

Post by Caronte3D »

Blur is an expensive algorithm, I think the only solution to get good speed/quality on large sizes, is to use the GPU :?
I hope someone have the knowledge to do it, would be a nice effect for many things.
Kudos! 8)
punak
User
User
Posts: 63
Joined: Tue Sep 07, 2021 12:08 pm

Re: Transparent PNG alpha channel window

Post by punak »

@netmaestro: Have you seen this source? i do not know if it runs on Windows 8 or not. it is possible to find out what method he uses to blur the window?
https://github.com/alexmercerind/flutter_acrylic

for Windows 8: (free)
http://glass8.eu/guide

I just do not know how to use these in pb.
punak
User
User
Posts: 63
Joined: Tue Sep 07, 2021 12:08 pm

Re: Transparent PNG alpha channel window

Post by punak »

@netmaestro : do you have any news of the progress of the work to present?
Post Reply