AutoHotkey Community

It is currently May 27th, 2012, 6:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 7th, 2011, 3:23 am 
Offline

Joined: September 13th, 2010, 10:11 am
Posts: 51
Location: rock>8<hardplace
I'm using "auto-scroll" script found on the wiki. It uses small bitmaps as splash images, and uses TransColor to make background color transparent.

Works fine in AHK Basic.
With AHK_L ansi X86 v 1.0.91.05 from 01-Jan-2011, on XP-Pro SP3, the Transcolor doesn't work for the SplashImage, but does work for a normal window.
With that same version of AHK_L running on Vista Home Premium 64-bit, TransColor DOES work for SplashImage.

The bitmaps used are just simple 32x32 pixel graphics. I tried changing them from 2-color 1-bit to 16-color, and even to 16m 24-bit. I also tried changing the "transparency" color. None of that made any difference

This is a sample of the code that is not working on my XP machine.
Bitmaps --- don't work
Notepad --- works

Code:
CoordMode, Mouse, Screen
#z::
splasher:
DetectHiddenWindows, On
MouseGetPos, as_X, as_Y
; Root Directory for images
as_imageroot = %A_ScriptDir%\Images
as_image = Cntr

   SplashImage, %as_imageroot%\%as_image%.bmp, b X%as_x% Y%as_y% Hide, , , splashThis
;   WinSet, Transparent, 100, splashThis
   WinSet, TransColor, 000000 150, splashThis
   SplashImage, Show, , , , splashThis

   WinSet, TransColor, 000000, Untitled - Notepad
return


I only found one forum post about AHK_L and TransColor (about a very! fancy color picker), so I really need some assistance with this.
Is it an AHK_L problem, or a problem with my computer?

_________________
Antique Newbie


Last edited by grannyGrump on March 8th, 2011, 8:52 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2011, 3:47 am 
Offline

Joined: September 13th, 2010, 10:11 am
Posts: 51
Location: rock>8<hardplace
I have now tested the script on two XP-SP3 machines with same result.

TransColor for the SplashImage DOES NOT work with AHK_L.
It DOES work with AHK Basic.

Please, can somebody take a short moment to make a small graphic and test my script snippet, to see if you duplicate my findings?

Your help will be much appreciated.

_________________
Antique Newbie


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2011, 2:32 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Using a 32x32 8-bit bitmap, I have confirmed that this problem occurs on Windows XP but not Windows 7. AutoHotkey Basic and AutoHotkey_L Revision 58 and earlier are not affected, thus it seems to be related to the following change in Revision 59:
Quote:
Changed: SplashImage uses common image-loading routines; now supports PNG and similar, but results may differ from before for icon files.

I've moved the thread to Bug Reports as this appears to be a bug.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2011, 8:45 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
It turns out the GDI bitmap generated by GDI+ has something wrong with its alpha channel, and this causes problems with the window's colour-keying. Rather than coding a hack-fix for this specific case, I've changed SplashImage to attempt the non-GDI+ image-loading methods first, then if that fails, fall back to GDI+. If you'd like to test before I release v1.0.93.00, see this thread.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2011, 4:32 am 
Offline

Joined: September 13th, 2010, 10:11 am
Posts: 51
Location: rock>8<hardplace
Ok, that's a dead bug!

Thank you.

_________________
Antique Newbie


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group