~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to gdchart0.94c/gd-1.8.3/gd_ss.c

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-01-30 21:59:13 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050130215913-xc3ke963bw49b3k4
Tags: 2:3.0-5
* Updated README.Debian file so users will understand what to do at
  install, closes: #291794, #287802.
* Updated ntop init script to give better output.
* Also changed log directory from /var/lib/ntop to /var/log/ntop,
  closes: #252352.
* Quoted the interface list to allow whitespace, closes: #267248.
* Added a couple of logcheck ignores, closes: #269321, #269319.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <stdio.h>
2
 
#include <math.h>
3
 
#include <string.h>
4
 
#include <stdlib.h>
5
 
#include "gd.h"
6
 
 
7
 
#define TRUE 1
8
 
#define FALSE 0
9
 
 
10
 
/* Exported functions: */
11
 
extern void gdImagePngToSink(gdImagePtr im, gdSinkPtr out);
12
 
extern gdImagePtr gdImageCreateFromPngSource(gdSourcePtr inSource);
13
 
 
14
 
/* Use this for commenting out debug-print statements. */
15
 
/* Just use the first '#define' to allow all the prints... */
16
 
/*#define GD_SS_DBG(s) (s) */
17
 
#define GD_SS_DBG(s)
18
 
 
19
 
void gdImagePngToSink(gdImagePtr im, gdSinkPtr outSink)
20
 
{
21
 
        gdIOCtx   *out = gdNewSSCtx(NULL,outSink);
22
 
        gdImagePngCtx(im, out);
23
 
        out->free(out);
24
 
}
25
 
 
26
 
gdImagePtr gdImageCreateFromPngSource(gdSourcePtr inSource)
27
 
{
28
 
        gdIOCtx         *in = gdNewSSCtx(inSource, NULL);
29
 
        gdImagePtr      im;
30
 
 
31
 
        im = gdImageCreateFromPngCtx(in);
32
 
 
33
 
        in->free(in);
34
 
 
35
 
        return im;
36
 
}
37
 
 
38