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

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

?? libpng.txt

?? qtopia-phone-2.2.0下png工具庫源代碼實現。
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
libpng.txt - A description on how to use and modify libpng libpng version 1.0.9 - January 31, 2001 Updated and distributed by Glenn Randers-Pehrson <randeg@alum.rpi.edu> Copyright (c) 1998, 1999, 2000 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.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,                 five bytes per chunk, NULL or '\0' if

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天色图综合网| 亚洲啪啪综合av一区二区三区| 国产成人精品三级麻豆| 亚洲欧洲日韩一区二区三区| 欧美日韩免费视频| 粉嫩一区二区三区性色av| 午夜精品视频一区| 亚洲免费av高清| 日韩欧美国产1| 欧美日韩美女一区二区| 93久久精品日日躁夜夜躁欧美| 极品尤物av久久免费看| 偷拍日韩校园综合在线| 亚洲精品国产无套在线观| 国产精品日产欧美久久久久| 精品国产乱码久久久久久免费| 欧美一区二区三区在线看| 欧美日韩视频第一区| 欧美色图激情小说| 色丁香久综合在线久综合在线观看| 成人免费视频一区| 粉嫩嫩av羞羞动漫久久久| 国产成人精品综合在线观看| 国产白丝精品91爽爽久久| 国产一区二区在线视频| 国产盗摄一区二区| 国产不卡在线一区| av在线播放不卡| 色香蕉久久蜜桃| 欧美美女一区二区在线观看| 69堂精品视频| 久久婷婷国产综合精品青草| 日本一区二区视频在线| 日韩毛片高清在线播放| 亚洲精品精品亚洲| 男人的天堂久久精品| 国产91精品一区二区麻豆网站 | 亚洲一二三四在线观看| 午夜精品久久久久久| 久久99精品国产麻豆不卡| 国产91对白在线观看九色| 在线精品观看国产| 精品国产百合女同互慰| 亚洲啪啪综合av一区二区三区| 亚洲成人av一区| 国产精品一区不卡| 欧美系列在线观看| 国产日韩v精品一区二区| 亚洲免费色视频| 亚洲国产wwwccc36天堂| 成人激情小说网站| 91麻豆精品国产无毒不卡在线观看 | 一本色道久久综合亚洲aⅴ蜜桃| 欧美日韩一区二区欧美激情| 91精品啪在线观看国产60岁| 自拍av一区二区三区| 国内精品视频一区二区三区八戒| 欧美亚洲国产一区二区三区va| 国产日韩影视精品| 精品一区中文字幕| 欧美美女直播网站| 一区二区三区在线免费视频 | 播五月开心婷婷综合| 精品久久久久久久久久久久久久久 | 亚洲另类春色国产| 国产精品911| 久久精品人人爽人人爽| 久久99精品国产麻豆婷婷| 91精品国产aⅴ一区二区| 亚洲福利视频导航| 欧美亚洲一区二区在线观看| 亚洲色大成网站www久久九九| 成人av小说网| 中文字幕一区二区三区在线观看| 狠狠色狠狠色合久久伊人| 精品乱码亚洲一区二区不卡| 精品一区精品二区高清| www成人在线观看| 国产精品主播直播| 国产精品电影院| 日韩女优av电影| 人人爽香蕉精品| www.激情成人| 欧美老年两性高潮| 亚洲一区影音先锋| 成人高清免费观看| 日韩欧美在线综合网| 久久久影视传媒| 亚洲成人激情综合网| 欧美电影一区二区| 国产精品亚洲第一区在线暖暖韩国| 精品国产免费一区二区三区四区 | 亚洲自拍都市欧美小说| 精品视频全国免费看| 另类小说欧美激情| 日韩欧美久久一区| 日本欧美在线观看| 欧美国产欧美综合| 成人av在线看| 一区二区成人在线| 久久久久高清精品| 欧美色图免费看| 粉嫩aⅴ一区二区三区四区| 五月婷婷综合激情| 欧美国产日韩在线观看| 欧美一级午夜免费电影| 91香蕉视频在线| 国产露脸91国语对白| 亚洲午夜免费视频| 国产精品久久久久久久久晋中| 欧美色综合网站| 91视视频在线直接观看在线看网页在线看| 午夜精品久久久| 亚洲女性喷水在线观看一区| 2022国产精品视频| 日韩午夜电影在线观看| 欧美日韩成人综合| 欧美日韩国产区一| 在线精品视频免费观看| 本田岬高潮一区二区三区| 午夜精品国产更新| 亚洲精选视频免费看| 国产精品传媒在线| 亚洲日本在线看| 亚洲精品国产高清久久伦理二区| 国产精品美女久久久久高潮| 国产欧美日韩不卡| 国产精品久久免费看| 亚洲欧洲精品成人久久奇米网| 国产喷白浆一区二区三区| 国产精品色眯眯| 日韩一区欧美一区| 亚洲一区免费视频| 全部av―极品视觉盛宴亚洲| 蜜桃精品在线观看| 国产一区二区三区蝌蚪| 成人高清免费在线播放| 91成人看片片| 欧美成人女星排行榜| 国产欧美一区二区精品秋霞影院| 国产欧美一区二区精品性色| 最新久久zyz资源站| 亚洲电影一区二区三区| 国产一区二区女| 欧美性大战久久久久久久| 久久久亚洲精品石原莉奈| 亚洲综合男人的天堂| 久久se这里有精品| 在线一区二区三区四区| 日韩一区二区三区在线观看| 国产日韩欧美在线一区| 亚洲综合免费观看高清完整版 | 2019国产精品| 亚洲精品菠萝久久久久久久| 韩国三级在线一区| 日本电影亚洲天堂一区| 久久日一线二线三线suv| 亚洲午夜久久久久久久久电影院| 国产曰批免费观看久久久| 欧洲视频一区二区| 一区在线观看免费| 国产一区二区视频在线| 欧美剧情片在线观看| 尤物av一区二区| 99久久精品国产导航| 欧美国产激情二区三区 | 久久久久久久久久久电影| 三级成人在线视频| 欧美性videosxxxxx| 亚洲欧洲一区二区在线播放| 国产成人精品影视| 久久久久9999亚洲精品| 国产精品一色哟哟哟| 精品福利av导航| 久久成人免费网站| 日韩三级.com| 国产一区二区三区在线看麻豆| 日韩三级.com| 国产麻豆视频精品| 国产三级精品视频| 成人avav在线| 成人免费一区二区三区视频| 色综合久久中文综合久久97| 亚洲色图视频网站| 欧美性猛交一区二区三区精品| 久久新电视剧免费观看| 国产a精品视频| 18涩涩午夜精品.www| 欧美日韩一级黄| 美日韩一区二区三区| 国产情人综合久久777777| 成人黄色免费短视频| 亚洲一区二区黄色| 日韩精品一区二| 国产成人精品亚洲777人妖 | 国产一区在线观看麻豆| 国产精品色噜噜| 日韩一级黄色大片| av午夜精品一区二区三区| 26uuu色噜噜精品一区二区|