[comp.lang.postscript] Hopeful wish for .gif and laserwriters

kgdykes@watmath.waterloo.edu (Ken Dykes) (03/25/89)

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?
All those pretty prictures and no hardcopy... sigh*
 -ken
(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)
-- 
          - Ken Dykes,   Software Development Group, U.of.Waterloo
                         Waterloo, Ontario, Canada  N2L 3G1  [43.47N 80.52W]
kgdykes@watmath.uucp     kgdykes@water.bitnet     kgdykes@waterloo.csnet
kgdykes@watmath.uwaterloo.ca   kgdykes@watmath.edu  {backbone}!watmath!kgdykes

mlm@nl.cs.cmu.edu (Michael L. Mauldin) (03/28/89)

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
--