Sign in to follow this  
Followers 0
ChrisL

Gifs containing white

8 posts in this topic

Any ideas why creating a GUI with a transparrent gif which includes a lot of white, the white area appears mostly transparrent?

#include <GUIConstants.au3>

$Form1_1 = GUICreate("Fujifilm Monitoring Service", 471, 288, -1,-1, BitOR($WS_CAPTION, $WS_CLIPSIBLINGS))

$Fujitech = GUICtrlCreateButton("Fujitech", 48, 150, 120, 50, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Tahoma")
$Printcare1 = GUICtrlCreateButton("Printcare1", 178, 150, 120, 50, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Tahoma")
$Printcare2 = GUICtrlCreateButton("Printcare2", 312, 150, 120, 50, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Tahoma")
$Comments = GUICtrlCreateButton("Comments", 104, 208, 120, 50, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Tahoma")
$BatchPrint = GUICtrlCreateButton("Batch Print", 240, 208, 120, 50, 0)
GUICtrlSetFont(-1, 9, 400, 0, "Tahoma")
$bottom = GUICtrlCreateLabel("Stretch 2007 ish", 390, 273, 82, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Tahoma")

GUICtrlSetTip(-1, "Its all cock...")

$pic=GUICreate("", 409, 126, 37, 8, $WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$Form1_1)
$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.gif", 0,0, 0,0, BitOR($SS_NOTIFY,$WS_GROUP))
GUISetState(@SW_SHOW,$pic)
GUISetState(@SW_SHOW,$Form1_1)

While 1
Sleep (1000)
Wend

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

AutoIt takes the top-left pixel-color as the 'transparant color value'.

It took me ages to figure this out.. I think it's a bug and have reported it but it turns out to be 'unreproducible'..

Edit: Here's the file you should use: Please download it quickly, for I will remove it shortly..

For those reading this at a later date, I have made the edges color 0xFF00FF and then AutoIt saw that color as the transparant one, I recommend to fix your solution you do the same.

Edited by Manadar

Share this post


Link to post
Share on other sites

AutoIt takes the top-left pixel-color as the 'transparant color value'.

It took me ages to figure this out.. I think it's a bug and have reported it but it turns out to be 'unreproducible'..

Edit: Here's the file you should use: Please download it quickly, for I will remove it shortly..

For those reading this at a later date, I have made the edges color 0xFF00FF and then AutoIt saw that color as the transparant one, I recommend to fix your solution you do the same.

Thanks but is still doesn't work.

All of the white is transparent, I don't want the white transparrent.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

When i combine your script, with my logo, it works. The problem you are experiencing is probably somewhere located here:

$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.gif", 0,0, 0,0, BitOR($SS_NOTIFY,$WS_GROUP))

$Pic1 = GUICtrlCreatePic(@ScriptDir & "\logo.gif", 0,0, 0,0, BitOR($SS_NOTIFY,$WS_GROUP))

And place the logo in the same folder as the script.

Edited by Manadar

Share this post


Link to post
Share on other sites

When i combine your script, with my logo, it works. The problem you are experiencing is probably somewhere located here:

$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.gif", 0,0, 0,0, BitOR($SS_NOTIFY,$WS_GROUP))

$Pic1 = GUICtrlCreatePic(@ScriptDir & "\logo.gif", 0,0, 0,0, BitOR($SS_NOTIFY,$WS_GROUP))

And place the logo in the same folder as the script.

Funnily enough if I use a grey instead of your pink it seems to work, Thanks

Share this post


Link to post
Share on other sites

This old post saved my life :whistle:

Thanks


Sorry for my Bad English.

Share this post


Link to post
Share on other sites

This old post saved my life :lmao:

Thanks

No problem. I always thought someone would find this helpful!

It took me quite some time to figure out what AutoIt behavior was on gif's exactly, as there was no fancy PNG shading and everything. :whistle:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0