Jump to content
Sign in to follow this  
am632

jpg issue with colour transparency

Recommended Posts

am632

Hi,

I have a jpg image which im using as a background for the gui, code is...

GUICtrlCreatePic("images\background2.jpg", 0, 0, 500, 482)

and it works fine but there was a glitch with a lable. basically the lable is progress data and updates every 1 second, but because on the default back colour of the lables is was flashing the default grey colour over the top of my jpg. So I added the code...

GUISetBkColor(0x818181)

so the default background was the same as my jpg and this fixed the glitch however at the same time it caused a particular shade of grey on my jpg to turn transparent, meaning that part of the jpg is now 0x818181.

I read through the help file but cant find anything related to jpg's doing this, and now im stuck as i dont understand why this has happened.

please can anyone shed any light on this?

thanks

Share this post


Link to post
Share on other sites
BrewManNH

Post your code and your jpg otherwise we're just guessing.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
BrewManNH

Are you by any chance using the $WS_EX_LAYERED extended style when you create the GUI? Because if you are, that could cause the problem described.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
am632

Hi,

thanks all for the replies, i have only just read them as i have been a bit busy since i last posted. I have actually tried a bmp but the same thing happend and i dont have the $WS_EX_LAYERED extended style set. I have actually fixed the problem, I just changed the shade of grey on the jpg to 1 shade difference so its now not the generic default shade and its now not giving the issue.

thanks for the replies

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  

×