It is currently March 28th, 2024, 12:22 pm

Plugin: Chameleon

Plugins and Addons popular with the Community
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

Post by jsmorley »

eclectic-tech wrote:VS2015 Runtime?
I thought Socks had eliminated the need for runtime libraries in his latest versions of the plugin. The original poster might want to be sure he is using the latest and greatest.
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Plugin: Chameleon

Post by Socks the Fox »

Not yet, that will be 1.5. It required a reorganization of the Visual Studio projects so that I could do that with less fuss. My to-do list basically amounts at this point to some cleanup. I don't think I'll be able to add custom weights easily this version because it would require more or less rewriting libChameleon completely to allow a variable number of selected colors, since I realized the hacky way I originally considered hacking it in wouldn't work anyway, and the alternative is only allowing users to replace the existing 'slots' weights.

But I got the three things I really wanted: Better internal image scaling so Chameleon picks much better colors; cropping images before scaling to allow skins to only grab colors from a region of an image, and getting Chameleon organized so I can statically link the VS2015 runtime. I'll probably release it later today once I've finished the cleanup (I really want to better organize how Chameleon handles reading the various settings; I'll probably have to leave redoing how it handles creating and storing measures for 1.6).
User avatar
Socks the Fox
Posts: 104
Joined: August 25th, 2015, 6:40 pm
Contact:

Re: Plugin: Chameleon

Post by Socks the Fox »

Okay, I've gotten everything wrapped up for 1.5 and uploaded. You should be able to download the new version here and donate to me here as usual.

The update includes a better image scaling system, automatic desktop image cropping and manual image cropping, and best of all no more reliance on the user installing the VS2015 runtime.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Plugin: Chameleon

Post by eclectic-tech »

Thanks Socks! :great:

I'm going to give your latest version a spin right now!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

Post by jsmorley »

Seems to really be working well Socks. Great job on this, and thanks.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: Plugin: Chameleon

Post by ms310 »

Magically its working now! Thanks!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

Post by jsmorley »

Socks, the only comment I would have is that while Type=Desktop is fine, it can make using the Crop options a bit tricky. The issue is that it is basing the measurements on the original wallpaper image file, and not the image as scaled to fit your screen.(with the additional complication that you can set the "fit" of the wallpaper on your screen to different things)

What this means is that what I would really like to use the Crop stuff for, to get the Luminance of the part of the screen the skin resides on, (so I can decide on using Light1/Light2 or Dark1/Dark2 colors in the skin) is not really reliable, or even possible.

What I really want is

CropX=#CURRENTCONFIGX#
CropY=#CURRENTCONFIGY#
CropW=#CURRENTCONFIGWIDTH#
CropH=#CURRENCONFIGHEIGHT#

The overall Luminance of the image is not as important in this case as what the Luminance is where the skin is. What is the skin going to be fighting with behind it?

The trouble is that the actual image file may not be my screen resolution (1920 X 1080) but might be anything. Perhaps smaller than that, perhaps bigger. So one of two things happens pretty regularly. Either the Luminance returned is not correct since it is sampling the wrong part of the image, or it fails entirely with some "Cropping out of bounds" error.

I'm certainly not suggesting in any way that how Type-Desktop works should change. A possible solution would be to allow the Crop options to support a "percentage" as well as a hard number. I can do some math with #SCREENAREAWDITH# and #CURRENTCONFIGX# etc. to derive the percentages I would need to pass it it I think. If my skin is in the bottom-right 1/3rd of my screen, then I would want the bottom-right 1/3rd of the image, no matter what its real size. I think the easiest, both for you and the user, would be new options like CropXPercent / CropYPercent etc., set from 0 to 1.

I would think this would be useful not only for the desktop wallpaper, but any image really. Unless the user is sampling a pretty "static" image, the actual size of the image file may well be different than what it is on the screen when scaled with W and H and PreserveAspectRatio on the meter. The user may or may not know what the "real" size of the image is. The trouble with the current Crop functions is that they really require a formula that has a piece the user doesn't know. The size of the actual image.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: Plugin: Chameleon

Post by ms310 »

An uneducated opinion. I would like the ability to look under the skin itself - Rainmeter knows the bounds of the skin - looking under the skin and sample the image there would be awesome.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin: Chameleon

Post by jsmorley »

ms310 wrote:An uneducated opinion. I would like the ability to look under the skin itself - Rainmeter knows the bounds of the skin - looking under the skin and sample the image there would be awesome.
I thought about that, but don't like it. There can be windows or desktop icons or other transient or irrelevant stuff on the screen. It's not about the "screen", but the "image", which is how Type=Desktop works now. The issue isn't exactly "what is behind the skin on the screen", but "what is behind the skin on the desktop wallpaper".

My issue is that it is quite difficult to tell it where on the image to look, as you really can't know. Aside from the fact that Windows "fits" the image to the screen, it can fit it with any of Fill/Fit/Stretch/Tile/Center/Span. So even if you DID know the size of the original image, that really doesn't help anyway, as you can't be sure how Windows is going to resize it to be the desktop wallpaper. Even a percentage doesn't exactly get you there, but it gets you a lot closer in most cases.

You really couldn't sample the "screen behind the skin" anyway, unless you made the skin invisible for a second, which would cause "flicker". It's not magic. A screen-capture is a screen-capture. Socks isn't trying to do screen captures, but is examining the actual physical image file, and rightly so.
User avatar
Tthaddee
Posts: 11
Joined: June 16th, 2016, 5:04 pm

Re: Plugin: Chameleon

Post by Tthaddee »

Hi SockTheFox

First, a big thank you for this awesome plugin. Your work is really impressive. I want to make an equalizer with colors matching the colors of the now playing album cover.
How to integrate Chameleon, and more precisely, the "NowPlayingAlbumArt" section ??

Thanks for your help ! :)

PS: Sorry for my bad english :/
Post Reply