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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rpng2-win.c

?? linux 2.6kernel下面png庫(kù)
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/*---------------------------------------------------------------------------   rpng2 - progressive-model PNG display program                rpng2-win.c   This program decodes and displays PNG files progressively, as if it were   a web browser (though the front end is only set up to read from files).   It supports gamma correction, user-specified background colors, and user-   specified background patterns (for transparent images).  This version is   for 32-bit Windows; it may compile under 16-bit Windows with a little   tweaking (or maybe not).  Thanks to Adam Costello and Pieter S. van der   Meulen for the "diamond" and "radial waves" patterns, respectively.   to do:    - handle quoted command-line args (especially filenames with spaces)    - finish resizable checkerboard-gradient (sizes 4-128?)    - use %.1023s to simplify truncation of title-bar string?    - have minimum window width:  oh well  ---------------------------------------------------------------------------   Changelog:    - 1.01:  initial public release    - 1.02:  fixed cut-and-paste error in usage screen (oops...)    - 1.03:  modified to allow abbreviated options    - 1.04:  removed bogus extra argument from usage fprintf() [Glenn R-P?];              fixed command-line parsing bug    - 1.10:  enabled "message window"/console (thanks to David Geldreich)    - 1.20:  added runtime MMX-enabling/disabling and new -mmx* options    - 1.21:  made minor tweak to usage screen to fit within 25-line console  ---------------------------------------------------------------------------      Copyright (c) 1998-2001 Greg Roelofs.  All rights reserved.      This software is provided "as is," without warranty of any kind,      express or implied.  In no event shall the author or contributors      be held liable for any damages arising in any way from the use of      this software.      Permission is granted to anyone to use this software for any purpose,      including commercial applications, and to alter it and redistribute      it freely, subject to the following restrictions:      1. Redistributions of source code must retain the above copyright         notice, disclaimer, and this list of conditions.      2. Redistributions in binary form must reproduce the above copyright         notice, disclaimer, and this list of conditions in the documenta-         tion and/or other materials provided with the distribution.      3. All advertising materials mentioning features or use of this         software must display the following acknowledgment:            This product includes software developed by Greg Roelofs            and contributors for the book, "PNG: The Definitive Guide,"            published by O'Reilly and Associates.  ---------------------------------------------------------------------------*/#define PROGNAME  "rpng2-win"#define LONGNAME  "Progressive PNG Viewer for Windows"#define VERSION   "1.21 of 29 June 2001"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <setjmp.h>    /* for jmpbuf declaration in readpng2.h */#include <time.h>#include <math.h>      /* only for PvdM background code */#include <windows.h>#include <conio.h>     /* only for _getch() *//* all for PvdM background code: */#ifndef PI#  define PI             3.141592653589793238#endif#define PI_2             (PI*0.5)#define INV_PI_360       (360.0 / PI)#define MAX(a,b)         (a>b?a:b)#define MIN(a,b)         (a<b?a:b)#define CLIP(a,min,max)  MAX(min,MIN((a),max))#define ABS(a)           ((a)<0?-(a):(a))#define CLIP8P(c)        MAX(0,(MIN((c),255)))   /* 8-bit pos. integer (uch) */#define ROUNDF(f)        ((int)(f + 0.5))#define rgb1_max   bg_freq#define rgb1_min   bg_gray#define rgb2_max   bg_bsat#define rgb2_min   bg_brot/* #define DEBUG */     /* this enables the Trace() macros */#include "readpng2.h"   /* typedefs, common macros, readpng2 prototypes *//* could just include png.h, but this macro is the only thing we need * (name and typedefs changed to local versions); note that side effects * only happen with alpha (which could easily be avoided with * "ush acopy = (alpha);") */#define alpha_composite(composite, fg, alpha, bg) {               \    ush temp = ((ush)(fg)*(ush)(alpha) +                          \                (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128);  \    (composite) = (uch)((temp + (temp >> 8)) >> 8);               \}#define INBUFSIZE 4096   /* with pseudo-timing on (1 sec delay/block), this                          *  block size corresponds roughly to a download                          *  speed 10% faster than theoretical 33.6K maximum                          *  (assuming 8 data bits, 1 stop bit and no other                          *  overhead) *//* local prototypes */static void       rpng2_win_init(void);static int        rpng2_win_create_window(void);static int        rpng2_win_load_bg_image(void);static void       rpng2_win_display_row(ulg row);static void       rpng2_win_finish_display(void);static void       rpng2_win_cleanup(void);LRESULT CALLBACK  rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM);static char titlebar[1024], *window_name = titlebar;static char *progname = PROGNAME;static char *appname = LONGNAME;static char *icon_name = PROGNAME;    /* GRR:  not (yet) used */static char *filename;static FILE *infile;static mainprog_info rpng2_info;static uch inbuf[INBUFSIZE];static int incount;static int pat = 6;         /* must be less than num_bgpat */static int bg_image = 0;static int bgscale = 16;static ulg bg_rowbytes;static uch *bg_data;static struct rgb_color {    uch r, g, b;} rgb[] = {    {  0,   0,   0},    /*  0:  black */    {255, 255, 255},    /*  1:  white */    {173, 132,  57},    /*  2:  tan */    { 64, 132,   0},    /*  3:  medium green */    {189, 117,   1},    /*  4:  gold */    {253, 249,   1},    /*  5:  yellow */    {  0,   0, 255},    /*  6:  blue */    {  0,   0, 120},    /*  7:  medium blue */    {255,   0, 255},    /*  8:  magenta */    { 64,   0,  64},    /*  9:  dark magenta */    {255,   0,   0},    /* 10:  red */    { 64,   0,   0},    /* 11:  dark red */    {255, 127,   0},    /* 12:  orange */    {192,  96,   0},    /* 13:  darker orange */    { 24,  60,   0},    /* 14:  dark green-yellow */    { 85, 125, 200}     /* 15:  ice blue */};/* not used for now, but should be for error-checking:static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); *//*    This whole struct is a fairly cheesy way to keep the number of    command-line options to a minimum.  The radial-waves background    type is a particularly poor fit to the integer elements of the    struct...but a few macros and a little fixed-point math will do    wonders for ya.    type bits:       F E D C B A 9 8 7 6 5 4 3 2 1 0                             | | | | |                             | | +-+-+-- 0 = sharp-edged checkerboard                             | |         1 = soft diamonds                             | |         2 = radial waves                             | |       3-7 = undefined                             | +-- gradient #2 inverted?                             +-- alternating columns inverted? */static struct background_pattern {    ush type;    int rgb1_max, rgb1_min;     /* or bg_freq, bg_gray */    int rgb2_max, rgb2_min;     /* or bg_bsat, bg_brot (both scaled by 10)*/} bg[] = {    {0+8,   2,0,  1,15},        /* checkered:  tan/black vs. white/ice blue */    {0+24,  2,0,  1,0},         /* checkered:  tan/black vs. white/black */    {0+8,   4,5,  0,2},         /* checkered:  gold/yellow vs. black/tan */    {0+8,   4,5,  0,6},         /* checkered:  gold/yellow vs. black/blue */    {0,     7,0,  8,9},         /* checkered:  deep blue/black vs. magenta */    {0+8,  13,0,  5,14},        /* checkered:  orange/black vs. yellow */    {0+8,  12,0, 10,11},        /* checkered:  orange/black vs. red */    {1,     7,0,  8,0},         /* diamonds:  deep blue/black vs. magenta */    {1,    12,0, 11,0},         /* diamonds:  orange vs. dark red */    {1,    10,0,  7,0},         /* diamonds:  red vs. medium blue */    {1,     4,0,  5,0},         /* diamonds:  gold vs. yellow */    {1,     3,0,  0,0},         /* diamonds:  medium green vs. black */    {2,    16, 100,  20,   0},  /* radial:  ~hard radial color-beams */    {2,    18, 100,  10,   2},  /* radial:  soft, curved radial color-beams */    {2,    16, 256, 100, 250},  /* radial:  very tight spiral */    {2, 10000, 256,  11,   0}   /* radial:  dipole-moire' (almost fractal) */};static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern);/* Windows-specific global variables (could go in struct, but messy...) */static ulg wimage_rowbytes;static uch *dib;static uch *wimage_data;static BITMAPINFOHEADER *bmih;static HWND global_hwnd;static HINSTANCE global_hInst;static int global_showmode;int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode){    char *args[1024];                 /* arbitrary limit, but should suffice */    char **argv = args;    char *p, *q, *bgstr = NULL;    int argc = 0;    int rc, alen, flen;    int error = 0;    int timing = FALSE;    int have_bg = FALSE;    double LUT_exponent;              /* just the lookup table */    double CRT_exponent = 2.2;        /* just the monitor */    double default_display_exponent;  /* whole display system */    MSG msg;    /* First initialize a few things, just to be sure--memset takes care of     * default background color (black), booleans (FALSE), pointers (NULL),     * etc. */    global_hInst = hInst;    global_showmode = showmode;    filename = (char *)NULL;    memset(&rpng2_info, 0, sizeof(mainprog_info));    /* Next reenable console output, which normally goes to the bit bucket     * for windowed apps.  Closing the console window will terminate the     * app.  Thanks to David.Geldreich@realviz.com for supplying the magical     * incantation. */    AllocConsole();    freopen("CONOUT$", "a", stderr);    freopen("CONOUT$", "a", stdout);    /* Set the default value for our display-system exponent, i.e., the     * product of the CRT exponent and the exponent corresponding to     * the frame-buffer's lookup table (LUT), if any.  This is not an     * exhaustive list of LUT values (e.g., OpenStep has a lot of weird     * ones), but it should cover 99% of the current possibilities.  And     * yes, these ifdefs are completely wasted in a Windows program... */#if defined(NeXT)    /* third-party utilities can modify the default LUT exponent */    LUT_exponent = 1.0 / 2.2;    /*    if (some_next_function_that_returns_gamma(&next_gamma))        LUT_exponent = 1.0 / next_gamma;     */#elif defined(sgi)    LUT_exponent = 1.0 / 1.7;    /* there doesn't seem to be any documented function to     * get the "gamma" value, so we do it the hard way */    infile = fopen("/etc/config/system.glGammaVal", "r");    if (infile) {        double sgi_gamma;        fgets(tmpline, 80, infile);        fclose(infile);        sgi_gamma = atof(tmpline);        if (sgi_gamma > 0.0)            LUT_exponent = 1.0 / sgi_gamma;    }#elif defined(Macintosh)    LUT_exponent = 1.8 / 2.61;    /*    if (some_mac_function_that_returns_gamma(&mac_gamma))        LUT_exponent = mac_gamma / 2.61;     */#else    LUT_exponent = 1.0;   /* assume no LUT:  most PCs */#endif    /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */    default_display_exponent = LUT_exponent * CRT_exponent;    /* If the user has set the SCREEN_GAMMA environment variable as suggested     * (somewhat imprecisely) in the libpng documentation, use that; otherwise     * use the default value we just calculated.  Either way, the user may     * override this via a command-line option. */    if ((p = getenv("SCREEN_GAMMA")) != NULL)        rpng2_info.display_exponent = atof(p);    else        rpng2_info.display_exponent = default_display_exponent;    /* Windows really hates command lines, so we have to set up our own argv.     * Note that we do NOT bother with quoted arguments here, so don't use     * filenames with spaces in 'em! */    argv[argc++] = PROGNAME;    p = cmd;    for (;;) {        if (*p == ' ')            while (*++p == ' ')                ;        /* now p points at the first non-space after some spaces */        if (*p == '\0')            break;    /* nothing after the spaces:  done */        argv[argc++] = q = p;        while (*q && *q != ' ')            ++q;        /* now q points at a space or the end of the string */        if (*q == '\0')            break;    /* last argv already terminated; quit */        *q = '\0';    /* change space to terminator */        p = q + 1;    }    argv[argc] = NULL;   /* terminate the argv array itself */    /* Now parse the command line for options and the PNG filename. */    while (*++argv && !error) {        if (!strncmp(*argv, "-gamma", 2)) {            if (!*++argv)                ++error;            else {                rpng2_info.display_exponent = atof(*argv);                if (rpng2_info.display_exponent <= 0.0)                    ++error;            }        } else if (!strncmp(*argv, "-bgcolor", 4)) {            if (!*++argv)                ++error;            else {                bgstr = *argv;                if (strlen(bgstr) != 7 || bgstr[0] != '#')                    ++error;                else {                    have_bg = TRUE;                    bg_image = FALSE;                }            }        } else if (!strncmp(*argv, "-bgpat", 4)) {            if (!*++argv)                ++error;            else {                pat = atoi(*argv) - 1;                if (pat < 0 || pat >= num_bgpat)                    ++error;                else {                    bg_image = TRUE;                    have_bg = FALSE;                }            }        } else if (!strncmp(*argv, "-timing", 2)) {            timing = TRUE;#if (defined(__i386__) || defined(_M_IX86))        } else if (!strncmp(*argv, "-nommxfilters", 7)) {            rpng2_info.nommxfilters = TRUE;        } else if (!strncmp(*argv, "-nommxcombine", 7)) {            rpng2_info.nommxcombine = TRUE;        } else if (!strncmp(*argv, "-nommxinterlace", 7)) {            rpng2_info.nommxinterlace = TRUE;        } else if (!strcmp(*argv, "-nommx")) {            rpng2_info.nommxfilters = TRUE;            rpng2_info.nommxcombine = TRUE;            rpng2_info.nommxinterlace = TRUE;#endif        } else {            if (**argv != '-') {                filename = *argv;                if (argv[1])   /* shouldn't be any more args after filename */                    ++error;            } else                ++error;   /* not expecting any other options */        }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
7777精品伊人久久久大香线蕉超级流畅| 亚洲mv在线观看| 亚洲日本在线看| 亚洲影视资源网| 蜜桃av噜噜一区二区三区小说| 国内久久精品视频| av电影在线观看不卡| 精品婷婷伊人一区三区三| 精品久久久久久最新网址| 国产精品不卡在线观看| 婷婷综合另类小说色区| 国产成人福利片| 欧美亚洲动漫精品| 国产人成亚洲第一网站在线播放| 一区二区三区**美女毛片| 国产综合色精品一区二区三区| 91小视频在线免费看| 欧美一级精品在线| 亚洲日本一区二区三区| 加勒比av一区二区| 在线中文字幕一区二区| 久久一日本道色综合| 亚洲一区在线免费观看| 国产精品亚洲视频| 欧美精品在线视频| 国产精品女同一区二区三区| 日韩国产欧美在线视频| 91日韩在线专区| 精品国产乱码久久久久久图片| 一区二区三区产品免费精品久久75| 韩国v欧美v亚洲v日本v| 欧美日韩在线播放一区| 国产精品人成在线观看免费| 捆绑变态av一区二区三区| 在线观看视频一区二区| 国产精品久久777777| 久久99精品网久久| 91精选在线观看| 国产精品欧美精品| 国产精品自拍三区| 国产精品综合一区二区三区| 91视频在线观看| 久久蜜桃av一区二区天堂 | 久久成人久久鬼色| 欧美日韩在线免费视频| 中文字幕一区二区三区色视频 | 国产日韩精品一区二区浪潮av | 日韩欧美亚洲国产精品字幕久久久 | 日韩高清一区在线| 色噜噜狠狠成人网p站| 国产人成亚洲第一网站在线播放| 捆绑紧缚一区二区三区视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产精品女上位| 欧美巨大另类极品videosbest | 色偷偷久久人人79超碰人人澡| 久久久一区二区三区| 秋霞av亚洲一区二区三| 欧美无砖砖区免费| 亚洲国产一区视频| 一本一道久久a久久精品综合蜜臀| 国产亚洲短视频| 国产一区二区在线电影| 56国语精品自产拍在线观看| 亚洲成人精品一区| 日本黄色一区二区| 亚洲黄网站在线观看| 一本一本大道香蕉久在线精品 | 91免费观看视频在线| 国产精品久久久久久久久免费樱桃| 国产精品自在欧美一区| 日韩欧美国产午夜精品| 理论电影国产精品| 91精品久久久久久蜜臀| 视频在线观看国产精品| 91精品国产综合久久蜜臀| 日韩不卡一区二区| 欧美一区二区日韩| 蜜桃一区二区三区在线观看| 日韩欧美国产一区二区在线播放| 久久精品国产99| 久久嫩草精品久久久精品| 国产成人免费视频精品含羞草妖精| 久久久久国产精品厨房| 成人在线视频首页| 亚洲色图欧美偷拍| 欧美日韩一区 二区 三区 久久精品| 亚洲一区二区成人在线观看| 欧美另类z0zxhd电影| 男女男精品网站| 欧美精品一区二区三区久久久| 国产高清不卡一区| 国产精品理论在线观看| 一本色道久久综合狠狠躁的推荐 | 欧美日韩国产乱码电影| 日韩高清欧美激情| 精品粉嫩aⅴ一区二区三区四区| 国产成人无遮挡在线视频| 国产精品国产自产拍高清av| 91传媒视频在线播放| 免费人成精品欧美精品| 久久人人97超碰com| 成人激情视频网站| 一区二区三区久久久| 欧美一级片免费看| 国产在线精品一区二区| 亚洲欧洲av在线| 欧美放荡的少妇| 国产成人精品三级麻豆| 亚洲精品日韩专区silk| 91麻豆精品国产| 成+人+亚洲+综合天堂| 五月激情综合网| 久久久影院官网| caoporen国产精品视频| 粉嫩嫩av羞羞动漫久久久 | 岛国av在线一区| 亚洲综合激情小说| 欧美日韩卡一卡二| 蜜臀精品久久久久久蜜臀| 亚洲国产精品av| 在线播放欧美女士性生活| 成人中文字幕合集| 婷婷综合五月天| 中文字幕中文字幕在线一区| 欧美日产国产精品| 国产91精品免费| 免费看欧美女人艹b| 椎名由奈av一区二区三区| 91精品国产欧美一区二区成人| 成人开心网精品视频| 日日夜夜精品免费视频| 国产精品久久久一区麻豆最新章节| 欧美日韩高清影院| 国产白丝精品91爽爽久久| 五月天激情综合网| 亚洲伦理在线精品| 久久精品欧美一区二区三区不卡 | 午夜精品久久一牛影视| 国产欧美精品日韩区二区麻豆天美| 欧美丰满美乳xxx高潮www| 99在线热播精品免费| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲影视在线播放| 一区免费观看视频| 久久久不卡网国产精品一区| 欧美日韩国产综合草草| 91在线看国产| 国产福利一区二区三区视频| 日韩黄色一级片| 亚洲国产三级在线| 中文字幕一区二区三中文字幕| 精品福利二区三区| 日韩一区二区精品葵司在线| 色婷婷国产精品综合在线观看| 高清beeg欧美| 国产一区二区三区四区五区美女| 日韩和的一区二区| 亚洲综合网站在线观看| 国产精品妹子av| 国产亚洲1区2区3区| 日韩免费电影网站| 91精品婷婷国产综合久久竹菊| 欧美午夜免费电影| 色婷婷综合在线| 91老司机福利 在线| 波多野结衣亚洲| 成人免费黄色大片| 高清不卡一二三区| 成人永久免费视频| 成人高清免费在线播放| 国产高清精品久久久久| 国产精品一二三区在线| 国产精品一区二区久久不卡| 韩国视频一区二区| 裸体一区二区三区| 久久国产精品区| 国内精品在线播放| 国产一区二区三区日韩 | 精品sm捆绑视频| 26uuu精品一区二区在线观看| 日韩欧美123| 久久综合国产精品| 2021久久国产精品不只是精品| 精品国产伦一区二区三区观看体验 | 夜夜爽夜夜爽精品视频| 亚洲一区二区三区中文字幕| 亚洲一区二区三区在线| 亚洲高清在线视频| 三级影片在线观看欧美日韩一区二区| 午夜激情一区二区| 欧美a级理论片| 国产伦理精品不卡| 成人一区在线观看| av一区二区三区四区| 日本丰满少妇一区二区三区| 欧美日韩电影一区| 91精品国产品国语在线不卡| 久久综合色之久久综合| 国产精品免费看片|