Article View: comp.lang.postscript
Article #8168Re: Hopeful wish for .gif and laserwriters
From: Michael L. Mauldin
Date: Tue, 28 Mar 1989 03:34
Date: Tue, 28 Mar 1989 03:34
128 lines
4981 bytes
4981 bytes
In article <24529@watmath.waterloo.edu>, kgdykes@watmath.waterloo.edu (Ken Dykes) writes:
>
> I may be dreaming, but, would someone happen to have a program that would
> take .gif graphics data files and turn them into nice grey-scales on
> a laserwriter?
> (i can see it now, a 5 step process using several filters to convert to
> various formats until one ends up in a printable form)
Would you believe 3 steps and a trip around the bathtub?
2 steps?
1 step?
Yes, the FBM package does that. The pipeline is:
clr2gray < foo.gif | fbnorm | fbps [ -w<width> ] [ -s ] > foo.ps
The image defaults to the largest size within 7.5 inches wide by 9.5
inches tall (the -w option sets the width), and the -s (Scribe option)
option disables the "document structuring conventions" so the image can
be incorporated in a Scribe document (for older Scribe @graphic
commands).
The 'clr2gray' command converts mapped or RGB color to grayscale. The
'fbnorm' command is required to convert files with less than 8bits per
pixel to 8bit files. The 'fbps' command can handle an 8bit grayscale GIF
image directly.
The full code will be available on comp.sources.unix shortly (it's in
the queue). FTP is available now, see the end of the message:
************************************************************************
* Announcing the "Fuzzy PixMap" (or FBM) image manipulation library *
************************************************************************
Inputs the following file formats
o Sun rasterfiles (1, 8, or 24 bits, color or grayscale)
o GIF files (1 to 8 bits, color or grayscale)
o Amiga IFF files (except HAM mode)
o PCX files
o PBM bitmaps
o Face files (CMU format for 1bit files by Bennet Yee)
o FBM files (my own format)
(automatically determines input format, and uncompresses
files compressed using 'compress')
Outputs the following formats
o Sun rasterfiles
o FBM files
o GIF files (mapped color only)
o Amiga IFF files (except HAM mode)
o PBM (1bit files only)
o Face format (1bit files only)
With input converter for
o raw images (like Amiga Digi-View files)
With output converters for
o PostScript DING DING DING DING DING DING DING DING DING DING DING
o Diablo graphics (1bit files only)
Operations
o Extract rectangle (optionally resizing and changing aspect ratio)
o Change density and contrast (color and grayscale)
o Rotate 90, 180, or 270 degrees
o Quantize 24 bit RGB images to 8..256 colors
Modified Heckbert median cut
o Halftone grayscale using
Ulichney's Blue Noise dithering
Floyd-Steinberg dithering
Jarvis's Constrained averaging
Threshholding
o Edge Sharpening by Digitial Laplacian (color or grayscale)
o Convert color to grayscale (or compute "gray" colormap
so grayscale images can be viewed on frame buffers)
o Compute histograms of grayscale images
o Sample 1bit images to convert to grayscale
Status
Beta test release, 0.9. "Use at your own risk, bug fixes not
guaranteed, be happy with minimal documentation." Bugs reported
so far have been fixed.
Freely available for use, redistribution, incorporation into
other code. Just don't make a profit off it or take my name
off of it.
Written in C for BSD and Mach Unix Systems.
Tested on Vaxes, Sun Workstations, IBM RTs and Pyramids.
Self contained. Does not require Sun include files or library
routines to manipulate Sun rasters.
Availability
Anonymous FTP
Host: nl.cs.cmu.edu (128.2.222.56)
User: anonymous
Password: name@site
Directory: /usr/mlm/ftp/
Filename: fbm.tar.Z
Transfer: 'image'
Note: you must 'cd' to /usr/mlm/ftp directly, you cannot access
either /usr, or /usr/mlm alone. Don't forget to specify 'image'
format transfer.
Has been posted to UseNet (comp.sources.unix).
Acknowledgements
GIF read support written by David Koblas.
GIF write support written by David Rowley.
Some IFF code by Jerry Morrison and Steve Shaw of Electronic Arts.
Edge detection and pixel cleaning by Gary Sherwin and Michael Mauldin
Michael L. Mauldin (Fuzzy) School of Computer Science
ARPA: Michael.Mauldin@NL.CS.CMU.EDU Carnegie Mellon University
Phone: (412) 268-3065 Pittsburgh, PA 15213-3890
--
Technical Details
Message-ID:
<4583@pt.cs.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!nl.cs.cmu.edu!mlmReferences:
<24529@watmath.waterloo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!nl.cs.cmu.edu!mlm From: mlm@nl.cs.cmu.edu (Michael L. Mauldin) Newsgroups: comp.lang.postscript Subject: Re: Hopeful wish for .gif and laserwriters Summary: Various formats to Postscript (IFF, GIF, PCX, Sun) Message-ID: <4583@pt.cs.cmu.edu> Date: 28 Mar 89 03:34:29 GMT References: <24529@watmath.waterloo.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 127