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

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

?? rpng-win.c

?? png圖像文件格式開(kāi)發(fā)包
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*---------------------------------------------------------------------------   rpng - simple PNG display program                             rpng-win.c   This program decodes and displays PNG images, with gamma correction and   optionally with a user-specified background color (in case the image has   transparency).  It is very nearly the most basic PNG viewer possible.   This version is for 32-bit Windows; it may compile under 16-bit Windows   with a little tweaking (or maybe not).   to do:    - handle quoted command-line args (especially filenames with spaces)    - have minimum window width:  oh well    - use %.1023s to simplify truncation of title-bar string?  ---------------------------------------------------------------------------   Changelog:    - 1.00:  initial public release    - 1.01:  modified to allow abbreviated options; fixed long/ulong mis-              match; switched to png_jmpbuf() macro    - 1.02:  added extra set of parentheses to png_jmpbuf() macro; fixed              command-line parsing bug    - 1.10:  enabled "message window"/console (thanks to David Geldreich)  ---------------------------------------------------------------------------      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  "rpng-win"#define LONGNAME  "Simple PNG Viewer for Windows"#define VERSION   "1.20 of 28 May 2001"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <windows.h>#include <time.h>#include <conio.h>      /* only for _getch() *//* #define DEBUG  :  this enables the Trace() macros */#include "readpng.h"    /* typedefs, common macros, readpng 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);               \}/* local prototypes */static int        rpng_win_create_window(HINSTANCE hInst, int showmode);static int        rpng_win_display_image(void);static void       rpng_win_cleanup(void);LRESULT CALLBACK  rpng_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 char *bgstr;static uch bg_red=0, bg_green=0, bg_blue=0;static double display_exponent;static ulg image_width, image_height, image_rowbytes;static int image_channels;static uch *image_data;/* Windows-specific variables */static ulg wimage_rowbytes;static uch *dib;static uch *wimage_data;static BITMAPINFOHEADER *bmih;static HWND global_hwnd;int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode){    char *args[1024];                 /* arbitrary limit, but should suffice */    char *p, *q, **argv = args;    int argc = 0;    int rc, alen, flen;    int error = 0;    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;    filename = (char *)NULL;    /* First 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);    /* Next 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)    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)        display_exponent = atof(p);    else        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 {                display_exponent = atof(*argv);                if (display_exponent <= 0.0)                    ++error;            }        } else if (!strncmp(*argv, "-bgcolor", 2)) {            if (!*++argv)                ++error;            else {                bgstr = *argv;                if (strlen(bgstr) != 7 || bgstr[0] != '#')                    ++error;                else                    have_bg = TRUE;            }        } else {            if (**argv != '-') {                filename = *argv;                if (argv[1])   /* shouldn't be any more args after filename */                    ++error;            } else                ++error;   /* not expecting any other options */        }    }    if (!filename) {        ++error;    } else if (!(infile = fopen(filename, "rb"))) {        fprintf(stderr, PROGNAME ":  can't open PNG file [%s]\n", filename);        ++error;    } else {        if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) {            switch (rc) {                case 1:                    fprintf(stderr, PROGNAME                      ":  [%s] is not a PNG file: incorrect signature\n",                      filename);                    break;                case 2:                    fprintf(stderr, PROGNAME                      ":  [%s] has bad IHDR (libpng longjmp)\n",                      filename);                    break;                case 4:                    fprintf(stderr, PROGNAME ":  insufficient memory\n");                    break;                default:                    fprintf(stderr, PROGNAME                      ":  unknown readpng_init() error\n");                    break;            }            ++error;        }        if (error)            fclose(infile);    }    /* usage screen */    if (error) {        int ch;        fprintf(stderr, "\n%s %s:  %s\n\n", PROGNAME, VERSION, appname);        readpng_version_info();        fprintf(stderr, "\n"          "Usage:  %s [-gamma exp] [-bgcolor bg] file.png\n"          "    exp \ttransfer-function exponent (``gamma'') of the display\n"          "\t\t  system in floating-point format (e.g., ``%.1f''); equal\n"          "\t\t  to the product of the lookup-table exponent (varies)\n"          "\t\t  and the CRT exponent (usually 2.2); must be positive\n"          "    bg  \tdesired background color in 7-character hex RGB format\n"          "\t\t  (e.g., ``#ff7700'' for orange:  same as HTML colors);\n"          "\t\t  used with transparent images\n"          "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n"          "Press Q or Esc to quit this usage screen.\n"          "\n", PROGNAME, default_display_exponent);        do            ch = _getch();        while (ch != 'q' && ch != 'Q' && ch != 0x1B);        exit(1);    } else {        fprintf(stderr, "\n%s %s:  %s\n", PROGNAME, VERSION, appname);        fprintf(stderr,          "\n   [console window:  closing this window will terminate %s]\n\n",          PROGNAME);    }    /* set the title-bar string, but make sure buffer doesn't overflow */    alen = strlen(appname);    flen = strlen(filename);    if (alen + flen + 3 > 1023)        sprintf(titlebar, "%s:  ...%s", appname, filename+(alen+flen+6-1023));    else        sprintf(titlebar, "%s:  %s", appname, filename);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品久久久久久久久老牛影院| 中文字幕一区二区三区四区 | 精品美女在线播放| 青青草伊人久久| 久久人人97超碰com| 成人app网站| 一区二区三区精密机械公司| 欧美午夜理伦三级在线观看| 亚洲国产成人高清精品| 欧美一卡二卡在线| 国产成人av一区二区三区在线| 国产精品婷婷午夜在线观看| 色综合婷婷久久| 日韩avvvv在线播放| 久久久久国产成人精品亚洲午夜 | 成人av网站免费观看| 亚洲精品伦理在线| 91精品国产综合久久久久久久久久 | 成人一级片网址| 亚洲女人的天堂| 日韩亚洲欧美综合| 不卡电影一区二区三区| 亚洲国产一区二区三区青草影视 | 国产精品丝袜一区| 在线观看免费一区| 久久爱www久久做| 亚洲品质自拍视频| 日韩免费观看高清完整版 | 成人av资源在线| 日韩激情一区二区| 久久精品亚洲乱码伦伦中文| 欧美自拍偷拍一区| 久久99国产精品免费网站| 亚洲欧洲成人av每日更新| 91精品国产乱| 99免费精品视频| 日本麻豆一区二区三区视频| 国产精品乱码久久久久久| 欧美日韩视频在线第一区| 国产成人在线视频免费播放| 亚洲aaa精品| 国产亚洲精品bt天堂精选| 欧美午夜片在线观看| 国产高清一区日本| 日韩在线一区二区三区| 1000部国产精品成人观看| 日韩欧美国产小视频| 色域天天综合网| 国产一区在线不卡| 午夜久久久久久久久久一区二区| 亚洲v中文字幕| 国产精品久久久久久久久久久免费看| 欧美一区二区三区在线| 91视频一区二区三区| 激情亚洲综合在线| 亚欧色一区w666天堂| 综合久久久久综合| 久久久久高清精品| 日韩一区二区精品葵司在线| 91国在线观看| 国v精品久久久网| 六月丁香婷婷色狠狠久久| 亚洲午夜精品一区二区三区他趣| 欧美国产日本视频| 日韩欧美一区二区在线视频| 色哟哟一区二区在线观看| 国产不卡高清在线观看视频| 蜜臀久久99精品久久久画质超高清| 综合电影一区二区三区| 国产色综合一区| 日韩欧美国产高清| 欧美精品日韩精品| 日本韩国一区二区三区| 成人黄色一级视频| 国产一区二区三区久久久 | 国产精品影视天天线| 丝袜美腿亚洲一区二区图片| 亚洲免费三区一区二区| 亚洲国产精品精华液ab| 2023国产精品| 精品国产一区二区精华| 欧美二区在线观看| 欧美日韩五月天| 91黄色免费看| 在线影院国内精品| 99re热这里只有精品免费视频| 国产成人鲁色资源国产91色综| 麻豆国产欧美日韩综合精品二区| 五月婷婷激情综合网| 亚洲午夜视频在线观看| 一区二区三区免费看视频| 亚洲丝袜美腿综合| ㊣最新国产の精品bt伙计久久| 国产欧美1区2区3区| 国产日产欧美一区二区视频| 久久久亚洲综合| 精品sm在线观看| 亚洲精品一区二区三区99| 精品区一区二区| 久久综合九色综合欧美98 | 亚洲一区在线观看免费观看电影高清 | 国产精品系列在线| 中文字幕av一区二区三区高| 国产欧美日韩另类一区| 国产欧美日韩不卡免费| 国产目拍亚洲精品99久久精品| 国产欧美日韩三级| 中文字幕日本不卡| 亚洲猫色日本管| 一区二区三区加勒比av| 亚洲无线码一区二区三区| 亚洲成a人片在线不卡一二三区| 亚洲一区二区美女| 午夜精品一区在线观看| 欧美亚洲免费在线一区| 欧美性视频一区二区三区| 欧美日韩国产三级| 日韩一区二区在线看| 欧美成人女星排名| 久久九九久久九九| 国产精品久久久久7777按摩| 亚洲丝袜自拍清纯另类| 亚洲综合色在线| 婷婷中文字幕综合| 蜜桃传媒麻豆第一区在线观看| 国产一区二区三区免费观看| 成人一区在线观看| 91黄色激情网站| 欧美一区二区三区日韩视频| 久久综合中文字幕| 国产精品私房写真福利视频| 亚洲欧美日韩中文字幕一区二区三区 | 国产精品精品国产色婷婷| 亚洲老司机在线| 偷拍与自拍一区| 男女男精品视频| 国产精品原创巨作av| 91免费国产在线观看| 在线不卡欧美精品一区二区三区| 欧美成人精品3d动漫h| 国产拍欧美日韩视频二区| 综合色中文字幕| 日本成人在线网站| 国产99久久久国产精品潘金 | 国产精品热久久久久夜色精品三区| 亚洲视频在线观看三级| 午夜天堂影视香蕉久久| 老司机精品视频一区二区三区| 高清在线成人网| 在线观看一区不卡| 精品久久久久久久久久久院品网 | 国产亚洲精品bt天堂精选| 亚洲欧美日韩国产成人精品影院 | 午夜av一区二区三区| 国内一区二区在线| 色婷婷一区二区三区四区| 日韩三级免费观看| 综合久久国产九一剧情麻豆| 免费高清在线视频一区·| 成a人片国产精品| 欧美一区二区三区小说| 国产精品美女www爽爽爽| 亚洲成人在线免费| 国产91露脸合集magnet| 欧美撒尿777hd撒尿| 久久久精品人体av艺术| 亚洲午夜久久久久久久久电影院| 国产一区二区女| 欧美视频在线一区| 国模一区二区三区白浆| 色综合久久综合中文综合网| 日韩女优毛片在线| 一片黄亚洲嫩模| 国产69精品久久久久777| 制服丝袜国产精品| 亚洲欧美日韩在线| 久久精品国产一区二区三区免费看 | 狠狠狠色丁香婷婷综合久久五月| 色欧美88888久久久久久影院| 精品美女在线观看| 亚洲小说欧美激情另类| 国产suv精品一区二区6| 欧美一区二区三区免费观看视频| 国产精品拍天天在线| 蜜桃久久久久久| 在线一区二区观看| 久久久久久久综合色一本| 亚洲一区二区av在线| 成人av在线播放网址| 精品免费视频.| 午夜激情久久久| av在线不卡电影| 精品播放一区二区| 日韩中文字幕亚洲一区二区va在线| 99久久国产综合精品女不卡| 久久久亚洲午夜电影| 蜜臀av亚洲一区中文字幕| 在线中文字幕不卡| 亚洲天堂av一区| 成人av在线播放网站|