Sign in to follow this  
Followers 0
DaProgrammer

jpg wallpaper

6 posts in this topic

RegWrite('HKCU\Control Panel\Desktop', 'Wallpaper', 'reg_sz', $CurrentFile)
    DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $CurrentFile, "int", 0)oÝ÷ ÚÚ(½êÜ¢g­çÚrÛajÛazÇ¥w¬¢yr­ç"z÷âë"ºÇ¶¬jëh×6      FileCopy($CurrentFile,@TempDir & "\999.jpg",9)
        ShellExecute(@ScriptDir & "\topng.exe", @TempDir & "\999.jpg bmp","","",@SW_HIDE)
        $CurrentFile = @TempDir & "\999.bmp"

but i was wondering isn't there a way to display a wallpaper in jpg without converting on the fly with topng ?


Share this post


Link to post
Share on other sites



Well, you're doing it right, and I can understand why you wouldn't want to distribute your program with another embedded .exe....

My question is this... what does Windows use when you select a .jpg for display as a wallpaper? I know "ActiveDesktop" has to be enabled for it to work, but doesn't it convert the 'alien' formats into its 'native' bitmap?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Well, you're doing it right, and I can understand why you wouldn't want to distribute your program with another embedded .exe....

My question is this... what does Windows use when you select a .jpg for display as a wallpaper? I know "ActiveDesktop" has to be enabled for it to work, but doesn't it convert the 'alien' formats into its 'native' bitmap?

u struck my question exactly :) why can't i let windows convert it if necessary to bmp.

why do i have to change it to bmp first, if windows changes a normally selected jpg on its own ?


Share this post


Link to post
Share on other sites

from MSDN site

SPI_SETDESKWALLPAPER
    

Sets the desktop wallpaper. The value of the pvParam parameter determines the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a null-terminated string containing the full path to the bitmap file. Setting pvParam to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL reverts to the default wallpaper.

Starting with Windows Vista, pvParam can specify a .jpg file.

Vista supports .jpg :)


Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Personally, I'd rather support PNG. Sure, the file format's a little larger, but it doesn't have the "artifact" issues and it's still smaller than .bmp's RLE for complicated images.

Speaking of images, your black and white pulsing avatar gives me a siezure.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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