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

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

?? rpng-win.c

?? ImagePrinter 把wowd文件打印成png圖片
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*---------------------------------------------------------------------------   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 <time.h>#include <windows.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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁一区二区三区| 夜夜精品浪潮av一区二区三区| 色婷婷综合中文久久一本| 国产成人在线免费观看| 国产乱码精品一区二区三区忘忧草 | 日本一区二区高清| 久久亚洲综合色| 日韩免费高清视频| 久久久久久久久97黄色工厂| 久久免费视频一区| 中文字幕一区二区三区乱码在线| 欧美精品一区二区蜜臀亚洲| 久久嫩草精品久久久精品| 国产日产欧美一区二区视频| 欧美mv日韩mv| 国产精品乱码一区二区三区软件| 中文字幕色av一区二区三区| 亚洲欧洲精品成人久久奇米网| 国产精品国产馆在线真实露脸| 亚洲欧美另类小说视频| 亚洲一区二区中文在线| 日韩高清国产一区在线| 国模无码大尺度一区二区三区| 国产v综合v亚洲欧| 91国偷自产一区二区开放时间| 欧美日韩一区精品| 日韩一区二区三区四区五区六区| 日韩美女视频在线| 中文字幕精品在线不卡| 亚洲永久精品大片| 国产美女主播视频一区| kk眼镜猥琐国模调教系列一区二区| 91激情在线视频| 日韩精品在线一区| 自拍av一区二区三区| 日本人妖一区二区| jlzzjlzz亚洲女人18| 555夜色666亚洲国产免| 国产亚洲欧洲997久久综合| 一区2区3区在线看| 国产精品小仙女| 欧美精三区欧美精三区| 久久精品无码一区二区三区| 一区二区三区在线播放| 韩日av一区二区| 欧美日产在线观看| 自拍偷拍国产亚洲| 国产成人在线看| 欧美成人艳星乳罩| 亚洲一区二区三区精品在线| 国产成人在线电影| 精品国产乱码久久久久久夜甘婷婷| 18涩涩午夜精品.www| 蜜桃av一区二区在线观看| 色婷婷久久99综合精品jk白丝| 精品久久久三级丝袜| 日韩精品一级二级| 91免费观看国产| 国产欧美日韩精品一区| 激情综合色播五月| 欧美日韩亚洲综合一区| 亚洲人成人一区二区在线观看 | 亚洲欧美影音先锋| 国产一区不卡视频| 精品久久久久香蕉网| 亚洲福利一区二区三区| 日本福利一区二区| 亚洲免费视频中文字幕| av亚洲精华国产精华精| 日本一区二区三区在线观看| 九九视频精品免费| 精品国产乱码久久久久久1区2区| 亚洲福利国产精品| 欧美日韩亚洲综合一区| 亚洲成av人片| 欧美疯狂做受xxxx富婆| 午夜精品免费在线| 7777精品伊人久久久大香线蕉超级流畅| 亚洲日本电影在线| 色8久久精品久久久久久蜜| 国产精品久久久99| 91首页免费视频| 一区二区三区成人| 91精品国产综合久久福利软件| 午夜精品一区二区三区免费视频| 欧美日韩三级视频| 日韩成人午夜精品| 精品精品国产高清一毛片一天堂| 青青青伊人色综合久久| 欧美大黄免费观看| 国产精品自拍毛片| 国产精品不卡视频| 91成人国产精品| 日韩国产高清影视| 国产人久久人人人人爽| 成人18视频日本| 亚洲h在线观看| 精品国产乱码久久| 色综合夜色一区| 久久99国产精品麻豆| 一区二区三区日本| 丰满少妇在线播放bd日韩电影| 精品一区二区在线免费观看| 国产91丝袜在线播放| 99国产精品视频免费观看| 国产v日产∨综合v精品视频| 色婷婷综合久久久中文字幕| 日韩免费成人网| 伊人婷婷欧美激情| 激情欧美一区二区三区在线观看| 国产尤物一区二区| 青草av.久久免费一区| 欧美电影免费观看完整版| 风间由美一区二区三区在线观看 | 欧美激情综合在线| 在线不卡欧美精品一区二区三区| 日韩高清一级片| 国产精品大尺度| 欧美xxxxx裸体时装秀| 欧美亚洲禁片免费| 国产综合久久久久久鬼色| 亚洲精品写真福利| 久久精品日韩一区二区三区| 欧美性色综合网| 成人一级视频在线观看| 日产精品久久久久久久性色| 亚洲人亚洲人成电影网站色| 精品国产麻豆免费人成网站| 欧洲激情一区二区| 99久久夜色精品国产网站| 激情久久五月天| 怡红院av一区二区三区| 一区在线观看免费| 久久精品在这里| 精品嫩草影院久久| 欧美男女性生活在线直播观看| 成人av集中营| 国产91精品露脸国语对白| 久久99精品国产.久久久久久| 亚洲国产一区二区三区青草影视 | 91视频.com| 国产成人午夜高潮毛片| 国产在线精品一区二区夜色| 日韩av电影天堂| 洋洋成人永久网站入口| 亚洲精品视频观看| 亚洲一区二区在线视频| 亚洲精品乱码久久久久久日本蜜臀| 国产午夜精品在线观看| 久久九九久久九九| 中文字幕欧美日韩一区| 国产亚洲综合在线| 久久亚洲一级片| 久久久久久久免费视频了| 精品国产凹凸成av人导航| 欧美va亚洲va| 久久免费午夜影院| 国产精品美女久久久久aⅴ| 欧美国产精品一区二区三区| 中文字幕 久热精品 视频在线| 日本一区二区三区在线观看| 日本一区二区免费在线观看视频| 国产欧美精品一区二区三区四区 | gogogo免费视频观看亚洲一| 国产成人自拍网| 91影院在线观看| 精品视频在线视频| 欧美成人精品福利| 国产人妖乱国产精品人妖| 亚洲欧洲av一区二区三区久久| 日韩美女视频一区二区| 亚洲精品水蜜桃| 男人的j进女人的j一区| 国产98色在线|日韩| 一本到三区不卡视频| 69堂亚洲精品首页| 久久影院午夜论| 一区二区三区中文在线观看| 亚洲成av人影院在线观看网| 久草精品在线观看| 99久久精品国产麻豆演员表| 欧美久久久久久久久中文字幕| 久久综合色婷婷| 一区二区三区日韩欧美| 另类欧美日韩国产在线| www.欧美日韩国产在线| 欧美一二三四在线| 亚洲欧洲成人av每日更新| 秋霞影院一区二区| 97精品电影院| 亚洲精品一区二区三区香蕉| 亚洲免费在线电影| 激情成人午夜视频| 欧美日韩一级大片网址| 国产精品视频免费| 久久精品国产**网站演员| 91亚洲精品久久久蜜桃| 精品国产sm最大网站免费看| 亚洲自拍偷拍欧美| 99久久精品99国产精品|