Imported from libpng-1.2.0beta5.tar

This commit is contained in:
Glenn Randers-Pehrson
2001-08-07 22:25:59 -05:00
parent b182893c04
commit 1ea0ff34fa
55 changed files with 254 additions and 204 deletions

View File

@@ -1,6 +1,6 @@
---------------------------------------------------------------------------
Copyright (c) 1998-2000 Greg Roelofs. All rights reserved.
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

View File

@@ -44,10 +44,10 @@ Files:
toucan.png transparent PNG for testing (by Stefan Schneider)
Note that the programs are designed to be functional, but their primary
purpose is to illustrate how to use libpng to add PNG support to other
programs. As such, their user interfaces are crude and definitely not
intended for everyday use.
Note that, although the programs are designed to be functional, their
primary purpose is to illustrate how to use libpng to add PNG support to
other programs. As such, their user interfaces are crude and definitely
are not intended for everyday use.
Please see http://www.libpng.org/pub/png/pngbook.html for further infor-
mation and links to the latest version of the source code, and Chapters
@@ -55,7 +55,7 @@ mation and links to the latest version of the source code, and Chapters
Greg Roelofs
newt@pobox.com
30 May 2001
30 June 2001
BUILD INSTRUCTIONS
@@ -131,7 +131,7 @@ BUILD INSTRUCTIONS
current folder. Like the Unix versions, the two windowed programs
(rpng and rpng2) now display a usage screen in a console window when
invoked without command-line arguments; this is new behavior as of
the May 2001 release. Note that the programs use the Unix-style "-"
the June 2001 release. Note that the programs use the Unix-style "-"
character to specify options, instead of the more common DOS/Windows
"/" character. (For example: "rpng2-win -bgpat 4 foo.png", not
"rpng2-win /bgpat 4 foo.png")

View File

@@ -1,53 +0,0 @@
See the main README file for basic instructions on compiling and running
the programs. See http://www.libpng.org/pub/png/pngbook.html for further
information and links to the source code, and Chapters 13-15 of the book
for detailed discussion of the three programs.
Since the two viewers, rpng and rpng2, are both designed to write infor-
mation to the console (i.e., a DOS-window command line) while displaying
the image in a graphical window--and since I haven't yet figured out how
to do that under Windows--here are the usage screens for the two programs:
rpng-win 1.02 of 19 March 2000: Simple PNG Viewer for Windows
Compiled with libpng 1.0.5; using libpng 1.0.5.
Compiled with zlib 1.1.3; using zlib 1.1.3.
Usage: rpng-win [-gamma exp] [-bgcolor bg] file.png
exp transfer-function exponent (``gamma'') of the display
system in floating-point format (e.g., ``2.2''); equal
to the product of the lookup-table exponent (varies)
and the CRT exponent (usually 2.2); must be positive
bg desired background color in 7-character hex RGB format
(e.g., ``#ff7f00'' for orange: same as HTML colors);
used with transparent images
Press Q, Esc or mouse button 1 after image is displayed to quit.
rpng2-win 1.04 of 19 March 2000: Progressive PNG Viewer for Windows
Compiled with libpng 1.0.5; using libpng 1.0.5.
Compiled with zlib 1.1.3; using zlib 1.1.3.
Usage: rpng2-win [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing] file.png
exp transfer-function exponent (``gamma'') of the display
system in floating-point format (e.g., ``2.2''); equal
to the product of the lookup-table exponent (varies)
and the CRT exponent (usually 2.2); must be positive
bg desired background color in 7-character hex RGB format
(e.g., ``#ff7f00'' for orange: same as HTML colors);
used with transparent images; overrides -bgpat
pat desired background pattern number (1-16); used with
transparent images; overrides -bgcolor
-timing enables delay for every block read, to simulate modem
download of image (~36 Kbps)
Press Q, Esc or mouse button 1 after image is displayed to quit.
The usage screen for the third (non-windowed) program, wpng, can be seen
simply by invoking it without any parameters (``wpng'').
Greg Roelofs
19 March 2000

View File

@@ -26,6 +26,7 @@
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
---------------------------------------------------------------------------
@@ -56,7 +57,7 @@
#define PROGNAME "rpng2-win"
#define LONGNAME "Progressive PNG Viewer for Windows"
#define VERSION "1.20 of 28 May 2001"
#define VERSION "1.21 of 29 June 2001"
#include <stdio.h>
#include <stdlib.h>
@@ -451,12 +452,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
"\t\t combining rows, and expanding interlacing, respectively\n"
#endif
"\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,
"Press Q or Esc to quit this usage screen. ",
PROGNAME,
#if (defined(__i386__) || defined(_M_IX86))
strlen(PROGNAME), " ",
#endif
strlen(PROGNAME), " ", default_display_exponent, num_bgpat);
fflush(stderr);
do
ch = _getch();
while (ch != 'q' && ch != 'Q' && ch != 0x1B);
@@ -466,6 +468,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode)
fprintf(stderr,
"\n [console window: closing this window will terminate %s]\n\n",
PROGNAME);
fflush(stderr);
}