It is currently December 15th, 2019, 6:31 am

Plugin: Chameleon

Plugins and Addons popular with the Community
User avatar
Cariboudjan
Posts: 31
Joined: May 12th, 2019, 8:55 am

Re: Plugin: Chameleon

Cariboudjan » November 2nd, 2019, 1:20 pm

The next update will get support for some command line arguments to control the program while it's running and I think I could also add some query commands.

The way that this would work is that you specify a window handle which will receive the response via WM_COPYDATA. So one of them could return the current wallpapers in JSON format from which you could get the path to the project and preview files to read.
One of the WPE devs has been chatting, and he's figuring out a way to get this working.

https://steamcommunity.com/app/431960/discussions/0/1697221160916833027/

Rainmeter should be able to control WPE through commandline, and also get color data via a preview image. Chameleon should be able to use the preview image to get the data. I'll create a test skin as soon as the update comes out.
User avatar
Socks the Fox
Posts: 95
Joined: August 25th, 2015, 6:40 pm

Re: Plugin: Chameleon

Socks the Fox » December 13th, 2019, 12:03 am

Well... I have an initial build of Chameleon that samples the desktop directly instead of going through the image file, but...

It's after all the icons and windows and everything gets drawn on top of the background. Not before, like I was hoping it would be. I'm going to go back and keep researching on it, I'm *sure* there's a way to get the data I need. Could be a neat option though.

All I can say is Windows does NOT make it easy to read the contents of a window into a simple to use data format. It insists on having me copy the entire desktop "window" contents to a device-specific buffer, then use another function to convert it to a device independent format in another buffer, and even that still has the possibility probability to be in a format that doesn't play nice with the rest of the plugin (the plugin is coded to expect 8-bit-per-channel RGBA, windows likes to pass back 8-bit-per-channel BGRx, or possibly 5-bit RGB, or maybe just 8-bit BGR, and it's not impossible for it to decide to give back 5-6-5-bit RGB).

Anyway, once I've gotten that working it should be super easy to then grab a subsection of that image and get the brightness of the area under the skin.

EDIT: Oh of course after I post this I find it's literally just "call GetShellWindow() instead of GetDesktopWindow()" haha.

Well, I still need to fix a few things but at least now it's only looking at the background.
Author of Chameleon :: Like my plugin? Consider donating! I don't need much :3
User avatar
Socks the Fox
Posts: 95
Joined: August 25th, 2015, 6:40 pm

Re: Plugin: Chameleon

Socks the Fox » Yesterday, 11:33 pm

Okay! Chameleon v1.6 is out now! This release
  • Fixes the issue where the Crop values don't update
  • Samples the shell desktop window directly, so Chameleon sees what you see
  • Enables Chameleon to shuffle the colors to better match the area of the desktop the skin covers (which is enabled by default but has a measure value to disable it, by setting ContextAwareColors=0)
It will resample the image every time the cropping values change; or if you have context aware colors enabled, after the user stops moving the skin for at least one update cycle (as well as if the image file changes such as moving between desktops).

There may be some little issues here and there, as I had to change a lot of things to get the new features and methods of doing things to fit in, but hopefully they should be few and far between, and generally easy fixes.

The download is available at https://software.socksthefox.net/chameleon/ inside the provided .rmskin as usual.

Possible To Do List:
Probably give a value to tell if ContextAwareColors would have changed things around if it's disabled.
** Rework how the internal Chameleon library chooses and presents colors to allow more color selections. **
Allow ContextAwareColors to use a custom position/size instead of only the skin windows'.
Author of Chameleon :: Like my plugin? Consider donating! I don't need much :3
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

jsmorley » Today, 1:20 am

Wow... This is a VAST improvement!