useiconscale behaviour

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
bl243
Posts: 19
Joined: Tue Feb 03, 2009 6:11 am

useiconscale behaviour

Post by bl243 »

Hi,

I am really getting into weathermap in a big way and have started creating maps using coloured icons for host status with the useiconscale keywords.

Currently I have made my icons black and white, where black is used the scale colour shows and where white is used, it remains white.

However, with a white background this actually makes the icons quite hard to make out.

Is it possible to reverse the logic, so where white is used the colour shows through, and where black is used it remains black.

Or even better offset the logic by a single digit so that RGB 0,0,0 is black, but RGB 1,1,1 -> 255,255,255 is the scale colour fading to white? This would allow you to use black and white and then the scale colour within the icons.

Did any of what I just wrote make sense?

I've attached a screenshot to demonstrate. Left is what I have. Right is what I want to get to.

Thanks.
Attachments
Example
Example
example.gif (9.63 KiB) Viewed 3195 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I've never really used USEICONSCALE. I'll take a look... the colouring is done by a php function though, not weathermap, so I wouldn't hold too much hope that it's that flexible.

depending on your scale (e.g. no gradients) then it might just be easier to make the coloured icons in the gimp/photoshop/paint.net.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
bl243
Posts: 19
Joined: Tue Feb 03, 2009 6:11 am

Post by bl243 »

Thanks Howie.

In this instance I am using a gradient scale. But I don't necessarily have to. Its a lot of icons to produce though! =)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Well there are two other solutions. One looks like it would only work with indexed-colour images (not jpeg, not 24-bit png). The other would work on anything but be quite a bit slower. I'll experiment and see just how slow.

The good news is that both would work on stock GD installs too (e.g. debian, etc), so I could lose a dependency.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
bl243
Posts: 19
Joined: Tue Feb 03, 2009 6:11 am

Post by bl243 »

Indexed colour sounds good. To get the most out of the icon colouring you need a grayscale image anyway - so 256 colour would be plenty!

Perhaps as a SET option to avoid losing the PNG and JPEG support?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

bl243 wrote:Indexed colour sounds good. To get the most out of the icon colouring you need a grayscale image anyway - so 256 colour would be plenty!

Perhaps as a SET option to avoid losing the PNG and JPEG support?
Yeah, I think it will be something like that. This seems like it would be the better default.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I just did some playing with this and the results are quite nice. It seems fast enough to work in all cases, and the colourising result is better - black and white preserved, and the colours are less washed out.

It'll be the last new feature in 0.97 (just tracking down a couple of bugs before release).
Attachments
sample.png
sample.png (2.58 KiB) Viewed 2879 times
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests