Category : Printer + Display Graphics
Archive   : JPEGVIEW.ZIP
Filename : JVIEW.PCH

 
Output of file : JVIEW.PCH contained in archive : JPEGVIEW.ZIP
diff -rc2N jpegsrc3/jconfig.h jviewsrc/jconfig.h
*** jpegsrc3/jconfig.h Sat Mar 7 21:26:04 1992
--- jviewsrc/jconfig.h Thu Apr 16 01:27:04 1992
***************
*** 178,181 ****
--- 178,182 ----
/* these defines indicate which image (non-JPEG) file formats are allowed */
#define GIF_SUPPORTED /* GIF image file format */
+ #define VIEW_SUPPORTED /* image viewer on screen */
/* #define RLE_SUPPORTED */ /* RLE image file format (by default, no) */
#define PPM_SUPPORTED /* PPM/PGM image file format */
diff -rc2N jpegsrc3/jdmain.c jviewsrc/jdmain.c
*** jpegsrc3/jdmain.c Tue Mar 17 15:23:13 1992
--- jviewsrc/jdmain.c Thu Apr 16 01:27:04 1992
***************
*** 70,74 ****
--- 70,79 ----
*/

+ #ifdef VIEW_SUPPORTED
+ unsigned char selmode;
+ #endif
+
typedef enum {
+ FMT_VIEW, /* view on screen */
FMT_GIF, /* GIF format */
FMT_PPM, /* PPM/PGM (PBMPLUS formats) */
***************
*** 106,109 ****
--- 111,119 ----
*/
switch (requested_fmt) {
+ #ifdef VIEW_SUPPORTED
+ case FMT_VIEW:
+ jselview(cinfo);
+ break;
+ #endif
#ifdef GIF_SUPPORTED
case FMT_GIF:
***************
*** 159,163 ****
{
fprintf(stderr, "usage: %s ", progname);
! fprintf(stderr, "[-G] [-P] [-R] [-T] [-b] [-g] [-q colors] [-1] [-D] [-d] [-m mem]");
#ifdef TWO_FILE_COMMANDLINE
fprintf(stderr, " inputfile outputfile\n");
--- 169,173 ----
{
fprintf(stderr, "usage: %s ", progname);
! fprintf(stderr, "[-v mode] [-G] [-P] [-R] [-T] [-b] [-g] [-q colors] [-1] [-D] [-d] [-m mem]");
#ifdef TWO_FILE_COMMANDLINE
fprintf(stderr, " inputfile outputfile\n");
***************
*** 208,213 ****
/* Scan command line options, adjust parameters */

! while ((c = egetopt(argc, argv, "GPRTbgq:1Dm:d")) != EOF)
switch (c) {
case 'G': /* GIF output format. */
requested_fmt = FMT_GIF;
--- 218,230 ----
/* Scan command line options, adjust parameters */

! while ((c = egetopt(argc, argv, "v:1GPRTbgq:1Dm:d")) != EOF)
switch (c) {
+ case 'v': /* viewer output */
+ if (optarg == NULL)
+ usage(argv[0]);
+ if (sscanf(optarg, "%d", &selmode) != 1)
+ usage(argv[0]);
+ requested_fmt =FMT_VIEW;
+ break;
case 'G': /* GIF output format. */
requested_fmt = FMT_GIF;
***************
*** 276,281 ****

if (optind != argc-2) {
! fprintf(stderr, "%s: must name one input and one output file\n", argv[0]);
! usage(argv[0]);
}
if ((cinfo.input_file = fopen(argv[optind], READ_BINARY)) == NULL) {
--- 293,308 ----

if (optind != argc-2) {
! if (requested_fmt == FMT_VIEW)
! { if (optind != argc-1)
! {
! fprintf(stderr, "%s: must name one input file\n", argv[0]);
! usage(argv[0]);
! }
! }
! else
! {
! fprintf(stderr, "%s: must name one input and one output file\n", argv[0]);
! usage(argv[0]);
! }
}
if ((cinfo.input_file = fopen(argv[optind], READ_BINARY)) == NULL) {
***************
*** 283,290 ****
exit(EXIT_FAILURE);
}
! if ((cinfo.output_file = fopen(argv[optind+1], WRITE_BINARY)) == NULL) {
! fprintf(stderr, "%s: can't open %s\n", argv[0], argv[optind+1]);
! exit(EXIT_FAILURE);
! }

#else /* not TWO_FILE_COMMANDLINE -- use Unix style */
--- 310,321 ----
exit(EXIT_FAILURE);
}
!
! if (requested_fmt != FMT_VIEW)
! {
! if ((cinfo.output_file = fopen(argv[optind+1], WRITE_BINARY)) == NULL) {
! fprintf(stderr, "%s: can't open %s\n", argv[0], argv[optind+1]);
! exit(EXIT_FAILURE);
! }
! }

#else /* not TWO_FILE_COMMANDLINE -- use Unix style */
diff -rc2N jpegsrc3/jview.c jviewsrc/jview.c
*** jpegsrc3/jview.c
--- jviewsrc/jview.c Thu Apr 16 01:27:04 1992
***************
*** 0 ****
--- 1,354 ----
+ /*
+ * jview.c
+ *
+ * JPEG VGA-viewer V 1.0
+ * Copyright (C) 1992, by Hubertus Kehl
+ * This file is not part of the Independent JPEG Group's software.
+ *
+ * For conditions of distribution and use, see the accompanying README file,
+ * and the README.VIW file.
+ *
+ * This file contains routines to write output images to screen.
+ *
+ * These routines may need modification for non TSENG 3000 VGA-cards.
+ * PERMISSION TO USE this software is only granted, if you use it at your own
+ * risk. That means especially trying on non TSENG 3000 cards and trying
+ * on monitors and cards that don't support the hires modes.
+ * No warranty at all for implied defects of your hard- and software.
+ * Read README.VIW first.
+ * Send bugs, patches, additional config files etc. to
+ * [email protected]
+ *
+ * These routines are invoked via the methods put_pixel_rows, put_color_map,
+ * and output_init/term.
+ *
+ * Modified from jwrgif contributed by Thomas G. Lane.
+ * but there isn't any GIF-stuff in here any more
+ */
+
+ /* from jwrgif ....
+ * This code is loosely based on ppmtogif from the PBMPLUS distribution
+ * of Feb. 1991. That file contains the following copyright notice:
+ * Based on GIFENCODE by David Rowley .
+ * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al.
+ * Copyright (C) 1989 by Jef Poskanzer.
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. This software is provided "as is" without express or
+ * implied warranty.
+ *
+ * We are also required to state that
+ * "The Graphics Interchange Format(c) is the Copyright property of
+ * CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ * CompuServe Incorporated."
+ */
+
+ #include "jinclude.h"
+ #include
+ #include
+ #include
+
+ #ifdef VIEW_SUPPORTED
+
+ struct Vmode
+ { unsigned int modeax;
+ unsigned int modebx;
+ unsigned int xres;
+ unsigned int yres;
+ } Vmodes[10];
+
+ extern unsigned char selmode;
+
+
+ static decompress_info_ptr dcinfo; /* to avoid passing to all functions */
+
+ unsigned char palette[257][3];
+ unsigned int grow;
+ unsigned int maxwidth,maxrow,width;
+
+ void far setpal(unsigned char far *pal)
+ {
+ unsigned numcol;
+
+ numcol=256;
+
+ asm {
+ mov ax,1012h /* set EGA palette registers (block) */
+ sub bx,bx /* no. of the startregister == 0 */
+ mov cx,numcol /* no. of the colorregisters */
+
+ /* pointer to the colorpalette in RGB format (3 bytes per entry) */
+
+ les dx,pal /* Segment to ES, Offset to DX */
+ int 10h
+ }
+ }
+
+ void setvideomode(unsigned int modeax,unsigned int modebx)
+ {
+ _AX=modeax;
+ _BX=modebx;
+ geninterrupt(0x10);
+ }
+
+
+ LOCAL void
+ emit_header (int num_colors, JSAMPARRAY colormap)
+ /* set the palette according to the params */
+ /* If colormap==NULL, synthesize a gray-scale colormap */
+ {
+ int BitsPerPixel, ColorMapSize, FlagByte;
+ int cshift = dcinfo->data_precision - 6;
+ int i;
+ unsigned int val;
+ unsigned char bt;
+
+
+ /* set the video mode */
+ setvideomode(Vmodes[selmode].modeax,Vmodes[selmode].modebx);
+
+ if (num_colors > 256)
+ ERREXIT(dcinfo->emethods, "Viewer can only handle 256 colors");
+
+ /* Compute bits/pixel and related values */
+ BitsPerPixel = 1;
+ while (num_colors > (1 << BitsPerPixel))
+ BitsPerPixel++;
+ ColorMapSize = 1 << BitsPerPixel;
+
+ /* Set the Global Color Map */
+ /* If the color map is more than 8 bits precision, */
+ /* we reduce it to 8 bits by shifting */
+ for (i=0; i < ColorMapSize; i++) {
+ if (i < num_colors) {
+ if (colormap != NULL) {
+ if (dcinfo->out_color_space == CS_RGB) {
+ /* Normal case: RGB color map */
+ palette[i][0]=GETJSAMPLE(colormap[0][i]) >> cshift;
+ palette[i][1]=GETJSAMPLE(colormap[1][i]) >> cshift;
+ palette[i][2]=GETJSAMPLE(colormap[2][i]) >> cshift;
+ } else {
+ /* Grayscale "color map": possible if quantizing grayscale image */
+ bt=GETJSAMPLE(colormap[0][i]) >> cshift;
+ palette[i][0]=bt;
+ palette[i][1]=bt;
+ palette[i][2]=bt;
+ }
+ } else {
+ /* Create a gray-scale map of num_colors values, range 0..255 */
+ val=(i * 255 + (num_colors-1)/2) / (num_colors-1);
+ bt=val;
+ bt >>= 2;
+ palette[i][0]=bt;
+ palette[i][1]=bt;
+ palette[i][2]=bt;
+ }
+ }
+ }
+ setpal((unsigned char far *) &palette[0][0]);
+ }
+
+
+ /*
+ * Initialize for output on screen.
+ */
+
+
+ METHODDEF void
+ output_init (decompress_info_ptr cinfo)
+ {
+ unsigned char i,argu;
+ char ch;
+ FILE *stream;
+
+ dcinfo = cinfo; /* save for use by local routines */
+
+ for(i=0;i<=9;i++)
+ { Vmodes[i].modeax=0x13;
+ Vmodes[i].modebx=0x00;
+ Vmodes[i].xres=320;
+ Vmodes[i].yres=200;
+ }
+
+ if (selmode > 9)
+ ERREXIT(cinfo->emethods, "wrong modenr: only 9 modes supported");
+
+ /* open config file */
+ if ((stream = fopen("vgamode.cfg", "r"))
+ == NULL)
+ {
+ ERREXIT(cinfo->emethods, "could not open vgamode.cfg");
+ }
+ argu=1;
+ i=1;
+ do
+ {
+ /* read chars until EOF or # found */
+ ch = fgetc(stream);
+ if (ch=='#')
+ switch (argu)
+ { case 1: if (i > 9)
+ ERREXIT(cinfo->emethods, "vgamode.cfg: "
+ "too much videomodes described (>9).");
+ fscanf(stream,"%x#",&(Vmodes[i].modeax));
+ argu++;
+ break;
+ case 2: fscanf(stream,"%x#",&(Vmodes[i].modebx));
+ argu++;
+ break;
+ case 3: fscanf(stream,"%u#",&(Vmodes[i].xres));
+ argu++;
+ break;
+ case 4: fscanf(stream,"%u#",&(Vmodes[i].yres));
+ argu=1;i++;
+ break;
+ }
+ } while (ch != EOF);
+
+ fclose(stream);
+
+ /*
+ * If we aren't quantizing, put_color_map won't be called,
+ * so emit the header now. This only happens with gray scale output.
+ * (If we are quantizing, wait for the color map to be provided.)
+ */
+
+
+ if (! cinfo->quantize_colors)
+ emit_header(256, (JSAMPARRAY) NULL);
+ else
+ printf("Quantizing color map... please wait\n");
+
+ maxwidth=Vmodes[selmode].xres;
+ maxrow=Vmodes[selmode].yres;
+
+ width= cinfo->image_width;
+ /* is row longer as row of selected mode */
+ if (width > maxwidth) width=maxwidth;
+ /* start in first row */
+ grow=0;
+
+ }
+
+
+ /*
+ * Write the color map.
+ */
+
+ METHODDEF void
+ put_color_map (decompress_info_ptr cinfo, int num_colors, JSAMPARRAY colormap)
+ {
+ emit_header(num_colors, colormap);
+ }
+
+
+ void putrow(int y, unsigned char far *bitmap,unsigned int size)
+ {
+ unsigned int offset,seg;
+ unsigned char page;
+ unsigned int fsize;
+
+ asm { push ax /* save regs */
+ push dx
+ push bx
+
+ mov bx,y
+ mov ax,maxwidth /* max xres of current video mode */
+ mul bx /* calculate offset in video mem */
+ add ax,0h /* xpos =0 */
+ adc dx,0000
+ mov offset,ax
+ mov al,dl
+ or al,40h /* select page for desired row */
+ mov page,al
+ mov dx,03CDh
+ out dx,al
+
+ pop bx /* restore regs */
+ pop dx
+ pop ax
+ }
+ /* check if row goes over page border */
+ if (((long) offset+size)<0x10000L)
+ { seg=0xA000;
+ /* move row to video mem */
+ movedata(FP_SEG(bitmap),FP_OFF(bitmap),seg,offset,size);
+ }
+ else
+ { /* Writing row over page border */
+ fsize=(unsigned int) (0x10000L-offset);
+ seg=0xA000;
+ /* move first part of row to video mem */
+ movedata(FP_SEG(bitmap),FP_OFF(bitmap),seg,offset,fsize);
+ /* select next page */
+ page++;
+ outportb(0x3CD,page);
+ /* move second part of row to video mem */
+ movedata(FP_SEG((bitmap+fsize)),FP_OFF((bitmap+fsize)),
+ seg,0,size-fsize);
+ }
+ }
+
+
+ /*
+ * Write some pixel data.
+ */
+
+ METHODDEF void
+ put_pixel_rows (decompress_info_ptr cinfo, int num_rows,
+ JSAMPIMAGE pixel_data)
+ {
+ unsigned int row;
+
+ for (row = 0; row < num_rows; row++)
+ {
+ /* are there more rows as on screen ? */
+ if ((grow+row) < maxrow)
+ putrow(row+grow,&pixel_data[0][row][0],width);
+ }
+ grow=grow+row;
+ }
+
+
+ /*
+ * Wait for end of viewing
+ */
+
+ METHODDEF void
+ output_term (decompress_info_ptr cinfo)
+ {
+ /* wait for end of viewing, restore crt */
+ getch();
+ setvideomode(0x03,0x00);
+ }
+
+
+ /*
+ * The method selection routine for the viewer.
+ * This should be called from d_ui_method_selection if viewer output is wanted.
+ */
+
+ GLOBAL void
+ jselview (decompress_info_ptr cinfo)
+ {
+ cinfo->methods->output_init = output_init;
+ cinfo->methods->put_color_map = put_color_map;
+ cinfo->methods->put_pixel_rows = put_pixel_rows;
+ cinfo->methods->output_term = output_term;
+
+ if (cinfo->out_color_space != CS_GRAYSCALE &&
+ cinfo->out_color_space != CS_RGB)
+ ERREXIT(cinfo->emethods, "Viewer output must be grayscale or RGB");
+
+ /* Force quantization if color or if > 8 bits input */
+ if (cinfo->out_color_space == CS_RGB || cinfo->data_precision > 8) {
+ /* Force quantization to at most 256 colors */
+ cinfo->quantize_colors = TRUE;
+ if (cinfo->desired_number_of_colors > 256)
+ cinfo->desired_number_of_colors = 256;
+ }
+ }
+
+ #endif /* VIEW_SUPPORTED */
diff -rc2N jpegsrc3/makdjpeg.lst jviewsrc/makdjpeg.lst
*** jpegsrc3/makdjpeg.lst Tue Mar 17 15:24:47 1992
--- jviewsrc/makdjpeg.lst Thu Apr 16 01:27:04 1992
***************
*** 2,4 ****
jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj jquant2.obj
jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj jwrrle.obj jwrtarga.obj
! jutils.obj jerror.obj jmemmgr.obj jmemsys.obj jmemdosa.obj
--- 2,5 ----
jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj jquant2.obj
jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj jwrrle.obj jwrtarga.obj
! jutils.obj jerror.obj jmemmgr.obj jmemsys.obj jmemdosa.obj jview.obj
! graphics.lib emu.lib
\ No newline at end of file
diff -rc2N jpegsrc3/makefile.bcc jviewsrc/makefile.bcc
*** jpegsrc3/makefile.bcc Tue Mar 17 15:24:45 1992
--- jviewsrc/makefile.bcc Thu Apr 16 01:27:04 1992
***************
*** 12,20 ****

# The name of your C compiler:
! CC= bcc

# You may need to adjust these cc options:
! CFLAGS= -DHAVE_STDC -DINCLUDES_ARE_ANSI \
! -ms -DMSDOS -DINCOMPLETE_TYPES_BROKEN -w-par -O2
# -DHAVE_STDC -DINCLUDES_ARE_ANSI enable ANSI-C features (we DON'T want -A)
# -ms selects small memory model for most efficient code
--- 12,20 ----

# The name of your C compiler:
! CC= tcc

# You may need to adjust these cc options:
! CFLAGS= -DHAVE_STDC -DINCLUDES_ARE_ANSI -ms -DMSDOS -O -G -Z\
! -DINCOMPLETE_TYPES_BROKEN -w-par
# -DHAVE_STDC -DINCLUDES_ARE_ANSI enable ANSI-C features (we DON'T want -A)
# -ms selects small memory model for most efficient code
***************
*** 35,39 ****
jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
! jwrppm.c jwrrle.c jwrtarga.c
# virtual source files (not present in distribution file)
VIRTSOURCES= jmemsys.c
--- 35,39 ----
jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
! jwrppm.c jwrrle.c jwrtarga.c jview.c
# virtual source files (not present in distribution file)
VIRTSOURCES= jmemsys.c
***************
*** 64,68 ****
jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj \
jquant2.obj jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj \
! jwrrle.obj jwrtarga.obj
DOBJECTS= jdmain.obj $(DLIBOBJECTS) $(COMOBJECTS)
# These objectfiles are included in libjpeg.lib
--- 64,68 ----
jdhuff.obj jdmcu.obj jdpipe.obj jdsample.obj jquant1.obj \
jquant2.obj jrevdct.obj jrdjfif.obj jwrgif.obj jwrppm.obj \
! jwrrle.obj jwrtarga.obj jview.obj
DOBJECTS= jdmain.obj $(DLIBOBJECTS) $(COMOBJECTS)
# These objectfiles are included in libjpeg.lib
***************
*** 132,135 ****
--- 132,136 ----
jwrjfif.obj : jwrjfif.c jinclude.h jconfig.h jpegdata.h
jwrgif.obj : jwrgif.c jinclude.h jconfig.h jpegdata.h
+ jview.obj : jview.c jinclude.h jconfig.h jpegdata.h
jwrppm.obj : jwrppm.c jinclude.h jconfig.h jpegdata.h
jwrrle.obj : jwrrle.c jinclude.h jconfig.h jpegdata.h
diff -rc2N jpegsrc3/readme.viw jviewsrc/readme.viw
*** jpegsrc3/readme.viw
--- jviewsrc/readme.viw Thu Apr 16 01:27:04 1992
***************
*** 0 ****
--- 1,67 ----
+
+ README for the viewer version 1.0 (C) 4/1992 by Hubertus Kehl
+ =============================================================
+
+ This distribution is an additional source based on the JPEG sources of the
+ Independent JPEG Group. An viewer for VGA-cards has been implemented (jview)
+ and some changes in jdmain have been made, to implement a new switch -v mode
+ for the viewer. For details about the JPEG sources read README and USAGE.
+ This file describes only the things about the viewer source. Conditions for the
+ viewer are nearly the same as the Independent JPEG Group states for their
+ sources.
+ You are welcome to redistribute this software and to use it for any purpose,
+ subject to the conditions under LEGAL ISSUES, below.
+
+
+ DISCLAIMER
+ ==========
+
+ THIS SOFTWARE IS NOT COMPLETE NOR FULLY DEBUGGED. It is not guaranteed to be
+ useful for anything. (See LEGAL ISSUES for even more disclaimers.)
+
+ Please report any problems with this software to [email protected]
+
+ LEGAL ISSUES
+ ============
+
+ The author makes NO WARRANTY or representation, either express or implied,
+ with respect to this software, its quality, accuracy, merchantability, or
+ fitness for a particular purpose. This software is provided "AS IS", and you,
+ its user, assume the entire risk as to its quality and accuracy.
+
+ This software is copyright (C) 1992, Hubertus Kehl.
+ All Rights Reserved except as specified below.
+
+ Permission is hereby granted to use, copy, modify, and distribute this
+ software (or portions thereof) for any purpose, without fee, subject to these
+ conditions:
+ (1) If any part of the source code for this software is distributed, then this
+ README files must be included, with this copyright and no-warranty notice
+ unaltered; and any additions, deletions, or changes to the original files
+ must be clearly indicated in accompanying documentation.
+ (2) Permission for use of this software is granted only if the user accepts
+ full responsibility for any undesirable consequences; the author accepts
+ NO LIABILITY for damages of any kind.
+
+ Permission is NOT granted for the use of any author's name or author's company
+ name in advertising or publicity relating to this software or products derived
+ from it.
+
+ I specifically permit and encourage the use of this software as the basis of
+ commercial products, provided that all warranty or liability claims are
+ assumed by the product vendor.
+
+ CHANGES
+ =======
+
+ The following changes/additions to the jpegsrc.v3 of the Independent JPEG Group
+ have been made:
+
+ makdjpeg.lst added jview.obj for linker
+ makefile.bcc added generation and dependencies of jview.obj
+ jconfig.h defined compiler switch VIEW_SUPPORTED
+ jdmain.c Added option -v [mode] and checks for this
+ jview.c The viewer itself
+ vgamode.cfg configuration file for the VGA modes
+ README.VIW the viewer readme
+ USAGE.VIW the viewer usage
diff -rc2N jpegsrc3/usage.viw jviewsrc/usage.viw
*** jpegsrc3/usage.viw
--- jviewsrc/usage.viw Thu Apr 16 01:27:04 1992
***************
*** 0 ****
--- 1,54 ----
+ USAGE instructions for the VGA viewer
+ =====================================
+ (C) 4/1992 by Hubertus Kehl
+
+ INTRODUCTION
+
+ This distribution is an additional source based on the JPEG sources of the
+ Independent JPEG Group. An viewer for VGA-cards has been implemented (jview)
+ and some changes in jdmain have been made, to implement a new switch -v mode
+ for the viewer.
+ You can reconstruct my changes on the jpegsrc.v3 if you patch the
+ diff-file over these sources.
+ I don't distribute sources of Independent JPEG Group only my changes on it.
+ Permission for use of this software is only granted, if you use it at
+ your own risk. No warranty at all for damaged soft and hardware (monitors
+ tortured with wrong hires modes etc.)
+ (see also README.VIW and README)
+ This software has only been tested on a TSENG 3000 card. A file to configure
+ the videomodes has been provided. But if this helps to get the viewer work on
+ your card, i don't know. Some changes may be necessary in jview.c (setvideomode
+ or putrow etc.) The viewer can only be compiled with TURBO C or Borland C
+ because it makes heavy use of the compiler's inline assembler and memory lib
+ functions. Use Makefile.bcc for this.
+ The viewer itself is very fast. The viewer takes only about 1% of the whole
+ run-time of program. (Measured with a profiler). On a "normal" color image
+ the quantization takes about 40-50 % and the decompression the rest. For faster
+ viewing try -g or -1 to avoid the good looking, but slow 2-pass quantization.
+
+ GENERAL USAGE
+
+ djpeg [switches] jpegfile imagefile
+
+ and for the viewer:
+
+ djpeg [switches] jpegfile
+
+
+ DJPEG DETAILS
+
+ A parameter for the viewer has been added:
+
+ -v mode Output a jpeg file to screen using the given videomode.
+ Mode corresponds to the videomodes defined in the vgamode.cfg file.
+ The first entry there, is mode 1. Viewing has only been tested
+ on a TSENG 3000, for over cards you may need some modification in
+ the sources in setvideomode, putrow or setpal.
+ All options of djpeg are supported. Most times you can use -g
+ (grayscale) for faster viewing, because of avoiding color
+ quantization.
+ (viewing implies -q, with default of 256 colors).
+ You have only to specify one inputfile and no outputfile.
+
+ Send bugs, patches, additional config files etc. to
+ [email protected]
diff -rc2N jpegsrc3/vgamode.cfg jviewsrc/vgamode.cfg
*** jpegsrc3/vgamode.cfg
--- jviewsrc/vgamode.cfg Thu Apr 16 01:35:05 1992
***************
*** 0 ****
--- 1,10 ----
+ VGA-videomode config file
+ for TSENG 3000 cards
+ Be careful with editing this file !!!
+
+ setvideomode with int 10:
+ AX BX resolution X resolution Y
+ #0x13# #0x00# #320# #200#
+ #0x2D# #0x00# #640# #350#
+ #0x2E# #0x00# #640# #480#
+ #0x30# #0x00# #800# #600#


  3 Responses to “Category : Printer + Display Graphics
Archive   : JPEGVIEW.ZIP
Filename : JVIEW.PCH

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/