Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Show picture+Make it disapear after a Delay
Re: Show picture+Make it disapear after a Delay
Hi guys,
I am not having any success with the alpha channel of a PNG using this script.
Enclosed is the PNG file in a ZIP, because it seems that the forum strips the alpha channel. The alpha.png file in the ZIP has an alpha channel which is a horizontal gradient.
The file is correct, because I tested it on a web page with a background image: However, this is the result I get with this script when showing the file on the desktop: All I get is the transparency showing some kind of grey background instead.
Am I doing something wrong, or is there some limitation of wxPython that I am not aware of. Right now I have no experience with wxPython. I need to finish learning Python first.
Eventually I want to implement a semitransparent screen overlay with text and graphics. Without semitransparency, the idea is dead in the water. It would be great if it could become some sort of GDI plugin, if you see what I mean.
Anyway, thanks for your time...
I am not having any success with the alpha channel of a PNG using this script.
Enclosed is the PNG file in a ZIP, because it seems that the forum strips the alpha channel. The alpha.png file in the ZIP has an alpha channel which is a horizontal gradient.
The file is correct, because I tested it on a web page with a background image: However, this is the result I get with this script when showing the file on the desktop: All I get is the transparency showing some kind of grey background instead.
Am I doing something wrong, or is there some limitation of wxPython that I am not aware of. Right now I have no experience with wxPython. I need to finish learning Python first.
Eventually I want to implement a semitransparent screen overlay with text and graphics. Without semitransparency, the idea is dead in the water. It would be great if it could become some sort of GDI plugin, if you see what I mean.
Anyway, thanks for your time...
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Show picture+Make it disapear after a Delay
You're right, I can confirm.
Both actions (System.ShowPicture and System.DisplayImage) displays the file incorrectly.
I tried a simple thing. I used it as an "icon" in PushBullet plugin (action Push mirror) and it looked like this:This means properly.
And since I'm the author PushBullet plugin and also the action System.DisplayImage, so it should not be a big problem to fix it.
Pako
Both actions (System.ShowPicture and System.DisplayImage) displays the file incorrectly.
I tried a simple thing. I used it as an "icon" in PushBullet plugin (action Push mirror) and it looked like this:This means properly.
And since I'm the author PushBullet plugin and also the action System.DisplayImage, so it should not be a big problem to fix it.
Pako
Re: Show picture+Make it disapear after a Delay
Aah, thanks Pako
I was thinking that I would have to learn ctypes to program GDI and DCs directly...
I will take a look at PushBullet sometime since I am not familiar with it.
Thanks for everything that you do...
You can have one of the roses in my hand over there while I go out to buy you a beer.
I was thinking that I would have to learn ctypes to program GDI and DCs directly...
I will take a look at PushBullet sometime since I am not familiar with it.
Thanks for everything that you do...
You can have one of the roses in my hand over there while I go out to buy you a beer.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
Re: Show picture+Make it disapear after a Delay
Okay, so I should be looking at PIL then... thanks for pointing me in the right direction.
I'll have to get the docs for that too.
I'll have to get the docs for that too.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Show picture+Make it disapear after a Delay
I'm a bit improved behavior of Display Image action.
Now is better taken into account the value of the alpha channel:However, I do not think it will be sometime in the future so perfect that will be rendered semi-transparent image on a transparent background.
I'm not saying it's impossible. But it is at least very difficult, and I have no interest in spending more time on it.
Modified System plugin can be downloaded here.
Pako
Now is better taken into account the value of the alpha channel:However, I do not think it will be sometime in the future so perfect that will be rendered semi-transparent image on a transparent background.
I'm not saying it's impossible. But it is at least very difficult, and I have no interest in spending more time on it.
Modified System plugin can be downloaded here.
Pako
- Attachments
-
- __init__.py
- Plugin System
- (68.22 KiB) Downloaded 199 times
Re: Show picture+Make it disapear after a Delay
Thanks Pako, I'll take a look at it
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
Re: Show picture+Make it disapear after a Delay
Thanks for your effort Pako, you don't need to spend any more time with this.
I just want to clarify what I said earlier.
The result.png image obtained previously did not use System.ShowPicture or System.DisplayImage, but used the script that you posted here for themaster1 in 2011.
System.ShowPicture ignores all transparency and alpha values: The original System.DisplayImage: The new System.DisplayImage: In the old and new System.DisplayImage cases, alpha < 127 is opaque, and alpha > 127 is transparent.
There is a slight visible difference between the two versions, but I don't think the modification is worth releasing.
The script from the 2011 post was more effective, it resulted in displaying the whole image.
An interesting observation about the script: you can only drag and click the non-transparent regions... Cool! I can already envision OnScreen Sliders and other GUI controls.
Try the script with this image:
(see the next post)
Anyway, back to the alpha channel. I will start with the script implementation and see if I can do anything with that. A look at the WxPython website is probably a good idea, but it looks like it might have to be GDI and DCs. If I get anywhere, then this will continue in the Coding forum, with a note about that here.
I just want to clarify what I said earlier.
The result.png image obtained previously did not use System.ShowPicture or System.DisplayImage, but used the script that you posted here for themaster1 in 2011.
System.ShowPicture ignores all transparency and alpha values: The original System.DisplayImage: The new System.DisplayImage: In the old and new System.DisplayImage cases, alpha < 127 is opaque, and alpha > 127 is transparent.
There is a slight visible difference between the two versions, but I don't think the modification is worth releasing.
The script from the 2011 post was more effective, it resulted in displaying the whole image.
An interesting observation about the script: you can only drag and click the non-transparent regions... Cool! I can already envision OnScreen Sliders and other GUI controls.
Try the script with this image:
(see the next post)
Anyway, back to the alpha channel. I will start with the script implementation and see if I can do anything with that. A look at the WxPython website is probably a good idea, but it looks like it might have to be GDI and DCs. If I get anywhere, then this will continue in the Coding forum, with a note about that here.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
Re: Show picture+Make it disapear after a Delay
Here is the other image for the previous post:
(I just found out that each post can only have 3 attachments)
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Show picture+Make it disapear after a Delay
Yes this is the default behavior.WharfRat wrote:In the old and new System.DisplayImage cases, alpha < 127 is opaque, and alpha > 127 is transparent.
It would be possible to add the option to choose the threshold (from 0 to 255).
I think that you are not right.WharfRat wrote:There is a slight visible difference between the two versions, but I don't think the modification is worth releasing.
The difference is especially noticeable when the Shaped window (if alpha channel exists) option is unchecked.
Note: The difference between the old and the new version is more:
- Background color behavior
- Doubleclick behavior [when Shaped window (if alpha channel exists) option is unchecked]
Re: Show picture+Make it disapear after a Delay
I must apologize for not testing the modification more thoroughly. Yes, System.DisplayImage does work better now:
I was also not aware of the double-click feature. So sorry...
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
Re: Show picture+Make it disapear after a Delay
Something just occurred to me...
All this time I have been wanting a partially transparent image.
Maybe I should use a chessboard pattern in the alpha channel instead.
I think the technique is called 'half-toning' or something like that.
Better get back to GIMP.
This seems to be the easiest solution, I'll try it now.
All this time I have been wanting a partially transparent image.
Maybe I should use a chessboard pattern in the alpha channel instead.
I think the technique is called 'half-toning' or something like that.
Better get back to GIMP.
This seems to be the easiest solution, I'll try it now.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Show picture+Make it disapear after a Delay
You do not have to apologize.WharfRat wrote:I was also not aware of the double-click feature. So sorry...
I think that almost nobody knows.
I did no promotion for it: New action System\Display Image
But I've long ago given up. Usually when I do something new, most people have no interest in it.
So why would I bother (write English is difficult for me).
Pako
Re: Show picture+Make it disapear after a Delay
Sadly, on my system, the DisplayImage action takes about 10 seconds to process before the image is displayed. I can only guess that it has to calculate the shaped window thing.
Let me also say that this was using the original System.DisplayImage and not the newer one, although I will test it with that one later.
By the way, I am always very interested in what you do.
No one can afford to miss a thing.
I understand everything you have written perfectly.
Even your humour comes through clearly (uncle Google, the problem is on the other side of the screen, etc.), I still laugh at those two.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)