Re: [Nagios-devel] cosmetic issues with gd2 icons

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] cosmetic issues with gd2 icons

Post by Guest »

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guillaume Rousse wrote:
| hello list.
|
| I've made my own icon for netapp filers, using the new netapp logo. I've
| used a png icon with a transparent background as the master icon, and
| converted it with pngtogd2 util, with the following command:
| pngtogd2 logo.png logo.gd2 0 1
|
| The png icon is fine, but the gd2 icon background appears as solid black
| area on the status map. I've tried various png saving options in gimp
| without success. Does anyone have a clue here to make it transparent as
| other icons ?


I use the script below to generate my icons. Obviously any format that
can be converted to pnm will work; here it's .gif. I believe Nagios
needs the .gif somehow, so you should avoid alpha channel (or make one
non-alpha .gif version, and one png with alpha channel). I have no idea
if gd2 supports alpha though.

Run it as ./genicon.sh
i.e.: "./genicon.sh *.gif" will convert all .gif files in current directory.

Be aware that it will clobber any .pnm, .png, .jpg and .gd2 with the
same names as the source files without warning.

- ----- genicon.sh -----
path="/usr/bin"

for arg
do
~ if [ -f "$arg" ]; then
~ echo converting $arg
~ arg="$(echo $arg | sed 's/\.gif$//')"
~ $path/giftopnm $arg.gif > $arg.pnm
~ $path/pnmtopng -transparent rgb:ff/ff/ff $arg.pnm > $arg.png
~ $path/pnmtojpeg -quality=100 -optimize -smooth=0 $arg.pnm > $arg.jpg
~ $path/pngtogd2 $arg.png $arg.gd2 0 1
~ fi
done

rm -f *.pnm
- ----- END -----

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIIGqE6dZ+Kt5BchYRAhTUAKCvlq11nhdQ2/+PB3ujOJJavhj28gCeNCLt
RJHPGagNSjQ/4PvpWmyBo3Q=
=m7nt
-----END PGP SIGNATURE-----





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked