Achilles Posted June 18, 2007 Share Posted June 18, 2007 Alright, I have a color in the same format as this 'HKEY_CURRENT_USER\Control Panel\Colors', 'Background', my value is "154 171 35", which is a dark yellow color. I want that to become the background color around my small centered background wall paper. For example, in the picture I attached: I want the green to be changed to "154 171 35" by running some sort of code... Anyone have any ideas? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 18, 2007 Share Posted June 18, 2007 open it with paint and change it to whatever color that is. i dont think you can directly change anythign in an image except maybe with a hex editor. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
James Posted June 18, 2007 Share Posted June 18, 2007 No. That image is centered, and the theme colour is around the image. It should be somewhere in there. Why not edit the colour registry? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Achilles Posted June 18, 2007 Author Share Posted June 18, 2007 No. That image is centered, and the theme colour is around the image. It should be somewhere in there. Why not edit the colour registry?I've already done that... Then, I logged off, went to work, came back and it's the background color was the dark yellow. However, I want a line that automatically updates the color. Here's what I'm trying to get to work: (It requires the AutoitLib made by PaulIA) expandcollapse popup#include <A3LGDIPlus.au3> #include <A3LScreenCap.au3> #include <Misc.au3> #include <Color.au3> $pictureDir = @Systemdir & "\oobe\images\mslogo.jpg" $color = _chooseColor(2, 0 , 2) ConsoleWrite('!RGB color is: ' & $color & @CRLF) _ChangeDesktopBackground($pictureDir, 2, $color) ;Color is a decimal value Func _ChangeDesktopBackground($sFile, $iPosition=3, $color = 0) Local $sCLSID, $tBuffer, $hImage, $sTemp ; Convert JPG image to BMP image _GDI_Startup() $hImage = _GDI_LoadFromFile($sFile) $sCLSID = _GDI_GetEncoderCLSID("BMP") $sTemp = _Str_ChangeFileExt($sFile, ".bmp") _GDI_SaveToFile($hImage, $sTemp, $sCLSID) _GDI_DisposeImage($hImage) _GDI_Shutdown() $string = _ColorGetRed($color) & ' ' & _ColorGetGreen($color) & ' ' & _ColorGetBlue($color) ConsoleWrite('!Modified color is: ' & $color & @CRLF) ; Set wallpaper position RegWrite('HKEY_CURRENT_USER\Control Panel\Colors', 'Background', 'REG_SZ', $string) Switch $iPosition case 1 ; Tiled RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper' , 'reg_sz', '1') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0') Case 2 ; Centered RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper' , 'reg_sz', '0') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0') Case 3 ; Stretched RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper' , 'reg_sz', '0') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '2') EndSwitch ; Set wallpaper $tBuffer = DllStructCreate("char Text[" & StringLen($sTemp) + 1 & "]") DllStructSetData($tBuffer, "Text", $sTemp) _API_SystemParametersInfo($SPI_SETDESKWALLPAPER, 0, DllStructGetPtr($tBuffer), BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDCHANGE)) EndFunc My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] 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