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

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

?? pngtest.c

?? qtopia-phone-2.2.0下png工具庫源代碼實現。
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* pngtest.c - a simple test program to test libpng * * libpng 1.0.9 - January 31, 2001 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2001 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This program reads in a PNG image, writes it out again, and then * compares the two files.  If the files are identical, this shows that * the basic chunk handling, filtering, and (de)compression code is working * properly.  It does not currently test all of the transforms, although * it probably should. * * The program will report "FAIL" in certain legitimate cases: * 1) when the compression level or filter selection method is changed. * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192. * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks *    exist in the input file. * 4) others not listed here... * In these cases, it is best to check with another tool such as "pngcheck" * to see what the differences between the two files are. * * If a filename is given on the command-line, then this file is used * for the input, rather than the default "pngtest.png".  This allows * testing a wide variety of files easily.  You can also test a number * of files at once by typing "pngtest -m file1.png file2.png ..." */#if defined(_WIN32_WCE)#  if _WIN32_WCE < 211     __error__ (f|w)printf functions are not supported on old WindowsCE.;#  endif#  include <windows.h>#  include <stdlib.h>#  define READFILE(file, data, length, check) \     if (ReadFile(file, data, length, &check,NULL)) check = 0#  define WRITEFILE(file, data, length, check)) \     if (WriteFile(file, data, length, &check, NULL)) check = 0#  define FCLOSE(file) CloseHandle(file)#else#  include <stdio.h>#  include <stdlib.h>#  include <assert.h>#  define READFILE(file, data, length, check) \     check=(png_size_t)fread(data,(png_size_t)1,length,file)#  define WRITEFILE(file, data, length, check) \     check=(png_size_t)fwrite(data,(png_size_t)1, length, file)#  define FCLOSE(file) fclose(file)#endif#if defined(PNG_NO_STDIO)#if defined(_WIN32_WCE)typedef HANDLE                png_FILE_p;#elsetypedef FILE                * png_FILE_p;#endif#endif/* Makes pngtest verbose so we can find problems (needs to be before png.h) */#ifndef PNG_DEBUG#define PNG_DEBUG 0#endif/* Turn on CPU timing#define PNGTEST_TIMING*/#ifdef PNG_NO_FLOATING_POINT_SUPPORTED#undef PNGTEST_TIMING#endif#ifdef PNGTEST_TIMINGstatic float t_start, t_stop, t_decode, t_encode, t_misc;#include <time.h>#endif#include "png.h"/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */#ifndef png_jmpbuf#  define png_jmpbuf(png_ptr) png_ptr->jmpbuf#endif#ifdef PNGTEST_TIMINGstatic float t_start, t_stop, t_decode, t_encode, t_misc;#if !defined(PNG_tIME_SUPPORTED)#include <time.h>#endif#endif#if defined(PNG_TIME_RFC1123_SUPPORTED)static int tIME_chunk_present=0;static char tIME_string[30] = "no tIME chunk present in file";#endifstatic int verbose = 0;int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));#ifdef __TURBOC__#include <mem.h>#endif/* defined so I can write to a file on gui/windowing platforms *//*  #define STDERR stderr  */#define STDERR stdout   /* for DOS *//* example of using row callbacks to make a simple progress meter */static int status_pass=1;static int status_dots_requested=0;static int status_dots=1;voidread_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);voidread_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass){    if(png_ptr == NULL || row_number > PNG_MAX_UINT) return;    if(status_pass != pass)    {       fprintf(stdout,"\n Pass %d: ",pass);       status_pass = pass;       status_dots = 31;    }    status_dots--;    if(status_dots == 0)    {       fprintf(stdout, "\n         ");       status_dots=30;    }    fprintf(stdout, "r");}voidwrite_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);voidwrite_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass){    if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return;    fprintf(stdout, "w");}#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED)/* Example of using user transform callback (we don't transform anything,   but merely examine the row filters.  We set this to 256 rather than   5 in case illegal filter values are present.) */static png_uint_32 filters_used[256];voidcount_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);voidcount_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data){    if(png_ptr != NULL && row_info != NULL)      ++filters_used[*(data-1)];}#endif#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)/* example of using user transform callback (we don't transform anything,   but merely count the zero samples) */static png_uint_32 zero_samples;voidcount_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);voidcount_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data){   png_bytep dp = data;   if(png_ptr == NULL)return;   /* contents of row_info:    *  png_uint_32 width      width of row    *  png_uint_32 rowbytes   number of bytes in row    *  png_byte color_type    color type of pixels    *  png_byte bit_depth     bit depth of samples    *  png_byte channels      number of channels (1-4)    *  png_byte pixel_depth   bits per pixel (depth*channels)    */    /* counts the number of zero samples (or zero pixels if color_type is 3 */    if(row_info->color_type == 0 || row_info->color_type == 3)    {       int pos=0;       png_uint_32 n, nstop;       for (n=0, nstop=row_info->width; n<nstop; n++)       {          if(row_info->bit_depth == 1)          {             if(((*dp << pos++ ) & 0x80) == 0) zero_samples++;             if(pos == 8)             {                pos = 0;                dp++;             }          }          if(row_info->bit_depth == 2)          {             if(((*dp << (pos+=2)) & 0xc0) == 0) zero_samples++;             if(pos == 8)             {                pos = 0;                dp++;             }          }          if(row_info->bit_depth == 4)          {             if(((*dp << (pos+=4)) & 0xf0) == 0) zero_samples++;             if(pos == 8)             {                pos = 0;                dp++;             }          }          if(row_info->bit_depth == 8)             if(*dp++ == 0) zero_samples++;          if(row_info->bit_depth == 16)          {             if((*dp | *(dp+1)) == 0) zero_samples++;             dp+=2;          }       }    }    else /* other color types */    {       png_uint_32 n, nstop;       int channel;       int color_channels = row_info->channels;       if(row_info->color_type > 3)color_channels--;       for (n=0, nstop=row_info->width; n<nstop; n++)       {          for (channel = 0; channel < color_channels; channel++)          {             if(row_info->bit_depth == 8)                if(*dp++ == 0) zero_samples++;             if(row_info->bit_depth == 16)             {                if((*dp | *(dp+1)) == 0) zero_samples++;                dp+=2;             }          }          if(row_info->color_type > 3)          {             dp++;             if(row_info->bit_depth == 16)dp++;          }       }    }}#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */static int wrote_question = 0;#if defined(PNG_NO_STDIO)/* START of code to validate stdio-free compilation *//* These copies of the default read/write functions come from pngrio.c and *//* pngwio.c.  They allow "don't include stdio" testing of the library. *//* This is the function that does the actual reading of data.  If you are   not reading from a standard C stream, you should create a replacement   read_data function and use it at run time with png_set_read_fn(), rather   than changing the library. */#ifndef USE_FAR_KEYWORDstatic voidpngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length){   png_size_t check;   /* fread() returns 0 on error, so it is OK to store this in a png_size_t    * instead of an int, which is what fread() actually returns.    */   READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check);   if (check != length)   {      png_error(png_ptr, "Read Error");   }}#else/* this is the model-independent version. Since the standard I/O library   can't handle far buffers in the medium and small models, we have to copy   the data.*/#define NEAR_BUF_SIZE 1024#define MIN(a,b) (a <= b ? a : b)static voidpngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length){   int check;   png_byte *n_data;   png_FILE_p io_ptr;   /* Check if data really is near. If so, use usual code. */   n_data = (png_byte *)CVT_PTR_NOCHECK(data);   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);   if ((png_bytep)n_data == data)   {      READFILE(io_ptr, n_data, length, check);   }   else   {      png_byte buf[NEAR_BUF_SIZE];      png_size_t read, remaining, err;      check = 0;      remaining = length;      do      {         read = MIN(NEAR_BUF_SIZE, remaining);         READFILE(io_ptr, buf, 1, err);         png_memcpy(data, buf, read); /* copy far buffer to near buffer */         if(err != read)            break;         else            check += err;         data += read;         remaining -= read;      }      while (remaining != 0);   }   if (check != length)   {      png_error(png_ptr, "read Error");   }}#endif /* USE_FAR_KEYWORD */#if defined(PNG_WRITE_FLUSH_SUPPORTED)static voidpngtest_flush(png_structp png_ptr){#if !defined(_WIN32_WCE)   png_FILE_p io_ptr;   io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));   if (io_ptr != NULL)      fflush(io_ptr);#endif}#endif/* This is the function that does the actual writing of data.  If you are   not writing to a standard C stream, you should create a replacement   write_data function and use it at run time with png_set_write_fn(), rather   than changing the library. */#ifndef USE_FAR_KEYWORDstatic voidpngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length){   png_uint_32 check;   WRITEFILE((png_FILE_p)png_ptr->io_ptr,  data, length, check);   if (check != length)   {      png_error(png_ptr, "Write Error");   }}#else/* this is the model-independent version. Since the standard I/O library   can't handle far buffers in the medium and small models, we have to copy   the data.*/#define NEAR_BUF_SIZE 1024#define MIN(a,b) (a <= b ? a : b)static voidpngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length){   png_uint_32 check;   png_byte *near_data;  /* Needs to be "png_byte *" instead of "png_bytep" */   png_FILE_p io_ptr;   /* Check if data really is near. If so, use usual code. */   near_data = (png_byte *)CVT_PTR_NOCHECK(data);   io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);   if ((png_bytep)near_data == data)   {      WRITEFILE(io_ptr, near_data, length, check);   }   else   {      png_byte buf[NEAR_BUF_SIZE];      png_size_t written, remaining, err;      check = 0;      remaining = length;      do      {         written = MIN(NEAR_BUF_SIZE, remaining);         png_memcpy(buf, data, written); /* copy far buffer to near buffer */         WRITEFILE(io_ptr, buf, written, err);         if (err != written)            break;         else            check += err;         data += written;         remaining -= written;      }      while (remaining != 0);   }   if (check != length)   {      png_error(png_ptr, "Write Error");   }}#endif /* USE_FAR_KEYWORD *//* This function is called when there is a warning, but the library thinks * it can continue anyway.  Replacement functions don't have to do anything * here if you don't want to.  In the default configuration, png_ptr is * not used, but it is passed in case it may be useful. */static voidpngtest_warning(png_structp png_ptr, png_const_charp message){   PNG_CONST char *name = "UNKNOWN (ERROR!)";   if (png_ptr != NULL && png_ptr->error_ptr != NULL)      name = png_ptr->error_ptr;   fprintf(STDERR, "%s: libpng warning: %s\n", name, message);}/* This is the default error handling function.  Note that replacements for * this function MUST NOT RETURN, or the program will likely crash.  This * function is used by default, or if the program supplies NULL for the * error function pointer in png_set_error_fn(). */static voidpngtest_error(png_structp png_ptr, png_const_charp message){   pngtest_warning(png_ptr, message);   /* We can return because png_error calls the default handler, which is    * actually OK in this case. */}#endif /* PNG_NO_STDIO *//* END of code to validate stdio-free compilation *//* START of code to validate memory allocation and deallocation */#ifdef PNG_USER_MEM_SUPPORTED/* Allocate memory.  For reasonable files, size should never exceed   64K.  However, zlib may allocate more then 64K if you don't tell   it not to.  See zconf.h and png.h for more information.  zlib does   need to allocate exactly 64K, so whatever you call here must   have the ability to do that.   This piece of code can be compiled to validate max 64K allocations   by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */typedef struct memory_information{   png_uint_32               size;   png_voidp                 pointer;   struct memory_information FAR *next;} memory_information;typedef memory_information FAR *memory_infop;static memory_infop pinformation = NULL;static int current_allocation = 0;static int maximum_allocation = 0;static int total_allocation = 0;static int num_allocations = 0;extern PNG_EXPORT(png_voidp,png_debug_malloc) PNGARG((png_structp png_ptr,   png_uint_32 size));extern PNG_EXPORT(void,png_debug_free) PNGARG((png_structp png_ptr,   png_voidp ptr));png_voidppng_debug_malloc(png_structp png_ptr, png_uint_32 size){   /* png_malloc has already tested for NULL; png_create_struct calls      png_debug_malloc directly, with png_ptr == NULL which is OK */   if (size == 0)      return (png_voidp)(NULL);   /* This calls the library allocator twice, once to get the requested      buffer and once to get a new free list entry. */   {      memory_infop pinfo = png_malloc_default(png_ptr, sizeof *pinfo);      pinfo->size = size;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图制服丝袜| 岛国av在线一区| 国产成人av电影免费在线观看| 99久久er热在这里只有精品15| 欧美日韩一区二区在线视频| 亚洲国产高清不卡| 毛片一区二区三区| 欧美最猛黑人xxxxx猛交| 国产婷婷色一区二区三区在线| 一区二区三区在线免费观看| 福利91精品一区二区三区| 91精品国产免费久久综合| 亚洲欧美色综合| 成人激情电影免费在线观看| 久久亚洲精品国产精品紫薇| 日本v片在线高清不卡在线观看| 91一区一区三区| 国产精品色眯眯| 国产精品一二三四五| 日韩三级高清在线| 日本免费新一区视频| 欧美探花视频资源| 亚洲曰韩产成在线| 色婷婷综合久久久久中文一区二区| 欧美国产精品专区| 国产91露脸合集magnet | 日韩精品一区二区三区在线 | 欧美片网站yy| 亚洲高清免费观看高清完整版在线观看 | 久久婷婷综合激情| 久久爱www久久做| 666欧美在线视频| 亚洲成人av免费| 欧美日韩国产不卡| 午夜亚洲福利老司机| 在线这里只有精品| 亚洲va欧美va人人爽午夜| 在线观看亚洲成人| 视频在线观看91| 欧美变态tickle挠乳网站| 激情亚洲综合在线| 久久综合狠狠综合| 成人av网站在线观看免费| 国产精品电影一区二区| 91黄色激情网站| 亚洲国产成人91porn| 欧美一区二区三区免费在线看| 免费高清在线视频一区·| 欧美mv和日韩mv国产网站| 国产精品一区二区免费不卡| 国产精品三级久久久久三级| 99久久国产免费看| 亚洲va国产va欧美va观看| 日韩一区二区视频| 成人午夜视频福利| 亚洲高清在线精品| 2017欧美狠狠色| 97精品国产97久久久久久久久久久久| 亚洲精品视频在线观看免费 | 国产亚洲欧美激情| 一本高清dvd不卡在线观看| 日韩国产高清影视| 欧美激情一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 午夜精品久久久久久久久久久| 日韩女同互慰一区二区| 不卡一区中文字幕| 日韩中文字幕91| 国产欧美日本一区视频| 欧美性猛交一区二区三区精品| 久久99精品久久久| 亚洲桃色在线一区| 26uuu另类欧美| 欧美性一二三区| 成人综合在线观看| 日韩国产欧美在线播放| 1024成人网| 久久这里都是精品| 欧美日韩激情一区二区| 波多野结衣中文字幕一区 | 国产福利电影一区二区三区| 夜夜爽夜夜爽精品视频| 国产校园另类小说区| 欧美日韩激情一区| 91免费在线看| 国产精品香蕉一区二区三区| 水野朝阳av一区二区三区| 国产精品久久久久婷婷| 26uuu精品一区二区| 欧美剧情电影在线观看完整版免费励志电影 | av一区二区三区在线| 毛片av中文字幕一区二区| 亚洲综合自拍偷拍| 国产精品久久久久影视| 久久精品欧美一区二区三区不卡| 欧美老女人在线| 色吧成人激情小说| 91在线视频免费91| 国产不卡高清在线观看视频| 美女网站视频久久| 日韩高清在线不卡| 一区二区不卡在线播放| 亚洲三级电影网站| 亚洲视频一区在线| 国产精品久久午夜| 中文字幕中文字幕在线一区 | 国产成人综合亚洲91猫咪| 日韩精品成人一区二区三区| 尤物视频一区二区| 一区二区三区在线观看欧美 | 欧美激情一区在线| 国产亚洲精品aa| 久久中文娱乐网| 久久精品视频一区二区| 国产日韩高清在线| 国产欧美一区二区精品仙草咪| 国产午夜精品理论片a级大结局| 日韩精品一区二区三区蜜臀| 91麻豆精品久久久久蜜臀| 欧美一区二区三区免费观看视频 | 91精品91久久久中77777| 99久久久精品| 91啪在线观看| 欧美日韩在线精品一区二区三区激情| 日本久久电影网| 欧洲av在线精品| 欧美精品视频www在线观看| 91精品免费在线观看| 日韩美女一区二区三区| 久久这里只精品最新地址| 国产精品视频看| 一区二区在线电影| 日韩激情视频网站| 国产做a爰片久久毛片| 成人免费观看男女羞羞视频| 成人av在线网站| 欧美情侣在线播放| 久久综合色之久久综合| 中文字幕视频一区| 亚洲成人免费观看| 极品少妇一区二区三区精品视频| 国产成人av电影在线观看| 91美女福利视频| 欧美一级国产精品| 欧美国产国产综合| 亚洲va天堂va国产va久| 国产精品乡下勾搭老头1| 色婷婷国产精品| 欧美zozozo| 亚洲一区在线观看视频| 麻豆国产91在线播放| 91视频.com| 亚洲精品一区二区三区四区高清| 综合久久一区二区三区| 麻豆免费看一区二区三区| 91女神在线视频| 久久综合九色综合97婷婷女人 | 国产日韩精品一区二区三区| 亚洲综合免费观看高清完整版在线| 蜜乳av一区二区三区| 成人午夜碰碰视频| 日韩一级片网站| 亚洲一区二区三区在线看| 国产成人免费视频网站| 欧美年轻男男videosbes| 国产欧美精品日韩区二区麻豆天美| 亚洲一区二区三区免费视频| 成人午夜看片网址| 欧美一区二区黄色| 亚洲国产另类av| 不卡的av电影在线观看| 日韩欧美一区二区视频| 亚洲精品欧美专区| 成人av电影在线| 久久综合狠狠综合久久综合88 | www.99精品| 精品国产3级a| 免费成人在线观看| 欧美探花视频资源| 亚洲色图在线播放| 国产不卡一区视频| 久久九九国产精品| 久久精品国产亚洲高清剧情介绍| 欧美网站大全在线观看| 一区二区三区欧美| 色婷婷综合久久久久中文| 亚洲欧美自拍偷拍色图| 美女www一区二区| 日韩一区二区精品在线观看| 天天亚洲美女在线视频| 欧美亚洲高清一区二区三区不卡| 亚洲三级免费观看| 一本到不卡精品视频在线观看 | 国产日产欧美一区二区三区| 蜜桃视频免费观看一区| 日韩一级欧美一级| 久久精品国产免费看久久精品| 欧美一区三区四区| 毛片一区二区三区| 久久免费美女视频|