亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩一卡二卡三卡| 成人精品在线视频观看| 中文字幕视频一区| 欧美成人国产一区二区| 4438成人网| 在线播放日韩导航| 欧美精品高清视频| 欧美肥胖老妇做爰| 欧美这里有精品| 色视频欧美一区二区三区| 91免费看视频| 91九色02白丝porn| 天天亚洲美女在线视频| 午夜精品123| 国产一级精品在线| 日韩国产高清在线| a4yy欧美一区二区三区| 日欧美一区二区| 亚洲国产精品自拍| 亚洲线精品一区二区三区八戒| 亚洲另类在线视频| 亚洲综合自拍偷拍| 久久美女艺术照精彩视频福利播放| 337p亚洲精品色噜噜噜| 国产精品一区二区x88av| 日本二三区不卡| 精品国产在天天线2019| 亚洲视频在线观看一区| 国产视频在线观看一区二区三区 | 日本一区二区久久| 亚洲chinese男男1069| 国产精品1区2区| 欧美日韩亚洲国产综合| 国产精品久久久久久久久图文区| 亚洲电影视频在线| 成人av免费在线播放| 91精品国产一区二区三区香蕉| 国产精品免费人成网站| 毛片基地黄久久久久久天堂| 91一区二区三区在线观看| av一区二区三区| 精品国产麻豆免费人成网站| 亚洲大片免费看| 91视频在线看| 久久久亚洲精华液精华液精华液| 五月婷婷欧美视频| 色哟哟一区二区| 久久久蜜桃精品| 亚洲成人精品一区| 色婷婷av一区二区三区gif| 久久久久久电影| 美日韩一区二区| 欧美日精品一区视频| 自拍偷拍国产亚洲| 亚洲欧美电影一区二区| 高清日韩电视剧大全免费| 91精品国产综合久久香蕉麻豆 | 91国产精品成人| 欧美激情一二三区| 激情综合色丁香一区二区| 在线不卡欧美精品一区二区三区| 一区二区三区国产| 91色婷婷久久久久合中文| 国产精品日产欧美久久久久| 国产一区二区91| caoporn国产精品| 国产偷国产偷精品高清尤物| 精一区二区三区| 亚洲精品在线一区二区| 麻豆国产欧美日韩综合精品二区 | 调教+趴+乳夹+国产+精品| 91国偷自产一区二区三区成为亚洲经典| 亚洲欧洲精品天堂一级 | 欧美日韩日日夜夜| 亚洲一区二区综合| 色噜噜夜夜夜综合网| 亚洲男人的天堂网| 99re66热这里只有精品3直播 | 不卡的看片网站| 中文字幕一区二区三中文字幕| 成人妖精视频yjsp地址| 中文字幕+乱码+中文字幕一区| 国产91丝袜在线18| 国产精品无圣光一区二区| 成人免费毛片嘿嘿连载视频| 国产精品国产三级国产aⅴ中文| 成人中文字幕合集| 中文字幕在线不卡一区| 国产精品123区| 亚洲欧洲精品天堂一级| 在线区一区二视频| 亚洲成人激情社区| 欧美精三区欧美精三区| 蜜桃一区二区三区在线| 精品久久久久久最新网址| 狠狠色狠狠色综合系列| 欧美激情综合在线| 色综合 综合色| 亚洲.国产.中文慕字在线| 欧美一区二区在线免费观看| 日本不卡一区二区三区高清视频| 欧美成人国产一区二区| 成人精品免费网站| 亚洲一级二级在线| 欧美精品自拍偷拍动漫精品| 国产综合色视频| 国产精品久久久久久久久快鸭 | 亚洲欧洲av另类| 精品视频在线免费| 蜜臀av一区二区在线观看| 一本一道波多野结衣一区二区| 亚洲成人资源网| 3atv一区二区三区| 福利电影一区二区| 一区二区三区四区高清精品免费观看| 国产在线精品不卡| 中文字幕亚洲不卡| 6080国产精品一区二区| 国产mv日韩mv欧美| 亚洲国产欧美在线人成| 精品福利在线导航| 色婷婷精品久久二区二区蜜臂av | 日本在线播放一区二区三区| 精品人在线二区三区| 99久久精品免费观看| 日本色综合中文字幕| 国产精品欧美久久久久一区二区 | 午夜av电影一区| 国产欧美一二三区| 欧美麻豆精品久久久久久| 国产成人三级在线观看| 亚洲v中文字幕| 亚洲国产成人私人影院tom| 欧美色图一区二区三区| 一区二区在线免费| 精品1区2区在线观看| 欧美亚一区二区| 国产99精品在线观看| 日韩av午夜在线观看| 中文文精品字幕一区二区| 欧美日韩国产综合一区二区 | 亚洲图片另类小说| 精品国产百合女同互慰| 欧美日韩一区二区三区在线| 成人美女在线观看| 欧美aaaaa成人免费观看视频| 亚洲欧洲三级电影| 精品电影一区二区三区| 欧美日韩精品二区第二页| 99久久婷婷国产综合精品电影| 九九在线精品视频| 五月天激情小说综合| 中文字幕中文乱码欧美一区二区| 日韩精品一区在线观看| 欧美最新大片在线看| 国产999精品久久久久久 | 日韩女优av电影在线观看| 色综合网色综合| 丁香激情综合国产| 激情亚洲综合在线| 丝袜诱惑亚洲看片 | 欧美色大人视频| 99麻豆久久久国产精品免费优播| 国产揄拍国内精品对白| 青青草国产成人av片免费| 亚洲一区日韩精品中文字幕| 亚洲视频一二三| 国产精品高潮呻吟| 国产欧美一区二区精品性色超碰 | 国产精品白丝av| 蜜臀久久久久久久| 午夜视频在线观看一区二区| 夜夜夜精品看看| 亚洲免费在线播放| 亚洲视频在线观看一区| 亚洲少妇30p| 亚洲婷婷国产精品电影人久久| 国产精品国产三级国产普通话三级 | 3d动漫精品啪啪1区2区免费| 欧美日韩精品福利| 欧美精品日日鲁夜夜添| 日本高清成人免费播放| 91丨九色丨黑人外教| 一区二区三区四区在线播放| 中文字幕中文在线不卡住| 一区视频在线播放| 亚洲精品伦理在线| 亚洲九九爱视频| 亚洲宅男天堂在线观看无病毒| 欧美日韩国产一二三| 欧美精选在线播放| 欧美一区二区精品在线| 欧美一级精品大片| 欧美一区二区三区视频在线观看| 7777精品伊人久久久大香线蕉完整版 | 色婷婷av一区二区三区软件 | 国产精品国产馆在线真实露脸| 欧美极品少妇xxxxⅹ高跟鞋| 中文字幕视频一区| 一区二区三区精品在线观看|