- Main Page
- Namespaces
- Classes
- Files

- File List

# types.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (C) 2007,2008   Alex Shulgin
    00003  *
    00004  * This file is part of png++ the C++ wrapper for libpng.  PNG++ is free
    00005  * software; the exact copying conditions are as follows:
    00006  *
    00007  * Redistribution and use in source and binary forms, with or without
    00008  * modification, are permitted provided that the following conditions are met:
    00009  *
    00010  * 1. Redistributions of source code must retain the above copyright notice,
    00011  * this list of conditions and the following disclaimer.
    00012  *
    00013  * 2. Redistributions in binary form must reproduce the above copyright
    00014  * notice, this list of conditions and the following disclaimer in the
    00015  * documentation and/or other materials provided with the distribution.
    00016  *
    00017  * 3. The name of the author may not be used to endorse or promote products
    00018  * derived from this software without specific prior written permission.
    00019  *
    00020  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
    00021  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00022  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
    00023  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00024  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
    00025  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    00026  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    00027  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    00028  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00029  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00030  */
    00031 #ifndef PNGPP_TYPES_HPP_INCLUDED
    00032 #define PNGPP_TYPES_HPP_INCLUDED
    00033
    00034 #include <png.h>
    00035
    00036 namespace png
    00037 {
    00038
    00039     typedef png_byte byte;
    00040     typedef png_uint_16 uint_16;
    00041     typedef png_uint_32 uint_32;
    00042     typedef png_fixed_point fixed_point;
    00043     typedef png_color_8 color_info;
    00044     typedef png_color_16 color_info_16;
    00045
    00046     enum color_type
    00047     {
    00048         color_type_none       = -1,
    00049         color_type_gray       = PNG_COLOR_TYPE_GRAY,
    00050         color_type_palette    = PNG_COLOR_TYPE_PALETTE,
    00051         color_type_rgb        = PNG_COLOR_TYPE_RGB,
    00052         color_type_rgb_alpha  = PNG_COLOR_TYPE_RGB_ALPHA,
    00053         color_type_gray_alpha = PNG_COLOR_TYPE_GRAY_ALPHA,
    00054         color_type_rgba       = PNG_COLOR_TYPE_RGBA,
    00055         color_type_ga         = PNG_COLOR_TYPE_GA
    00056     };
    00057
    00058     enum color_mask
    00059     {
    00060         color_mask_palette = PNG_COLOR_MASK_PALETTE,
    00061         color_mask_color   = PNG_COLOR_MASK_COLOR,
    00062         color_mask_rgb     = color_mask_color,
    00063         color_mask_alpha   = PNG_COLOR_MASK_ALPHA
    00064     };
    00065
    00066     enum filler_type
    00067     {
    00068         filler_before = PNG_FILLER_BEFORE,
    00069         filler_after  = PNG_FILLER_AFTER
    00070     };
    00071
    00072     enum rgb_to_gray_error_action
    00073     {
    00074         rgb_to_gray_silent  = 1,
    00075         rgb_to_gray_warning = 2,
    00076         rgb_to_gray_error   = 3
    00077     };
    00078
    00079     enum interlace_type
    00080     {
    00081         interlace_none  = PNG_INTERLACE_NONE,
    00082         interlace_adam7 = PNG_INTERLACE_ADAM7
    00083     };
    00084
    00085     enum compression_type
    00086     {
    00087         compression_type_base    = PNG_COMPRESSION_TYPE_BASE,
    00088         compression_type_default = PNG_COMPRESSION_TYPE_DEFAULT
    00089     };
    00090
    00091     enum filter_type
    00092     {
    00093         filter_type_base        = PNG_FILTER_TYPE_BASE,
    00094         intrapixel_differencing = PNG_INTRAPIXEL_DIFFERENCING,
    00095         filter_type_default     = PNG_FILTER_TYPE_DEFAULT
    00096     };
    00097
    00098     enum chunk
    00099     {
    00100         chunk_gAMA = PNG_INFO_gAMA,
    00101         chunk_sBIT = PNG_INFO_sBIT,
    00102         chunk_cHRM = PNG_INFO_cHRM,
    00103         chunk_PLTE = PNG_INFO_PLTE,
    00104         chunk_tRNS = PNG_INFO_tRNS,
    00105         chunk_bKGD = PNG_INFO_bKGD,
    00106         chunk_hIST = PNG_INFO_hIST,
    00107         chunk_pHYs = PNG_INFO_pHYs,
    00108         chunk_oFFs = PNG_INFO_oFFs,
    00109         chunk_tIME = PNG_INFO_tIME,
    00110         chunk_pCAL = PNG_INFO_pCAL,
    00111         chunk_sRGB = PNG_INFO_sRGB,
    00112         chunk_iCCP = PNG_INFO_iCCP,
    00113         chunk_sPLT = PNG_INFO_sPLT,
    00114         chunk_sCAL = PNG_INFO_sCAL,
    00115         chunk_IDAT = PNG_INFO_IDAT
    00116     };
    00117
    00118 } // namespace png
    00119
    00120 #endif // PNGPP_TYPES_HPP_INCLUDED