png++: types.hpp Source File

png++ 0.2.9

- Main Page
- Namespaces
- Classes
- Files

- File List

types.hpp
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2007,2008 Alex Shulgin
3 *
4 * This file is part of png++ the C++ wrapper for libpng. PNG++ is free
5 * software; the exact copying conditions are as follows:
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice,
11 * this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
25 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 #ifndef PNGPP_TYPES_HPP_INCLUDED
32 #define PNGPP_TYPES_HPP_INCLUDED
33
34 #include <png.h>
35
36 namespace png
37 {
38
39 typedef png_byte byte;
40 typedef png_uint_16 uint_16;
41 typedef png_uint_32 uint_32;
42 typedef png_fixed_point fixed_point;
43 typedef png_color_8 color_info;
44 typedef png_color_16 color_info_16;
45
46 enum color_type
47 {
48 color_type_none = -1,
49 color_type_gray = PNG_COLOR_TYPE_GRAY,
50 color_type_palette = PNG_COLOR_TYPE_PALETTE,
51 color_type_rgb = PNG_COLOR_TYPE_RGB,
52 color_type_rgb_alpha = PNG_COLOR_TYPE_RGB_ALPHA,
53 color_type_gray_alpha = PNG_COLOR_TYPE_GRAY_ALPHA,
54 color_type_rgba = PNG_COLOR_TYPE_RGBA,
55 color_type_ga = PNG_COLOR_TYPE_GA
56 };
57
58 enum color_mask
59 {
60 color_mask_palette = PNG_COLOR_MASK_PALETTE,
61 color_mask_color = PNG_COLOR_MASK_COLOR,
62 color_mask_rgb = color_mask_color,
63 color_mask_alpha = PNG_COLOR_MASK_ALPHA
64 };
65
66 enum filler_type
67 {
68 filler_before = PNG_FILLER_BEFORE,
69 filler_after = PNG_FILLER_AFTER
70 };
71
72 enum rgb_to_gray_error_action
73 {
74 rgb_to_gray_silent = 1,
75 rgb_to_gray_warning = 2,
76 rgb_to_gray_error = 3
77 };
78
79 enum interlace_type
80 {
81 interlace_none = PNG_INTERLACE_NONE,
82 interlace_adam7 = PNG_INTERLACE_ADAM7
83 };
84
85 enum compression_type
86 {
87 compression_type_base = PNG_COMPRESSION_TYPE_BASE,
88 compression_type_default = PNG_COMPRESSION_TYPE_DEFAULT
89 };
90
91 enum filter_type
92 {
93 filter_type_base = PNG_FILTER_TYPE_BASE,
94 intrapixel_differencing = PNG_INTRAPIXEL_DIFFERENCING,
95 filter_type_default = PNG_FILTER_TYPE_DEFAULT
96 };
97
98 enum chunk
99 {
100 chunk_gAMA = PNG_INFO_gAMA,
101 chunk_sBIT = PNG_INFO_sBIT,
102 chunk_cHRM = PNG_INFO_cHRM,
103 chunk_PLTE = PNG_INFO_PLTE,
104 chunk_tRNS = PNG_INFO_tRNS,
105 chunk_bKGD = PNG_INFO_bKGD,
106 chunk_hIST = PNG_INFO_hIST,
107 chunk_pHYs = PNG_INFO_pHYs,
108 chunk_oFFs = PNG_INFO_oFFs,
109 chunk_tIME = PNG_INFO_tIME,
110 chunk_pCAL = PNG_INFO_pCAL,
111 chunk_sRGB = PNG_INFO_sRGB,
112 chunk_iCCP = PNG_INFO_iCCP,
113 chunk_sPLT = PNG_INFO_sPLT,
114 chunk_sCAL = PNG_INFO_sCAL,
115 chunk_IDAT = PNG_INFO_IDAT
116 };
117
118 } // namespace png
119
120 #endif // PNGPP_TYPES_HPP_INCLUDED
png::color_mask
color_mask
Definition: types.hpp:58
png::chunk_pCAL
Definition: types.hpp:110
png::chunk_sCAL
Definition: types.hpp:114
png::uint_16
png_uint_16 uint_16
Definition: types.hpp:40
png::chunk_hIST
Definition: types.hpp:106
png::rgb_to_gray_warning
Definition: types.hpp:75
png::color_type_rgb
Definition: types.hpp:51
png::filler_type
filler_type
Definition: types.hpp:66
png::interlace_type
interlace_type
Definition: types.hpp:79
png::chunk_tRNS
Definition: types.hpp:104
png::chunk_PLTE
Definition: types.hpp:103
png::color_mask_rgb
Definition: types.hpp:62
png::color_type_ga
Definition: types.hpp:55
png::filter_type
filter_type
Definition: types.hpp:91
png::chunk_sRGB
Definition: types.hpp:111
png::chunk_bKGD
Definition: types.hpp:105
png::chunk_gAMA
Definition: types.hpp:100
png::color_mask_alpha
Definition: types.hpp:63
png::color_info
png_color_8 color_info
Definition: types.hpp:43
png::chunk_tIME
Definition: types.hpp:109
png::chunk_IDAT
Definition: types.hpp:115
png::color_type
color_type
Definition: types.hpp:46
png::chunk_sBIT
Definition: types.hpp:101
png::filler_before
Definition: types.hpp:68
png::interlace_adam7
Definition: types.hpp:82
png::chunk_cHRM
Definition: types.hpp:102
png::compression_type
compression_type
Definition: types.hpp:85
png::uint_32
png_uint_32 uint_32
Definition: types.hpp:41
png::fixed_point
png_fixed_point fixed_point
Definition: types.hpp:42
png::filter_type_default
Definition: types.hpp:95
png::byte
png_byte byte
Definition: types.hpp:39
png::chunk_sPLT
Definition: types.hpp:113
png::chunk
chunk
Definition: types.hpp:98
png::color_type_rgb_alpha
Definition: types.hpp:52
png::interlace_none
Definition: types.hpp:81
png::filler_after
Definition: types.hpp:69
png::color_mask_palette
Definition: types.hpp:60
png::compression_type_default
Definition: types.hpp:88
png::filter_type_base
Definition: types.hpp:93
png::compression_type_base
Definition: types.hpp:87
png::chunk_oFFs
Definition: types.hpp:108
png::rgb_to_gray_silent
Definition: types.hpp:74
png::color_type_gray
Definition: types.hpp:49
png::color_type_rgba
Definition: types.hpp:54
png::color_info_16
png_color_16 color_info_16
Definition: types.hpp:44
png::rgb_to_gray_error
Definition: types.hpp:76
png::color_type_gray_alpha
Definition: types.hpp:53
png::color_mask_color
Definition: types.hpp:61
png::intrapixel_differencing
Definition: types.hpp:94
png::chunk_iCCP
Definition: types.hpp:112
png::color_type_none
Definition: types.hpp:48
png
Definition: color.hpp:36
png::color_type_palette
Definition: types.hpp:50
png::chunk_pHYs
Definition: types.hpp:107
png::rgb_to_gray_error_action
rgb_to_gray_error_action
Definition: types.hpp:72