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

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

?? pngtest.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:

/* pngtest.c - a simple test program to test libpng
 *
 * libpng 1.2.7 - September 12, 2004
 * For conditions of distribution and use, see copyright notice in png.h
 * Copyright (c) 1998-2004 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 ..."
 */

#include "png.h"

#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;
#  else
     typedef 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

#if !PNG_DEBUG
#  define SINGLE_ROWBUF_ALLOC  /* makes buffer overruns easier to nail */
#endif

/* Turn on CPU timing
#define PNGTEST_TIMING
*/

#ifdef PNG_NO_FLOATING_POINT_SUPPORTED
#undef PNGTEST_TIMING
#endif

#ifdef PNGTEST_TIMING
static float t_start, t_stop, t_decode, t_encode, t_misc;
#include <time.h>
#endif

/* 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_TIMING
static 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";
#endif

static 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;

void
#ifdef PNG_1_0_X
PNGAPI
#endif
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
void
#ifdef PNG_1_0_X
PNGAPI
#endif
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
    if(png_ptr == NULL || row_number > PNG_UINT_31_MAX) 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");
}

void
#ifdef PNG_1_0_X
PNGAPI
#endif
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
void
#ifdef PNG_1_0_X
PNGAPI
#endif
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
    if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || 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];
void
#ifdef PNG_1_0_X
PNGAPI
#endif
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);
void
#ifdef PNG_1_0_X
PNGAPI
#endif
count_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;

void
#ifdef PNG_1_0_X
PNGAPI
#endif
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);
void
#ifdef PNG_1_0_X
PNGAPI
#endif
count_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_KEYWORD
static void
pngtest_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 void
pngtest_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 void
pngtest_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_KEYWORD
static void
pngtest_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");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩久久不卡| 一区二区三区四区在线免费观看 | 日韩制服丝袜av| 国产色一区二区| 精品视频在线视频| 国产精品88av| 午夜伦理一区二区| 亚洲日本青草视频在线怡红院| 欧美一区二区三区喷汁尤物| caoporen国产精品视频| 老司机精品视频一区二区三区| 亚洲精品伦理在线| 国产情人综合久久777777| 7777精品伊人久久久大香线蕉完整版| 成人免费视频免费观看| 麻豆91在线观看| 亚洲电影一级片| 亚洲人123区| 国产欧美日韩另类视频免费观看 | 国产日韩欧美精品一区| 69精品人人人人| 欧美视频一二三区| 91亚洲精华国产精华精华液| 国产一区二区在线影院| 午夜精品福利一区二区三区蜜桃| 亚洲欧洲无码一区二区三区| 国产欧美日韩精品a在线观看| 欧美一卡二卡在线观看| 欧美色中文字幕| 不卡一区二区三区四区| 国产精品一级在线| 日韩电影在线一区二区三区| 国产亚洲成aⅴ人片在线观看| 在线免费观看一区| 国模无码大尺度一区二区三区| 久久一区二区三区四区| 99久久久精品免费观看国产蜜| 中文字幕色av一区二区三区| 欧美日韩国产综合久久| 天天综合网天天综合色| 日韩欧美一级在线播放| 极品少妇xxxx偷拍精品少妇| 99免费精品在线观看| 久久99精品久久久久婷婷| 蜜芽一区二区三区| 青青草原综合久久大伊人精品优势| 亚洲一区二区三区国产| 一区二区欧美国产| 亚洲自拍偷拍麻豆| 一区二区三区电影在线播| 欧美一区二区三区视频在线观看| 99综合影院在线| 久久66热偷产精品| 亚洲欧美一区二区三区国产精品| 精品嫩草影院久久| 欧洲亚洲国产日韩| 在线影视一区二区三区| 国产99久久久精品| 国产一区二区调教| 老司机精品视频在线| 亚洲成av人片| 亚洲成人自拍一区| 亚洲国产精品影院| 亚洲一区二区三区在线播放| 亚洲精品亚洲人成人网在线播放| 国产欧美日韩卡一| 中文字幕一区日韩精品欧美| 久久久久久久久99精品| 亚洲天天做日日做天天谢日日欢| 国产午夜亚洲精品不卡| 欧美www视频| 欧美性高清videossexo| 偷拍一区二区三区| 国产999精品久久久久久| 欧美在线观看视频一区二区三区| 国产精品久久久久久户外露出| 国产精品久久久久影视| 国产精品毛片无遮挡高清| 一区二区三区在线观看视频| 亚洲一区在线观看视频| 免费日本视频一区| 国产在线不卡视频| 国产麻豆精品一区二区| 成人免费视频免费观看| 色av综合在线| 午夜精品一区二区三区免费视频 | 91视频com| 欧美日韩久久一区| 91精品婷婷国产综合久久| 欧美群妇大交群中文字幕| 欧美伊人久久久久久久久影院 | 国产福利精品导航| 日韩在线一区二区| 91精品啪在线观看国产60岁| 日韩精品欧美精品| 亚洲国产精华液网站w| 亚洲日本乱码在线观看| 亚洲精品成人悠悠色影视| 亚洲亚洲人成综合网络| 精品一区二区影视| 另类调教123区| 91丨九色丨蝌蚪丨老版| 欧美少妇bbb| 国产欧美日韩激情| av在线综合网| 蜜桃久久久久久| av综合在线播放| 91视视频在线直接观看在线看网页在线看| 在线免费不卡视频| 日韩欧美激情在线| 亚洲国产精品一区二区久久| 久草在线在线精品观看| 欧美日韩国产精品成人| 国产日韩欧美a| 久久av资源网| 欧美在线看片a免费观看| 最新久久zyz资源站| 精品一区二区三区免费毛片爱| 欧美色精品在线视频| 国产欧美一区二区三区沐欲| 另类小说欧美激情| 欧美亚洲动漫制服丝袜| 亚洲天堂av一区| 国产一本一道久久香蕉| 日韩欧美高清在线| 亚洲激情男女视频| 韩国精品免费视频| 欧洲精品在线观看| 久久久久久久久一| 亚洲va国产天堂va久久en| 99久久免费国产| 欧美日韩国产综合一区二区三区| 亚洲一区日韩精品中文字幕| 国内国产精品久久| 日韩欧美一级特黄在线播放| 国产精品毛片久久久久久| 国产乱对白刺激视频不卡| 精品国产一区二区国模嫣然| 亚洲v精品v日韩v欧美v专区| 欧美日韩国产大片| 亚洲午夜精品网| 欧美日韩色一区| 一区二区三区四区精品在线视频| 色噜噜狠狠色综合中国| 中文字幕亚洲成人| 丁香六月久久综合狠狠色| 欧美区一区二区三区| 午夜精品久久一牛影视| 欧美色图一区二区三区| 亚洲午夜影视影院在线观看| 色一情一伦一子一伦一区| 亚洲二区在线视频| 国产福利91精品| 精品欧美一区二区在线观看| 香蕉加勒比综合久久| 欧美性生活影院| 一区二区三区美女| 91浏览器打开| 亚洲精品亚洲人成人网| 成人app下载| 精品国产乱码久久久久久蜜臀| 亚洲三级理论片| 色一情一乱一乱一91av| 午夜视频一区在线观看| 欧美一区二区网站| 国产乱码一区二区三区| 国产精品无人区| 91福利在线观看| 国产精品久久午夜夜伦鲁鲁| 成人激情综合网站| 在线成人av网站| 国产精品99久久久久久宅男| 中文字幕一区二区三区不卡 | 国产精品拍天天在线| 97se亚洲国产综合自在线不卡| 亚洲女同ⅹxx女同tv| 看电影不卡的网站| 久久久久久久电影| 99国产精品久久久久| 亚洲同性同志一二三专区| 欧美日韩精品一区二区三区| av一本久道久久综合久久鬼色| 欧美激情一区二区三区四区| 99久久久久久| 午夜伦理一区二区| 精品久久一区二区三区| 99国产精品久久| 天堂在线一区二区| 久久久久久久久久久电影| 欧美亚洲精品一区| 狠狠狠色丁香婷婷综合久久五月| 日韩美女视频一区二区 | 欧美午夜精品久久久久久超碰 | 丁香网亚洲国际| 亚洲高清免费一级二级三级| 国产日产精品一区| 欧美丝袜丝交足nylons图片| 成人综合激情网| 国产精品亲子伦对白| 国产精品污网站|