Question

(I understand the answer might be Windows exclusive).

Is it possible to access the wallpaper image (pixel data) (if any is used) with Python? I've seen some apps do it for some cool effects like custom fading from the "fake wallpaper" to a video game.

I'm writing a 3d screensaver and want to have the actual wallpaper (if any used) as background.

Was it helpful?

Solution

The wallpaper can be found in the Windows registry under "CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource". More information about how that works can be found at Is there a windows registry entry for the original background location?.

Getting the username can be done with getpass.getuser().

I don't how customizable the path to the internal copy of the wallpaper is. There is probably an environment variable for the root of it, then you can just append on the wallpaper specific stuff.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top