亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? libpng.txt

?? Trolltech公司發布的基于C++圖形開發環境
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
libpng.txt - A description on how to use and modify libpng libpng version 1.2.5 - October 3, 2002 Updated and distributed by Glenn Randers-Pehrson <randeg@alum.rpi.edu> Copyright (c) 1998-2002 Glenn Randers-Pehrson For conditions of distribution and use, see copyright notice in png.h. based on: libpng 1.0 beta 6  version 0.96 May 28, 1997 Updated and distributed by Andreas Dilger Copyright (c) 1996, 1997 Andreas Dilger libpng 1.0 beta 2 - version 0.88  January 26, 1996 For conditions of distribution and use, see copyright notice in png.h. Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. Updated/rewritten per request in the libpng FAQ Copyright (c) 1995, 1996 Frank J. T. Wojcik December 18, 1995 & January 20, 1996I. IntroductionThis file describes how to use and modify the PNG reference library(known as libpng) for your own use.  There are five sections to thisfile: introduction, structures, reading, writing, and modification andconfiguration notes for various special platforms.  In addition to thisfile, example.c is a good starting point for using the library, asit is heavily commented and should include everything most peoplewill need.  We assume that libpng is already installed; see theINSTALL file for instructions on how to install libpng.Libpng was written as a companion to the PNG specification, as a wayof reducing the amount of time and effort it takes to support the PNGfile format in application programs.The PNG-1.2 specification is available at <http://www.libpng.org/pub/png>and at <ftp://ftp.uu.net/graphics/png/documents/>.The PNG-1.0 specification is availableas RFC 2083 <ftp://ftp.uu.net/graphics/png/documents/> and as aW3C Recommendation <http://www.w3.org/TR/REC.png.html>. Someadditional chunks are described in the special-purpose public chunksdocuments at <ftp://ftp.uu.net/graphics/png/documents/>.Other informationabout PNG, and the latest version of libpng, can be found at the PNG homepage, <http://www.libpng.org/pub/png/>and at <ftp://ftp.uu.net/graphics/png/>.Most users will not have to modify the library significantly; advancedusers may want to modify it more.  All attempts were made to make it ascomplete as possible, while keeping the code easy to understand.Currently, this library only supports C.  Support for other languagesis being considered.Libpng has been designed to handle multiple sessions at one time,to be easily modifiable, to be portable to the vast majority ofmachines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easyto use.  The ultimate goal of libpng is to promote the acceptance ofthe PNG file format in whatever way possible.  While there is stillwork to be done (see the TODO file), libpng should cover themajority of the needs of its users.Libpng uses zlib for its compression and decompression of PNG files.Further information about zlib, and the latest version of zlib, canbe found at the zlib home page, <http://www.info-zip.org/pub/infozip/zlib/>.The zlib compression utility is a general purpose utility that isuseful for more than PNG files, and can be used without libpng.See the documentation delivered with zlib for more details.You can usually find the source files for the zlib utility wherever youfind the libpng source files.Libpng is thread safe, provided the threads are using differentinstances of the structures.  Each thread should have its ownpng_struct and png_info instances, and thus its own image.Libpng does not protect itself against two threads using thesame instance of a structure.  Note: thread safety may be defeatedby use of some of the MMX assembler code in pnggccrd.c, which is onlycompiled when the user defines PNG_THREAD_UNSAFE_OK.II. StructuresThere are two main structures that are important to libpng, png_structand png_info.  The first, png_struct, is an internal structure thatwill not, for the most part, be used by a user except as the firstvariable passed to every libpng function call.The png_info structure is designed to provide information about thePNG file.  At one time, the fields of png_info were intended to bedirectly accessible to the user.  However, this tended to cause problemswith applications using dynamically loaded libraries, and as a resulta set of interface functions for png_info (the png_get_*() and png_set_*()functions) was developed.  The fields of png_info are still available forolder applications, but it is suggested that applications use the newinterfaces if at all possible.Applications that do make direct access to the members of png_struct (exceptfor png_ptr->jmpbuf) must be recompiled whenever the library is updated,and applications that make direct access to the members of png_info mustbe recompiled if they were compiled or loaded with libpng version 1.0.6,in which the members were in a different order.  In version 1.0.7, themembers of the png_info structure reverted to the old order, as they werein versions 0.97c through 1.0.5.  Starting with version 2.0.0, bothstructures are going to be hidden, and the contents of the structures willonly be accessible through the png_get/png_set functions.The png.h header file is an invaluable reference for programming with libpng.And while I'm on the topic, make sure you include the libpng header file:#include <png.h>III. ReadingWe'll now walk you through the possible functions to call when readingin a PNG file sequentially, briefly explaining the syntax and purposeof each one.  See example.c and png.h for more detail.  Whileprogressive reading is covered in the next section, you will stillneed some of the functions discussed in this section to read a PNGfile.SetupYou will want to do the I/O initialization(*) before you get into libpng,so if it doesn't work, you don't have much to undo.  Of course, youwill also want to insure that you are, in fact, dealing with a PNGfile.  Libpng provides a simple check to see if a file is a PNG file.To use it, pass in the first 1 to 8 bytes of the file to the functionpng_sig_cmp(), and it will return 0 if the bytes match the correspondingbytes of the PNG signature, or nonzero otherwise.  Of course, the more bytesyou pass in, the greater the accuracy of the prediction.If you are intending to keep the file pointer open for use in libpng,you must ensure you don't read more than 8 bytes from the beginningof the file, and you also have to make a call to png_set_sig_bytes_read()with the number of bytes you read from the beginning.  Libpng willthen only check the bytes (if any) that your program didn't read.(*): If you are not using the standard I/O functions, you will needto replace them with custom functions.  See the discussion underCustomizing libpng.    FILE *fp = fopen(file_name, "rb");    if (!fp)    {        return (ERROR);    }    fread(header, 1, number, fp);    is_png = !png_sig_cmp(header, 0, number);    if (!is_png)    {        return (NOT_PNG);    }Next, png_struct and png_info need to be allocated and initialized.  Inorder to ensure that the size of these structures is correct even with adynamically linked libpng, there are functions to initialize andallocate the structures.  We also pass the library version, optionalpointers to error handling functions, and a pointer to a data struct foruse by the error functions, if necessary (the pointer and functions canbe NULL if the default error handlers are to be used).  See the sectionon Changes to Libpng below regarding the old initialization functions.The structure allocation functions quietly return NULL if they fail tocreate the structure, so your application should check for that.    png_structp png_ptr = png_create_read_struct       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,        user_error_fn, user_warning_fn);    if (!png_ptr)        return (ERROR);    png_infop info_ptr = png_create_info_struct(png_ptr);    if (!info_ptr)    {        png_destroy_read_struct(&png_ptr,           (png_infopp)NULL, (png_infopp)NULL);        return (ERROR);    }    png_infop end_info = png_create_info_struct(png_ptr);    if (!end_info)    {        png_destroy_read_struct(&png_ptr, &info_ptr,          (png_infopp)NULL);        return (ERROR);    }If you want to use your own memory allocation routines,define PNG_USER_MEM_SUPPORTED and usepng_create_read_struct_2() instead of png_create_read_struct():    png_structp png_ptr = png_create_read_struct_2       (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,        user_error_fn, user_warning_fn, (png_voidp)        user_mem_ptr, user_malloc_fn, user_free_fn);The error handling routines passed to png_create_read_struct()and the memory alloc/free routines passed to png_create_struct_2()are only necessary if you are not using the libpng supplied errorhandling and memory alloc/free functions.When libpng encounters an error, it expects to longjmp backto your routine.  Therefore, you will need to call setjmp and passyour png_jmpbuf(png_ptr).  If you read the file from differentroutines, you will need to update the jmpbuf field every time you entera new routine that will call a png_*() function.See your documentation of setjmp/longjmp for your compiler for moreinformation on setjmp/longjmp.  See the discussion on libpng errorhandling in the Customizing Libpng section below for more informationon the libpng error handling.  If an error occurs, and libpng longjmp'sback to your setjmp, you will want to call png_destroy_read_struct() tofree any memory.    if (setjmp(png_jmpbuf(png_ptr)))    {        png_destroy_read_struct(&png_ptr, &info_ptr,           &end_info);        fclose(fp);        return (ERROR);    }If you would rather avoid the complexity of setjmp/longjmp issues,you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which caseerrors will result in a call to PNG_ABORT() which defaults to abort().Now you need to set up the input code.  The default for libpng is touse the C function fread().  If you use this, you will need to pass avalid FILE * in the function png_init_io().  Be sure that the file isopened in binary mode.  If you wish to handle reading data in anotherway, you need not call the png_init_io() function, but you must thenimplement the libpng I/O methods discussed in the Customizing Libpngsection below.    png_init_io(png_ptr, fp);If you had previously opened the file and read any of the signature fromthe beginning in order to see if this was a PNG file, you need to letlibpng know that there are some bytes missing from the start of the file.    png_set_sig_bytes(png_ptr, number);Setting up callback codeYou can set up a callback function to handle any unknown chunks in theinput stream. You must supply the function    read_chunk_callback(png_ptr ptr,         png_unknown_chunkp chunk);    {       /* The unknown chunk structure contains your          chunk data: */           png_byte name[5];           png_byte *data;           png_size_t size;       /* Note that libpng has already taken care of          the CRC handling */       /* put your code here.  Return one of the          following: */       return (-n); /* chunk had an error */       return (0); /* did not recognize */       return (n); /* success */    }(You can give your function another name that you like instead of"read_chunk_callback")To inform libpng about your function, use    png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr,        read_chunk_callback);This names not only the callback function, but also a user pointer thatyou can retrieve with    png_get_user_chunk_ptr(png_ptr);At this point, you can set up a callback function that will becalled after each row has been read, which you can use to controla progress meter or the like.  It's demonstrated in pngtest.c.You must supply a function    void read_row_callback(png_ptr ptr, png_uint_32 row,       int pass);    {      /* put your code here */    }(You can give it another name that you like instead of "read_row_callback")To inform libpng about your function, use    png_set_read_status_fn(png_ptr, read_row_callback);Unknown-chunk handlingNow you get to set the way the library processes unknown chunks in theinput PNG stream. Both known and unknown chunks will be read.  Normalbehavior is that known chunks will be parsed into information invarious info_ptr members; unknown chunks will be discarded. To changethis, you can call:    png_set_keep_unknown_chunks(png_ptr, info_ptr, keep,        chunk_list, num_chunks);    keep       - 0: do not keep                 1: keep only if safe-to-copy                 2: keep even if unsafe-to-copy    chunk_list - list of chunks affected (a byte string,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三区高清不卡| 在线观看成人小视频| 午夜精品免费在线| 亚洲亚洲精品在线观看| 亚洲精品国产第一综合99久久| 中文在线一区二区| 国产精品久久久久久久久快鸭 | 国产精品久久免费看| 亚洲精品一区二区三区香蕉| 精品区一区二区| 久久综合丝袜日本网| 欧美激情中文字幕一区二区| 中文av一区二区| 亚洲欧美日韩国产中文在线| 亚洲一级二级三级在线免费观看| 亚洲一区二区欧美| 免费成人小视频| 国产成人丝袜美腿| 色欧美片视频在线观看 | 亚洲v中文字幕| 午夜欧美一区二区三区在线播放| 日韩高清不卡一区二区| 国产综合久久久久影院| 97久久精品人人爽人人爽蜜臀| 色综合久久综合网欧美综合网| 欧美日韩精品一区二区| 日韩一区二区免费在线电影| 国产视频视频一区| 尤物av一区二区| 国内精品久久久久影院一蜜桃| 成人午夜精品在线| 欧美裸体bbwbbwbbw| 2021久久国产精品不只是精品| 国产精品美女久久久久aⅴ| 亚洲一区精品在线| 国产传媒久久文化传媒| 日本电影亚洲天堂一区| 久久综合国产精品| 亚洲国产精品视频| 成人黄色777网| 欧美人伦禁忌dvd放荡欲情| 久久九九全国免费| 婷婷成人综合网| 不卡的av电影| 久久综合九色综合欧美亚洲| 亚洲一区中文在线| 国产91精品在线观看| 91精品国产综合久久久久久| 中文一区一区三区高中清不卡| 天天色图综合网| 99麻豆久久久国产精品免费优播| 91精品国产欧美一区二区| 亚洲丝袜美腿综合| 国产精品一品二品| 欧美一区二区三区免费| 亚洲自拍都市欧美小说| 波多野结衣在线aⅴ中文字幕不卡| 欧美不卡一区二区三区| 亚洲国产精品久久久久婷婷884| 国产福利一区在线| 久久综合五月天婷婷伊人| 久久精品国产亚洲a| 欧美日高清视频| 亚洲曰韩产成在线| 日本精品裸体写真集在线观看| 久久精品夜色噜噜亚洲a∨| 日本色综合中文字幕| 91精品蜜臀在线一区尤物| 亚洲妇女屁股眼交7| 在线看一区二区| 亚洲欧美日韩久久| 在线欧美日韩国产| 亚洲午夜电影在线| 色婷婷激情一区二区三区| 亚洲精品日韩专区silk| 91在线视频观看| 亚洲伦理在线免费看| 91成人网在线| 一区二区日韩av| 欧美日韩在线播放三区四区| 亚洲一区二区三区四区在线免费观看 | 高清在线不卡av| 国产日韩欧美精品电影三级在线| 国产一区二区三区四| 久久免费偷拍视频| 福利一区在线观看| 国产精品久久久久影视| 色先锋久久av资源部| 亚洲国产精品久久不卡毛片| 欧美精品第1页| 美女视频免费一区| 久久先锋影音av| 粉嫩av一区二区三区| 亚洲欧洲日韩综合一区二区| 99久久精品免费精品国产| 亚洲一区在线观看网站| 884aa四虎影成人精品一区| 精品一区二区在线视频| 国产精品传媒入口麻豆| 欧美写真视频网站| 极品瑜伽女神91| 国产精品美女视频| 538在线一区二区精品国产| 久草精品在线观看| 亚洲色图.com| 欧美本精品男人aⅴ天堂| 国产91丝袜在线播放九色| 亚洲福中文字幕伊人影院| 久久亚洲欧美国产精品乐播| 日本乱人伦一区| 精品一区二区成人精品| 亚洲精品成人天堂一二三| 日韩视频国产视频| 91啪亚洲精品| 国产中文一区二区三区| 亚洲自拍欧美精品| 欧美激情一二三区| 91精品国产全国免费观看| 91丨九色丨蝌蚪丨老版| 久久精品噜噜噜成人av农村| 亚洲免费在线看| 26uuu另类欧美| 91精品中文字幕一区二区三区| 成人小视频在线| 久久 天天综合| 石原莉奈在线亚洲二区| ㊣最新国产の精品bt伙计久久| 日韩精品资源二区在线| 精品1区2区3区| www.色精品| 国产一区二区免费看| 日韩激情一区二区| 亚洲美女电影在线| 日本一区二区三区国色天香| 欧美成人乱码一区二区三区| 欧美视频一区在线| 色综合久久久久综合| 高清成人免费视频| 经典三级视频一区| 久久69国产一区二区蜜臀| 日韩成人一级片| 午夜成人免费视频| 亚洲综合激情网| 一区二区三区在线观看视频 | 91免费视频网址| 成人黄色国产精品网站大全在线免费观看| 奇米一区二区三区| 奇米在线7777在线精品| 日韩黄色片在线观看| 天天色天天操综合| 日韩av中文在线观看| 丝瓜av网站精品一区二区| 亚洲h在线观看| 亚洲午夜精品久久久久久久久| 亚洲综合无码一区二区| 一区二区三区欧美日| 一区二区三区日韩| 夜夜操天天操亚洲| 天天色天天操综合| 六月丁香婷婷久久| 国产一区二区不卡在线| 粉嫩欧美一区二区三区高清影视| 国产精品18久久久久久久久| 国产麻豆视频一区| 不卡的av网站| 在线观看一区日韩| 欧美一级日韩不卡播放免费| 欧美一区二区三级| 久久久亚洲高清| 亚洲欧美自拍偷拍色图| 夜夜嗨av一区二区三区中文字幕| 亚洲一二三区视频在线观看| 日日欢夜夜爽一区| 久久99精品国产.久久久久久| 国产一区二区不卡| 91色|porny| 日韩免费福利电影在线观看| 久久人人爽人人爽| 一区二区三区四区不卡在线| 日韩国产欧美视频| 国产乱码精品一品二品| 91色视频在线| 欧美一区二区三区啪啪| 国产精品色婷婷久久58| 亚洲国产日韩一区二区| 国产在线国偷精品产拍免费yy| 成人v精品蜜桃久久一区| 欧美美女bb生活片| 中文字幕免费观看一区| 亚洲无线码一区二区三区| 国产精品1024久久| 欧美中文字幕一区二区三区亚洲| 精品免费国产一区二区三区四区| 国产精品网站一区| 青青草97国产精品免费观看 | 国产精品福利在线播放| 亚洲一二三区视频在线观看| 国产成+人+日韩+欧美+亚洲| 欧美精品亚洲二区| 中文字幕一区免费在线观看 |