⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pngdef.pas

📁 Linux下的基于X11的图形开发环境。
💻 PAS
📖 第 1 页 / 共 3 页
字号:
unit pngdef;// Caution: this file has fallen out of date since version 1.0.5.  Write to// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering// to it up to date.interfaceconst  PNG_LIBPNG_VER_STRING = '1.2.5';  PNG_LIBPNG_VER        =  10205;type  png_uint_32 = Cardinal;  png_int_32  = Longint;  png_uint_16 = Word;  png_int_16  = Smallint;  png_byte    = Byte;  png_size_t  = png_uint_32;  png_charpp  = ^png_charp;  png_charp   = PChar;  float       = single;  int         = Integer;  png_bytepp  = ^png_bytep;  png_bytep   = ^png_byte;  png_uint_16p = ^png_uint_16;  png_uint_16pp = ^png_uint_16p;  png_voidp    = pointer;  time_t       = Longint;  png_doublep  = ^png_double;  png_double   = double;  user_error_ptr  = Pointer;  png_error_ptrp = ^png_error_ptr;  png_error_ptr  = procedure(png_ptr: Pointer; msg: Pointer);             stdcall;  png_rw_ptrp = ^png_rw_ptr;  png_rw_ptr = procedure(png_ptr: Pointer; data: Pointer;                         length: png_size_t);             stdcall;  png_flush_ptrp = ^png_flush_ptr;  png_flush_ptr = procedure(png_ptr: Pointer);             stdcall;  png_progressive_info_ptrp = ^png_progressive_info_ptr;  png_progressive_info_ptr  = procedure(png_ptr: Pointer;                                        info_ptr: Pointer);             stdcall;  png_progressive_end_ptrp  = ^png_progressive_end_ptr;  png_progressive_end_ptr   = procedure(png_ptr: Pointer;                                        info_ptr: Pointer);             stdcall;  png_progressive_row_ptrp  = ^png_progressive_row_ptr;  png_progressive_row_ptr   = procedure(png_ptr: Pointer;                                data: Pointer; length: png_uint_32;                                count: int);             stdcall;  png_read_status_ptr = procedure(png_ptr: Pointer;                          row_number: png_uint_32; pass: int);             stdcall;  png_write_status_ptr = procedure(png_ptr: Pointer;                           row_number: png_uint_32; pass: int);             stdcall;  png_user_chunk_ptr = procedure(png_ptr: Pointer;                             data: png_unknown_chunkp);             stdcall;  png_user_transform_ptr = procedure(png_ptr: Pointer;                             row_info: Pointer; data: png_bytep);             stdcall;  png_colorpp = ^png_colorp;  png_colorp = ^png_color;  png_color = packed record    red, green, blue: png_byte;    end;  png_color_16pp = ^png_color_16p;  png_color_16p = ^png_color_16;  png_color_16 = packed record    index: png_byte;                 //used for palette files    red, green, blue: png_uint_16;   //for use in red green blue files    gray: png_uint_16;               //for use in grayscale files    end;  png_color_8pp = ^png_color_8p;  png_color_8p = ^png_color_8;  png_color_8 = packed record    red, green, blue: png_byte;   //for use in red green blue files    gray: png_byte;               //for use in grayscale files    alpha: png_byte;              //for alpha channel files    end;  png_textpp = ^png_textp;  png_textp = ^png_text;  png_text = packed record    compression: int;            //compression value    key: png_charp;              //keyword, 1-79 character description of "text"    text: png_charp;             //comment, may be empty ("")    text_length: png_size_t;     //length of text field    end;  png_timepp = ^png_timep;  png_timep = ^png_time;  png_time = packed record    year: png_uint_16;           //yyyy    month: png_byte;             //1..12    day: png_byte;               //1..31    hour: png_byte;              //0..23    minute: png_byte;            //0..59    second: png_byte;            //0..60 (leap seconds)    end;  png_infopp = ^png_infop;  png_infop = Pointer;  png_row_infopp = ^png_row_infop;  png_row_infop = ^png_row_info;  png_row_info = packed record    width: png_uint_32;          //width of row    rowbytes: png_size_t;        //number of bytes in row    color_type: png_byte;        //color type of row    bit_depth: png_byte;         //bit depth of row    channels: png_byte;          //number of channels (1, 2, 3, or 4)    pixel_depth: png_byte;       //bits per pixel (depth * channels)    end;  png_structpp = ^png_structp;  png_structp = Pointer;const// Supported compression types for text in PNG files (tEXt, and zTXt).// The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.  PNG_TEXT_COMPRESSION_NONE_WR = -3;  PNG_TEXT_COMPRESSION_zTXt_WR = -2;  PNG_TEXT_COMPRESSION_NONE    = -1;  PNG_TEXT_COMPRESSION_zTXt    = 0;// These describe the color_type field in png_info.// color type masks  PNG_COLOR_MASK_PALETTE   = 1;  PNG_COLOR_MASK_COLOR     = 2;  PNG_COLOR_MASK_ALPHA     = 4;// color types.  Note that not all combinations are legal  PNG_COLOR_TYPE_GRAY       = 0;  PNG_COLOR_TYPE_PALETTE    = PNG_COLOR_MASK_COLOR or                              PNG_COLOR_MASK_PALETTE;  PNG_COLOR_TYPE_RGB        = PNG_COLOR_MASK_COLOR;  PNG_COLOR_TYPE_RGB_ALPHA  = PNG_COLOR_MASK_COLOR or                              PNG_COLOR_MASK_ALPHA;  PNG_COLOR_TYPE_GRAY_ALPHA = PNG_COLOR_MASK_ALPHA;// This is for compression type. PNG 1.0 only defines the single type.  PNG_COMPRESSION_TYPE_BASE    = 0;   // Deflate method 8, 32K window  PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE;// This is for filter type. PNG 1.0 only defines the single type.  PNG_FILTER_TYPE_BASE    = 0;       // Single row per-byte filtering  PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE;// These are for the interlacing type.  These values should NOT be changed.  PNG_INTERLACE_NONE  = 0;      // Non-interlaced image  PNG_INTERLACE_ADAM7 = 1;      // Adam7 interlacing// These are for the oFFs chunk.  These values should NOT be changed.  PNG_OFFSET_PIXEL      = 0;    // Offset in pixels  PNG_OFFSET_MICROMETER = 1;    // Offset in micrometers (1/10^6 meter)// These are for the pCAL chunk.  These values should NOT be changed.  PNG_EQUATION_LINEAR     = 0;  // Linear transformation  PNG_EQUATION_BASE_E     = 1;  // Exponential base e transform  PNG_EQUATION_ARBITRARY  = 2;  // Arbitrary base exponential transform  PNG_EQUATION_HYPERBOLIC = 3;  // Hyperbolic sine transformation// These are for the pHYs chunk.  These values should NOT be changed.  PNG_RESOLUTION_UNKNOWN = 0;   // pixels/unknown unit (aspect ratio)  PNG_RESOLUTION_METER   = 1;   // pixels/meter// These are for the sRGB chunk.  These values should NOT be changed. PNG_sRGB_INTENT_PERCEPTUAL = 0; PNG_sRGB_INTENT_RELATIVE   = 1; PNG_sRGB_INTENT_SATURATION = 2; PNG_sRGB_INTENT_ABSOLUTE   = 3;// Handle alpha and tRNS by replacing with a background color.  PNG_BACKGROUND_GAMMA_UNKNOWN = 0;  PNG_BACKGROUND_GAMMA_SCREEN  = 1;  PNG_BACKGROUND_GAMMA_FILE    = 2;  PNG_BACKGROUND_GAMMA_UNIQUE  = 3;// Values for png_set_crc_action() to say how to handle CRC errors in// ancillary and critical chunks, and whether to use the data contained// therein.  Note that it is impossible to "discard" data in a critical// chunk.  For versions prior to 0.90, the action was always error/quit,// whereas in version 0.90 and later, the action for CRC errors in ancillary// chunks is warn/discard.  These values should NOT be changed.//      value                   action:critical     action:ancillary  PNG_CRC_DEFAULT      = 0;  // error/quit          warn/discard data  PNG_CRC_ERROR_QUIT   = 1;  // error/quit          error/quit  PNG_CRC_WARN_DISCARD = 2;  // (INVALID)           warn/discard data  PNG_CRC_WARN_USE     = 3;  // warn/use data       warn/use data  PNG_CRC_QUIET_USE    = 4;  // quiet/use data      quiet/use data  PNG_CRC_NO_CHANGE    = 5;  // use current value   use current value// Flags for png_set_filter() to say which filters to use.  The flags// are chosen so that they don't conflict with real filter types// below, in case they are supplied instead of the #defined constants.// These values should NOT be changed.  PNG_NO_FILTERS   = $00;  PNG_FILTER_NONE  = $08;  PNG_FILTER_SUB   = $10;  PNG_FILTER_UP    = $20;  PNG_FILTER_AVG   = $40;  PNG_FILTER_PAETH = $80;  PNG_ALL_FILTERS  = PNG_FILTER_NONE or PNG_FILTER_SUB or                     PNG_FILTER_UP   or PNG_FILTER_AVG or                     PNG_FILTER_PAETH;// Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.// These defines should NOT be changed.  PNG_FILTER_VALUE_NONE  = 0;  PNG_FILTER_VALUE_SUB   = 1;  PNG_FILTER_VALUE_UP    = 2;  PNG_FILTER_VALUE_AVG   = 3;  PNG_FILTER_VALUE_PAETH = 4;// Heuristic used for row filter selection.  These defines should NOT be// changed.  PNG_FILTER_HEURISTIC_DEFAULT    = 0;  // Currently "UNWEIGHTED"  PNG_FILTER_HEURISTIC_UNWEIGHTED = 1;  // Used by libpng < 0.95  PNG_FILTER_HEURISTIC_WEIGHTED   = 2;  // Experimental feature  PNG_FILTER_HEURISTIC_LAST       = 3;  // Not a valid valueprocedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp);             stdcall;function png_check_sig(sig: png_bytep; num: int): int;             stdcall;procedure png_chunk_error(png_ptr: png_structp;             const mess: png_charp);             stdcall;procedure png_chunk_warning(png_ptr: png_structp;             const mess: png_charp);             stdcall;procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t);             stdcall;function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep):             png_charp;             stdcall;function png_create_info_struct(png_ptr: png_structp): png_infop;             stdcall;function png_create_read_struct(user_png_ver: png_charp;             error_ptr: user_error_ptr; error_fn: png_error_ptr;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -