Socks the Fox wrote: ↑December 15th, 2019, 6:26 pm
I was originally going to preprocess the crop values since I already have to do that for when figuring out where the skin is on the virtual monitor/desktop for the background matching, but I realized that things get complicated when it comes to what the user actually wants vs what I make available. Right now if you specify a cropping value for a desktop measure it reverts to cropping and sampling based on the original image file, but I was considering changing it to either base it off the monitor desktop (with preprocessing the cropping values), or the overall desktop (i.e. what Windows gives you when you use the Print Screen key; would not require changing the cropping values but also might give odd colors for cropping that goes out of a specific monitor's boundary but still within the virtual desktop).
When used with "Desktop", I'm not sure Crop is of all that much value if based on the original image file. Since you are almost certainly going to be using "Fit" with the desktop, the wallpaper image very often isn't going to line up with what is displayed on the screen.
I don't know what the complexities are, although I'm sure they are significant, but it seems to me that from a user point of view the logical thing is that Crop is based on what is being displayed in the context of the monitor the skin is on. That seems to be to be the only hope anyone has of using the Luminance function to determine what the lightness / darkness of a particular area under the skin is, so you can use that to determine which of the foreground and background colors to use.
What I would likely do is to use two
Chameleon "Desktop" parent measures. The first one would be the entire monitor contents, and that would be used with several child measures to select the colors, based on the entirety of the colors on the screen. I wouldn't want to limit this to just what is under the skin, as depending on the size, that might end up pretty boring in the context of the entire screen. The second would be a parent measure that is "cropped" to the size and position of the skin. That would be used with just one child measure to get the Luminance of this particular area. Then I would use IfConditions on this child to determine if a "light" or "dark" color scheme is best for the skin, at THIS place on the wallpaper. Since Luminance is based on a double value from 0.0-1.0, anything 0.49999 or less is tending toward "dark" and anything from 0.5 to 1.0 is tending toward "light". It's not quite that simple, since anything about 0.4 to 0.6 is really not either dark or light, but it gives you your best shot at it.
1.png
With this example, I have the skin on my primary monitor, which is 1920 x 1080, and the image is 1920 x 1080, so the "Crop" is able to figure things out pretty well when I use the approach I outlined above. This won't be true when I move the skin to my second monitor, which is 1600 x 900, but is still using the same wallpaper image with "Fit".
You do not have the required permissions to view the files attached to this post.