Bot Posted August 6, 2007 Share Posted August 6, 2007 I have this GIF image :And I tried to make it transparent$gui=GUICreate("test transparentpic", 200, 100) $pic=GUICreate("", 48, 48, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic("C:\start.gif",0,0, 0,0) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui)But the result is :Can anyone help me please ? Link to comment Share on other sites More sharing options...
dufran3 Posted August 6, 2007 Share Posted August 6, 2007 Try looking into thishttp://www.autoitscript.com/forum/index.php?showtopic=47651 Link to comment Share on other sites More sharing options...
ResNullius Posted August 6, 2007 Share Posted August 6, 2007 Or is this what you're looking for?original code by lod3n ( http://www.autoitscript.com/forum/index.ph...st&p=356178 )#include <GUIConstants.au3> $pic = "c:\start.gif" $width = 21 $height = 21 $gui = GUICreate("GUI Transparency", $width, $height, -1, -1, $WS_POPUP, $WS_EX_LAYERED) $pic = GUICtrlCreatePic($pic, 0, 0, $width, $height,-1,$GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) WinSetOnTop($gui, "",1) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
dbzfanatic Posted August 7, 2007 Share Posted August 7, 2007 What exactly do you mean by you're trying to make it transparent? Are you trying to make the window transparent and show only the gif or vice versa? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Bot Posted August 7, 2007 Author Share Posted August 7, 2007 No, I just want to make the GIF transparent and keep the window original. I have followed the link of dufran3 but this script required so much other resources . The script by ResNullius show only my GIF without the window. Can you help me please ? Link to comment Share on other sites More sharing options...
DjDeep00 Posted August 7, 2007 Share Posted August 7, 2007 No, I just want to make the GIF transparent and keep the window original. I have followed the link of dufran3 but this script required so much other resources . The script by ResNullius show only my GIF without the window. Can you help me please ?Is this what u want? Link to comment Share on other sites More sharing options...
Bot Posted August 7, 2007 Author Share Posted August 7, 2007 Yes, that's right ! Can you pass it to me please ? Link to comment Share on other sites More sharing options...
DjDeep00 Posted August 7, 2007 Share Posted August 7, 2007 (edited) Yes, that's right ! Can you pass it to me please ? Bot...I didnt do anything different then what you did. I am using the 3.2.4.9 (Production) version of Autoit. #include <GuiConstants.au3> $gui=GUICreate("test transparentpic", 200, 100) $pic=GUICreate("", 48, 48, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) GUICtrlCreatePic(@ScriptDir & "\button.gif",0,0, 0,0) GUISetState(@SW_SHOW,$pic) GUISetState(@SW_SHOW,$gui) Edited August 7, 2007 by DjDeep00 Link to comment Share on other sites More sharing options...
Bot Posted August 8, 2007 Author Share Posted August 8, 2007 I'm using the 3.2.4.9 too and I have tried the new beta version 3.2.5.1 but nothing change . Maybe AutoIT GUI is different on each computer ? Link to comment Share on other sites More sharing options...
ResNullius Posted August 8, 2007 Share Posted August 8, 2007 (edited) I'm using the 3.2.4.9 too and I have tried the new beta version 3.2.5.1 but nothing change . Maybe AutoIT GUI is different on each computer ?@Bot,Downloading the image in your first post and using your original script, I get the same results as DjDeep00. That is, the square border of the gif doesn't show, but the inside of the arrow on the circle is white. To reproduce the Gui snapshot you have in your first post where the inside of the arrow is grey, I have to edit the gif and make that part transparent.Are you sure your using the same gif as you posted?edit: spelling (it's border, not borfer!) Edited August 8, 2007 by ResNullius Link to comment Share on other sites More sharing options...
Bot Posted August 8, 2007 Author Share Posted August 8, 2007 (edited) Yes, I can make sure that I'm using the same GIF as I posted. I also tried the original image and the image after uploading but the results are the same . Can you show me your edited GIF please ? Edited : Aw I have tried on my Virtual PC and the result is same as you and DjDeep00 but when I tried on my VPS ( Windows 2003 Server ) ( I'm using Windows XP ) then the GIF went on error. So what is happening here ? Edited August 8, 2007 by Bot Link to comment Share on other sites More sharing options...
Bot Posted August 8, 2007 Author Share Posted August 8, 2007 OK, I think I have found it out. When I set my screen color depth to 16bit then there will be error, but if 32bit then no problem. Maybe it's a new bug ? Link to comment Share on other sites More sharing options...
ResNullius Posted August 9, 2007 Share Posted August 9, 2007 (edited) OK, I think I have found it out. When I set my screen color depth to 16bit then there will be error, but if 32bit then no problem. Maybe it's a new bug ? I can verify this as reproducible on Win XP. Funny thing is, which is the bug, the fact that it becomes transparent at the 16-bit level, or the fact it isn't at the 32-bit level?If you open the graphic in an editor, the only region stored as transparent is the outside. The inside of the arrow is still white.Also, if you want to see something else funky then run the sample and change (reduce or increase) your screen resolution.Suddenly the gif is seperated from the main Gui!EDIT: Well curiouser & curiouser- when I open the image in an editor and my colour depth is set to 16-bit, then both the outside border and the inside of the arrow show as transparent. Edited with colours set to 32-bit and only the outside shows as transparent, the inside of the arrow shows as white!So, must be a windows & gif & colour depth weirdness independent of AutoIt. Edited August 9, 2007 by ResNullius Link to comment Share on other sites More sharing options...
Bot Posted August 9, 2007 Author Share Posted August 9, 2007 (edited) Nah, I opened the GIF in GIMP in both 16bit and 32bit depth and no problem happened. The transparent problem also shows on Windows 2000 Professional and Windows 2003 Server ( I tested myself ), so I think it's must be something caused by AutoIT, not by Windows XP. Edited August 9, 2007 by Bot Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 9, 2007 Share Posted August 9, 2007 A curious result. I opened the GIF provided in the first post, and in an icon editor, the outside showed as "inverted" (inverts the color behind it when used as a cursor or icon), and the arrow is white. Just though it might interest someone. When I opened it in a GIF editor, the outside was transparent and the arrow was still white. Link to comment Share on other sites More sharing options...
ResNullius Posted August 9, 2007 Share Posted August 9, 2007 Nah, I opened the GIF in GIMP in both 16bit and 32bit depth and no problem happened. The transparent problem also shows on Windows 2000 Professional and Windows 2003 Server ( I tested myself ), so I think it's must be something caused by AutoIT, not by Windows XP. Well, you're right about GIMP and several other editors. The first one I tried and which does show the results as I described above is PhotFiltre http://www.photofiltre.com . Link to comment Share on other sites More sharing options...
Bot Posted August 9, 2007 Author Share Posted August 9, 2007 Well, so what is the reason for this problem ? Can anyone explain this please ? It's just a normal GIF file that I think it couldn't be any kind of mystery behind it. Link to comment Share on other sites More sharing options...
Bot Posted August 10, 2007 Author Share Posted August 10, 2007 Thanks for your explanation but what is happening with the position of the GIF as each time you change your screen resolution then the GIF will be moved ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now