pngtogd2 issue

Steve Bonds r1p6os402 at sneakemail.com
Mon Feb 17 23:06:22 CET 2003


On Mon, 17 Feb 2003, John McDonnell johnmc-at-johnmc.org |Nagios| wrote:

> likewise... The documentation's not exactly clear on the special magick
> involved to get transparency and gd2's working right.

This magic worked for me:

Config:
  RedHat 7.3 
  gd-1.8.4-4 RPM
  SRPMS source package for same
  GIMP 1.2.3

The first step was building "pngtogd2" via "rpm -ba <spec from SRPMS>" and
using the /usr/src/redhat/BUILD/gd-1.8.4/pngtogd2 that it built.  The spec
file I use does not include this handy utility by default.

I tried using the gd 2.x source with the installed gd 1.8 RPM and the
resulting pngtogd2 binary built mangled gd2 files.  This was only
discovered when I used the gd2topng to convert them back and had it
coredump.

In order to get transparency working, I used Gimp to convert each image to
8-bit indexed color with background color.  GD 1.x does not support a PNG
alpha channel at all, but does support a single transparent color.  I
carefully erased the portions of each image I wanted to be transparent and
saved them as 8-bit indexed color PNG files.

These converted nicely to GD2 files using:

/usr/src/redhat/BUILD/gd-1.8.4/pngtogd2 image.png image.gd2 0 1

The images were installed in /usr/share/nagios/images/logos (another
RedHat-ism) and once referenced via /etc/nagios/hostextinfo.cfg they
worked fine.

Note that many of these paths are different because the RedHat paths
differ from the Nagios defaults.

Good luck!

  -- Steve Bonds



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list