~ubuntu-branches/ubuntu/natty/luatex/natty

« back to all changes in this revision

Viewing changes to source/libs/libpng/libpng-1.2.40/contrib/gregbook/readpng.h

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2010-12-13 23:22:59 UTC
  • mfrom: (0.2.1) (1.5.4) (4.3.12 experimental)
  • Revision ID: package-import@ubuntu.com-20101213232259-nqq2mq5z5x6qldw3
Tags: 0.65.0-1
* new upstream release
* ship two source packages as they are distributed by upstream, only
  renamed to match source package requirements. Fix debian/rules
  to install the manual pdf from the right place

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*---------------------------------------------------------------------------
2
 
 
3
 
   rpng - simple PNG display program                              readpng.h
4
 
 
5
 
  ---------------------------------------------------------------------------
6
 
 
7
 
      Copyright (c) 1998-2007 Greg Roelofs.  All rights reserved.
8
 
 
9
 
      This software is provided "as is," without warranty of any kind,
10
 
      express or implied.  In no event shall the author or contributors
11
 
      be held liable for any damages arising in any way from the use of
12
 
      this software.
13
 
 
14
 
      The contents of this file are DUAL-LICENSED.  You may modify and/or
15
 
      redistribute this software according to the terms of one of the
16
 
      following two licenses (at your option):
17
 
 
18
 
 
19
 
      LICENSE 1 ("BSD-like with advertising clause"):
20
 
 
21
 
      Permission is granted to anyone to use this software for any purpose,
22
 
      including commercial applications, and to alter it and redistribute
23
 
      it freely, subject to the following restrictions:
24
 
 
25
 
      1. Redistributions of source code must retain the above copyright
26
 
         notice, disclaimer, and this list of conditions.
27
 
      2. Redistributions in binary form must reproduce the above copyright
28
 
         notice, disclaimer, and this list of conditions in the documenta-
29
 
         tion and/or other materials provided with the distribution.
30
 
      3. All advertising materials mentioning features or use of this
31
 
         software must display the following acknowledgment:
32
 
 
33
 
            This product includes software developed by Greg Roelofs
34
 
            and contributors for the book, "PNG: The Definitive Guide,"
35
 
            published by O'Reilly and Associates.
36
 
 
37
 
 
38
 
      LICENSE 2 (GNU GPL v2 or later):
39
 
 
40
 
      This program is free software; you can redistribute it and/or modify
41
 
      it under the terms of the GNU General Public License as published by
42
 
      the Free Software Foundation; either version 2 of the License, or
43
 
      (at your option) any later version.
44
 
 
45
 
      This program is distributed in the hope that it will be useful,
46
 
      but WITHOUT ANY WARRANTY; without even the implied warranty of
47
 
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
48
 
      GNU General Public License for more details.
49
 
 
50
 
      You should have received a copy of the GNU General Public License
51
 
      along with this program; if not, write to the Free Software Foundation,
52
 
      Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
53
 
 
54
 
  ---------------------------------------------------------------------------*/
55
 
 
56
 
#ifndef TRUE
57
 
#  define TRUE 1
58
 
#  define FALSE 0
59
 
#endif
60
 
 
61
 
#ifndef MAX
62
 
#  define MAX(a,b)  ((a) > (b)? (a) : (b))
63
 
#  define MIN(a,b)  ((a) < (b)? (a) : (b))
64
 
#endif
65
 
 
66
 
#ifdef DEBUG
67
 
#  define Trace(x)  {fprintf x ; fflush(stderr); fflush(stdout);}
68
 
#else
69
 
#  define Trace(x)  ;
70
 
#endif
71
 
 
72
 
typedef unsigned char   uch;
73
 
typedef unsigned short  ush;
74
 
typedef unsigned long   ulg;
75
 
 
76
 
 
77
 
/* prototypes for public functions in readpng.c */
78
 
 
79
 
void readpng_version_info(void);
80
 
 
81
 
int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight);
82
 
 
83
 
int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue);
84
 
 
85
 
uch *readpng_get_image(double display_exponent, int *pChannels,
86
 
                       ulg *pRowbytes);
87
 
 
88
 
void readpng_cleanup(int free_image_data);