[rrd-developers] gdImageCopyResampled

Christopher Snell chris.snell at gmail.com
Wed Oct 20 22:03:06 MEST 2004


Hi,

I was browsing through the libgd documentation and saw a (relatively)
new function called gdImageCopyResampled.  This takes a gdImagPtr and
smoothly (or so it says) resamples it to a smaller size.  This very
useful functionality.  Sometimes its nice to have resampled
graphs--you can display more graph in less area than you could by
simply shrinking the graph size within RRDtool.  Currently, I'm doing
this via calls via ImageMagick's library but this is quite slow
because we are going from GD -> PNG -> I.M. Format -> PNG.  I'm
working on a patch to add  --resample-width and --resample-height to
RRDtool but I'm a very slow and not-very-good C coder.  Perhaps
someone could beat me to the punch?

Chris

gdImageCopyResampled docs:

http://www.boutell.com/gd/manual2.0.28.html#gdImageCopyResampled

Example resampled image (done on-the-fly with ImageMagick).

http://chrissnell.com:48000/graphs/?graph_type=temperaturec&start=8000&small=1

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list