Dec 242017
 
C Users Group magazine files for August 1994.
File CUJ0894.ZIP from The Programmer’s Corner in
Category Files from Magazines
C Users Group magazine files for August 1994.
File Name File Size Zip Size Zip Type
FILENAME.TXT 5899 2043 deflated
KELLY 0 0 stored
FFILTER.CPP 3978 1337 deflated
FFILTER.HPP 1825 756 deflated
FILT.ASM 2891 884 deflated
FILTFUNC.CPP 99 83 deflated
FILTFUNC.HPP 151 119 deflated
GOFILTER.CPP 1945 708 deflated
GOFILTER.PRJ 20933 1828 deflated
LETTERS 0 0 stored
PSTRING.C 2702 1132 deflated
PSTRING.H 1783 704 deflated
PLAUGER 0 0 stored
ESXSTREM.C 597 329 deflated
ISGETFFL.C 1646 541 deflated
ISGETIFL.C 1228 558 deflated
ISTREAM.H 2582 698 deflated
ISXCHAR.C 372 236 deflated
ISXDBL.C 586 330 deflated
ISXINT.C 344 204 deflated
ISXLONG.C 569 323 deflated
ISXPNTER.C 1045 536 deflated
ISXSTRNG.C 681 377 deflated
WS.C 327 200 deflated
XSTOD.C 591 321 deflated
PUGH 0 0 stored
PUGH01.LST 798 346 deflated
SAKS 0 0 stored
GENQ3.CPP 916 336 deflated
GENQ3.H 707 299 deflated
INSERTER.CPP 306 186 deflated
NEWAPPLY.CPP 356 189 deflated
STRQ3.CPP 505 243 deflated
STRQ3.H 638 278 deflated
STRTST3.CPP 1706 527 deflated
STRTST3C.CPP 1620 542 deflated
TREU 0 0 stored
TREU2 0 0 stored
ATT.BGI 6269 4333 deflated
BGIGRH.C 3617 1261 deflated
BGIGRH.H 348 185 deflated
BGIPIXEL.C 1861 706 deflated
BGIPIXEL.H 120 101 deflated
CGA.BGI 6253 4305 deflated
EGAPIXEL.C 3599 1331 deflated
EGAPIXEL.H 118 99 deflated
EGAVGA.BGI 5363 3878 deflated
FLOOD.BAT 72 70 deflated
FLOOD.C 5713 1898 deflated
FLOOD.EXE 61661 35638 deflated
FLOOD.H 122 93 deflated
FLOOD.PRJ 205 76 deflated
FLOODTST.C 4804 1496 deflated
HERC.BGI 6125 4292 deflated
IBM8514.BGI 6665 3434 deflated
PC3270.BGI 6029 4205 deflated
UFLOOD.C 3213 1115 deflated
UFLOOD.H 125 95 deflated
USRDEF.H 400 206 deflated
BGIGRH.C 3617 1261 deflated
BGIPIXEL.C 1860 703 deflated
EGAPIXEL.C 3599 1331 deflated
FLOOD.C 5713 1898 deflated
FLOODTST.C 4804 1496 deflated
UFLOOD.C 3213 1115 deflated
USRDEF.H 400 206 deflated
WEBER 0 0 stored
WEBER2 0 0 stored
100.PCX 19629 10291 deflated
200.PCX 194470 89400 deflated
300.PCX 344626 108181 deflated
ARGS.C 3529 868 deflated
ARGS.H 2139 884 deflated
FAXASM.ASM 13461 3840 deflated
FAXSCALE.C 8497 2663 deflated
FAXSCALE.H 334 150 deflated
FAXSCALE.OLD 7358 2429 deflated
FISH.PCX 34243 25632 deflated
PCX.C 13534 3199 deflated
PCX.H 798 277 deflated
README 3134 1434 deflated
SCALE.C 9957 2714 deflated
SCALE.EXE 14476 8853 deflated
SCALE.MAK 2260 829 deflated
SCALEASM.MAK 2269 839 deflated
FAXSCALE.C 7158 2319 deflated
SCALESFL.C 2034 668 deflated
SCLFXLN.ASM 5468 1471 deflated
SCLFXLN.C 2701 738 deflated

Download File CUJ0894.ZIP Here

Contents of the README file


Notes on the Minimalist Scaler
April 18, 1994

David Weber
Box 1376
Paonia, CO 81428
303-527-6699

This zip file contains the source code, test bench and sample image
files for a minimalist scaler. It was developed for a fax engine. As
a consequence, the byte width of the scaled line is always the standard
fax width, 216 bytes. Images which scale too large for this width are
clipped. Those too small have the right side white filled. The intent
of the scaler was to produce a device driver that used a minimum of
computer resources and yet still had quality output and acceptable
speed. The algorithm is explained in detail in the magazine article.
Call or write me if you have any comments or questions.


Packing List:

READMEThis file
FAXASM ASMEssential algorithm in assembly
ARGS CAuxiliary file for test bench
FAXSCALE CEssential algorithm in C
PCX CAuxiliary file for test bench
SCALE C Main test bench file
SCALE EXEBCC 4.0 compiled assembly version of the scaler
ARGS HAuxiliary file for test bench
FAXSCALE HPrototypes for the scaler
PCX HAuxiliary file for test bench
SCALE MAKPolymake 3.1 make file for C version
SCALEASM MAKPolymake 3.1 make file for assembly version
FAXSCALE OLDFAXSCALE.C without white space optimization
100 PCX100 dpi test file
200 PCX200 dpi test file
300 PCX300 dpi test file
FISH PCXdithered/half toned test file


Usage:
The test bench program and the accompanying test images allow you
to verify the quality and speed of the scaler. It is a simple command
line program which uses the following format.

scale -x50 -y50 input output

Where 50 in this case means scale to 50% of the original. The
scale range is 3% to 3200%. Note that x and y are independently
scaled. This means you can change the aspect ratio. The independent
x/y scaling is necessary because a fax can be either high resolution
(200 dpi x 200 dpi) or standard resolution (200 dpi x 100 dpi). The
input parameter is the file name of a monochrome PCX file. Since faxes
are monochrome, color images are not supported. The output argument is
the file name of the scaled result. The test pictures are 8 1/2 by
11 inch pages scanned at various resolutions. The 300 dpi image has
over a million pixels. Scale the sample pictures to the standard fax
width using these commands.

scale -x200 -y200 100.pcx junk.pcx
scale -x100 -y100 200.pcx junk.pcx
scale -x66 -y66 300.pcx junk.pcx

View the output with any standard paint program. The fish.pcx image
is a tough test for any scaler. It is dithered and half toned, both of
which are usually scrambled by a low quality scaler. As you can see,
it does fine.


Environment:
Tested with Borland C++ 4.0, Zortech C++ 3.1 and Microsoft C 5.1


Copyright Restrictions:
Copyright (C) 1992 by David Weber. Unlimited use is granted
for noncommercial use or for commercial distribution in EXE,
OBJ, or LIB formats. Do not sell as source without asking first.


 December 24, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)