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

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

?? libpng.txt

?? qt-x11-opensource-src-4.1.4.tar.gz源碼
?? TXT
?? 第 1 頁 / 共 5 頁
字號:
libpng.txt - A description on how to use and modify libpng libpng version 1.2.8 - December 3, 2004 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2004 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 specification (second edition), November 2003, is available asa W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2003 (E)) at<http://www.w3.org/TR/2003/REC-PNG-20031110/The W3C and ISO documents have identical technical content.The PNG-1.2 specification is available at<http://www.libpng.org/pub/png/documents/>The PNG-1.0 specification is availableas RFC 2083 <http://www.libpng.org/pub/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 <http://www.libpng.org/pub/png/documents/>.Other informationabout PNG, and the latest version of libpng, can be found at the PNG homepage, <http://www.libpng.org/pub/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);Width and height limitsThe PNG specification allows the width and height of an image to be aslarge as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.Since very few applications really need to process such large images,we have imposed an arbitrary 1-million limit on rows and columns.Larger images will be rejected immediately with a png_error() call. Ifyou wish to override this limit, you can use   png_set_user_limits(png_ptr, width_max, height_max);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区三四区视频在线观看 | 在线综合亚洲欧美在线视频 | fc2成人免费人成在线观看播放| 一本一道久久a久久精品| 欧美xxxxx牲另类人与| 亚洲激情自拍视频| 高清不卡在线观看av| 日韩一区二区三区在线| 亚洲动漫第一页| 岛国av在线一区| 亚洲欧洲99久久| 成人ar影院免费观看视频| 在线观看视频91| 亚洲天堂久久久久久久| 蜜臀av亚洲一区中文字幕| 一本久道中文字幕精品亚洲嫩| 久久综合色鬼综合色| 日本强好片久久久久久aaa| 色美美综合视频| 成人免费在线视频| 国产91精品久久久久久久网曝门| 日韩欧美一区在线观看| 亚洲成人av福利| 欧美视频自拍偷拍| 亚洲一区二区影院| 日本福利一区二区| 亚洲免费在线观看| 91丨九色丨蝌蚪富婆spa| 国产欧美日产一区| 国产成人av电影| 国产色婷婷亚洲99精品小说| 国产一二精品视频| 国产欧美一区二区精品性色超碰| 精品一区二区三区久久| 欧美成人精品福利| 国产精品一区二区久久不卡 | 欧美高清精品3d| 三级在线观看一区二区| 91精品国产色综合久久不卡电影 | 欧美日韩视频不卡| 亚洲激情自拍偷拍| 亚洲最色的网站| 国产精品一区二区91| 久久综合一区二区| 国产一区在线观看视频| 久久精品一二三| 成人免费视频app| 亚洲婷婷在线视频| 欧美午夜一区二区三区| 五月天中文字幕一区二区| 56国语精品自产拍在线观看| 免费精品99久久国产综合精品| 欧美不卡一二三| 懂色av一区二区三区蜜臀| 亚洲人妖av一区二区| 欧美群妇大交群中文字幕| 美国十次了思思久久精品导航| 久久久久久亚洲综合| 欧美视频一区二区三区在线观看| 日韩福利视频导航| 国产天堂亚洲国产碰碰| 91黄色免费网站| 狠狠色狠狠色综合日日91app| 精品日韩欧美一区二区| 久久电影国产免费久久电影| 久久精品一区二区三区不卡牛牛| 91老司机福利 在线| 舔着乳尖日韩一区| 国产精品色眯眯| 欧美福利视频一区| 国产激情91久久精品导航 | 国产酒店精品激情| 一区二区三区四区在线免费观看| 91麻豆精品国产91久久久| 国产高清精品久久久久| 亚洲第一主播视频| 国产精品久久久久久久蜜臀| 欧美浪妇xxxx高跟鞋交| 不卡电影一区二区三区| 天堂一区二区在线免费观看| 中文字幕欧美激情一区| 91精品国产综合久久蜜臀| av电影一区二区| 韩国精品主播一区二区在线观看| 亚洲影视资源网| 国产欧美日韩卡一| 日韩免费看网站| 欧美日韩国产免费一区二区| 成人手机电影网| 国内精品视频666| 婷婷亚洲久悠悠色悠在线播放| 亚洲男人天堂av| 国产网红主播福利一区二区| 欧美一区二区性放荡片| 在线精品视频小说1| 国产精品1区2区3区| 奇米亚洲午夜久久精品| 美女在线视频一区| 亚洲欧美色图小说| 国产精品久久久久四虎| 久久综合久久久久88| 91精品国产综合久久久久久| 在线观看区一区二| 在线亚洲免费视频| 99精品视频在线播放观看| 国产69精品久久777的优势| 九九精品一区二区| 精品一区二区久久久| 日本成人在线一区| 无吗不卡中文字幕| 天涯成人国产亚洲精品一区av| 亚洲伊人伊色伊影伊综合网| 亚洲黄色录像片| 综合欧美一区二区三区| 亚洲人成在线观看一区二区| 日韩美女视频一区| 一区二区三区高清| 亚洲高清免费视频| 亚洲成人av电影| 日韩电影一区二区三区四区| 视频一区国产视频| 日本免费新一区视频| 蜜臀国产一区二区三区在线播放| 美女久久久精品| 国产成人精品一区二区三区网站观看 | 色激情天天射综合网| 91福利国产成人精品照片| 欧美综合久久久| 91精品国产福利| 精品处破学生在线二十三| 久久精品视频一区| 亚洲欧美另类久久久精品| 亚洲综合清纯丝袜自拍| 亚洲成人手机在线| 老司机精品视频导航| 国产·精品毛片| 2017欧美狠狠色| 中文字幕欧美国产| 一区av在线播放| 美国av一区二区| 成人黄色综合网站| 91福利视频久久久久| 日韩手机在线导航| 国产精品久久久久久久午夜片| 亚洲一区视频在线观看视频| 日本午夜精品视频在线观看| 国产精品一区二区91| 欧洲另类一二三四区| 精品国产99国产精品| 亚洲男同1069视频| 精品一区二区影视| 91在线高清观看| 日韩欧美一区电影| 亚洲青青青在线视频| 日本免费在线视频不卡一不卡二| 丁香激情综合国产| 欧美区在线观看| 亚洲欧洲成人自拍| 久久精品国产亚洲a| 91麻豆自制传媒国产之光| 欧美高清视频一二三区 | 菠萝蜜视频在线观看一区| 欧美一区二区三区四区五区| 国产精品久久久久久妇女6080 | 欧美日本在线视频| 国产精品女同一区二区三区| 日韩精品免费视频人成| kk眼镜猥琐国模调教系列一区二区| 欧美久久一区二区| 国产精品动漫网站| 激情图片小说一区| 欧美男男青年gay1069videost | 成人白浆超碰人人人人| 91精品国产aⅴ一区二区| 亚洲视频图片小说| 国产黄色精品视频| 日韩一区二区三区观看| 亚洲一区二区三区四区中文字幕| 国产成人aaa| 精品国产乱码久久久久久久久| 亚洲影视资源网| 色综合久久88色综合天天6| 国产日韩欧美综合一区| 久久99久久99| 欧美精品黑人性xxxx| 亚洲精品亚洲人成人网 | 国产美女一区二区三区| 7777女厕盗摄久久久| 亚洲国产一区二区三区青草影视| av高清不卡在线| 中文一区在线播放| 国产福利91精品一区| 久久久久综合网| 激情丁香综合五月| www日韩大片| 精品一区二区三区在线播放视频| 欧美一级xxx| 波多野洁衣一区| 国产精品国产三级国产三级人妇 | 国产欧美日韩综合精品一区二区|