Subject: Image translation program Summary

From: Charles Letner <[email-masked]>
Date: Mon, 8 Aug 1994 08:35:43 -0700 (PDT)

Hello again,
	A week ago I asked about programs to do image translation from
various graphics formats to high resolution postscript.  Here is the
summary of the responses as promised.  Thanks to everyone that sent a
response.

Best regards
Chuck

Charles Letner
Wright State University
Department of Biochemistry
Dayton, OH 45435
e-mail: [email-masked]

--------------------------------------------

From: Martin Hargreaves <[email-masked]>

	Hi,

	if you have an sgi you have imconv I guess (if not I think you 
can get it by ftp from sgigate.sgi.com as part of the imgtools package), 
then there's a thing called tops - man page:

TOPS(6D)                       Silicon Graphics                       TOPS(6D)

NAME
     tops - Convert an iris image to PostScript

     SYNOPSIS
	  tops inimage [-l screendensity]
                  [-a screenangle]
                  [-p pixelsperinch]
                  [-x xpixelsperinch]
                  [-y ypixelsperinch]
                  [-b bitsperpixel]
                  [-B ]
                  [-t scaletrim ]
                  [-m maxxinches maxyinches]
                  [-h ]
                  [-o xorg yorg]
                  [-rgb ]
                  [-RGB ]
                  [-cmyk ]
                  [-CMYK ]
                  [-eps ]
                  [-I ]

DESCRIPTION
     tops converts an IRIS image file into Postscript.  This program can
     generate black and white or color PostScript.  It can create binary as
     well as ASCII PostScript.  It also can generate encapsulated PostScript
     with a preview image.

	I guess you'd have to contact SGI about getting it. It isn't on 
our system, only the man page....

	Regards,

		Martin.
---------------------------
From: David Larson <[email-masked]> 

I usually capture my images using the 'snapshot' utility and either import them
into 'Showcase' and print them, or use the 'tops' utility to convert the iris
rgb images to postscript.

I actually like using Showcase better because I can read in a large image and
then resize it to fit on a 8.5 x 11" page.  Showcase will use all of the data
stored in the image when it prints (even though it won't look to good on the
screen).  To resize the images in Showcase AND maintain the aspect ratio, hold
down the <Shift> key while resizing the image with your mouse.
---------------------------------
From: Jussi Eloranta <[email-masked]>

PBMPLUS is a good conversion package. You should be able to find it with
archie.

jussi
----------------------
From: tj ODonnell <[email-masked]>

Most computer screens are about 100 dpi and so if you are doing
a screen dump AND you want your page size to be the same as
your monoitor size, you will effectively be getting ~100dpi.
If you reduce your image to 1/6th the size on the page compared
to the monitor, it will be 600 dpi.  So the question is:
Are you satisifed with images 1/6 the size? OR
Can you produce image files 6 times larger than you now have? of course
these will not be viewable on your monitor, except in pieces.
If your image is say 600x600 (typical for monitor viewing) the
best 600 dpi image will be only 1x1 inch!  If you only have
600x600 data, you can only interpolate so far before it starts
looking like caca.

> there is a file conversion program that will take my image files (TIFF
> would be good, though as I said I can output other formats) and output 600
> dpi postscript files?  I would like this to be a unix program (I'm using a
> SG Indigo II) and viewing capabilities isn't essential for this utility. 
> As I expect I'm not the first to have this little problem I will send a
> summary of the responses.
> Your help will be appreciated.

On the SGI there are several utilities I use routinely.  tops converts
an SGI image file (.rgb) to b/w or color postscript and allows you
to specify the pixels per inch, or alternatively the max x and y inches.
If you are doing b/w on a 600 dpi printer like an AppleWriter
or HP laster printer, postscript will be using linescreening to 
simulate grey levels.
In this case BE SURE TO USE -l 80 OR -l 90 INSTEAD OF THE DEFAULT.
I think the default is about -l 40 and works well for 300 dpi b/w.
On a (dye sublimation) color printer such as the Tektronix,
grey levels are accurately printed without linescreens, as are colors.
On other color printers, such as ink-jets which dither colors,
try -l values with tops.  I have not worked extensively with
color printers other than dye-subs printers.

For black and white images, for example:
tops image.rgb -l 90 -p 600 | lp -dhplaser ( for any image size, but
 output image size on paper will vary )
tops image.rgb -x 2 -y 2 -l 90 | lp -dhplaser (for a 1200x1200 b/w image)
 where 2 (inches) is 1200(image pixels)/600(pixels/inch).
The -l 90 I arrived at by experimentation. 70 to 100 works well.

For color images, use the -rgb switch too.  For dye sub printers,
the -l switch is ineffective, though the -x and -y which 
determine the effective scale factor greatly influence the
quality of the picture, assuming a given image resolution.
For example: (assuming a 300 dpi tektronix phaser dye sub printer)
tops color.rgb -x 6 -y 6 | lp -dtekphaser (for  1800x1800 color image file)
tops color.rgb -x 6 -y 6 | lp -dtekphaser (for  600x600 color image file
 works OK but scales each pixel 3 times and may look "blocky")

The frustrating thing is: if you want true 600dpi resolution
you need a 4800x4800 image to get a 8x8 inch output!

As for TIFF files, there is a utility to convert TIFF to SGI.
try imgcopy (IRIX 5.x only?).  There is a fromtiff (to convert
TIFF to SGI.RGB) available via anon ftp at sgi.sgi.com (in
/sgi/graphics or /pub/graphics or /?/tiff ?).

Finally, there is a very nice program on the SG called showcase
which can import SGI.RGB files (and TIFF, too?) and output
Postscript files.  It allows you to re-scale and place the
images on the page with text, drawings, etc.

There are libraries of public domain file-conversion utilities
whose names I forget now.  I bet you'll get some responses
about these.  If not, and you'd like, I'll track them down
for you, or try 'archie tiff'

Hope this helps.  Don't hesitate to ask if you need more help.

TJ O'Donnell
[email-masked]

------------------------
From: "C.S.RAMAN" <[email-masked]>

What you want is the PBM translation suite. It comes in three
different flavors:

PBM
PBMPLUS
NETPBM

You can find these at many anon. FTP sites (using ARCHIE).  PBM is
capable of converting images from one format to numerous others and is
extremely useful.

Alternatively, you could also try John Christy's ImageMagik available
at various anon. FTP sites.  You may have to search for some of the
utilities that go with it to accomplish your task.

Cheers
-raman
---------------------------------
From: Omar Stradella <[email-masked]>

Depends on what you mean by 91 dpi, that probably really means cells/inch
instead of pixels/inch, since your PostScript printer will print at
whatever dpi was built or configured for. Let's use as an example
your B/W 600 dpi printer, each dot can be only white or black.
If you are printing a B/W image (that means no grays
at all) such as a molecule represented with circles (balls)
and straight lines (sticks) then you can get the full 600 dpi
resolution. If you want to print an image with gray levels, the conversion
program has to "halftone" the image, halftoning is the process by which
continuous-tone colors are approximated by a pattern of pixels that can
achieve only a limited number of discrete colors. So now the "points"
that form the image are not longer pixels but groups of black and white
pixels that combined produce the correct level of gray. So, if your
image is 91 cells/inch that is 600/91 = 6 pixels per side or 36 pixels per
cell, then 37 levels of gray are possible. Your image looks grainy but
you can appreciate the differences of "color". If you convert a rasterized
image (like a TIFF file) to PostScript, you'll always have to halftone
the image, if you want a finer grain you'll get a smaller range of
gray tones. If you want 600 dpi you will get only black and white, no
grays at all. In that case I would prefer an image created with PostScript
primitives (lines and circles) instead of a rasterized image. Publication
quality rasterized images can only be obtained with "publication
quality printers", that is 1500 dpi or more, since 1500/6 = 250 cells/inch
or 250 gray dots/inch which should look good enough. The same principles
apply to color printers.

--------------------------------------
From: Dongchul Lim <[email-masked]>

There're a lot of public domain programs which have been written for the
very purpose. They are 'PBMPLUS', 'IMAGEMAGIK', 'XV', etc, to just name a few.
Among those, what I like most is 'xv' which is available from most
anonymous ftp sites. It's pretty small but does all jobs I want to do...
-D. Lim

-----------------------------
From: Robert Williams <[email-masked]>

You may find that the "pbmplus" package
will do what you want.
Use archie to find it.  If you can't find it,
I probably have a path stored here somewhere.
Bob Williams
----------------------------
From: Iosif Vaisman <[email-masked]>

I would transfer TIFF file to a PC or Mac, import it to any wordprocessor 
or graphic program (Word, PowerPoint, Freelance Graphics, etc) and print 
at desired resolution.
---------------------------------
From: Iosif Vaisman <[email-masked]>

I would transfer TIFF file to a PC or Mac, import it to any wordprocessor 
or graphic program (Word, PowerPoint, Freelance Graphics, etc) and print 
at desired resolution.
-------------------------
From: Johan Landin <[email-masked]>

Hello Chuck,

Have you tried the pbmplus package? Included therein are the programs
tifftopnm and pnmtops, the first converting from TIFF to pnm (= portable
anymap file format) and the second from pnm to PostScript. However, I
cannot say anything about the quality of the conversion as I have not
tested this conversion myself, just read the manual pages.

The pbmplus package is freeware and available on the net.

Good luck!
         /Johan Landin
-------------------------------
From: Gernot Katzer <[email-masked]>

Hi Chuck,

did you try xv? It's a PD X viewer which supports several graphic
formats: GIF, PM, X11 Bitmap, BMP, PS, JPEG, TIFF and some more.
Note that not all these formats are accepted as input, but GIF and 
TIFF are.

It should be available via anonymous ftp and easy to install.
I use it on a SGI and I am quite happy with it, although I have not
tested the PostScript interface excessively.

Hope that helps a little,

Gernot
-------------------------
From: Mr Andrew D Allen <[email-masked]>

We use xv here at Surrey, though i'm not too sure of the resolution of the
Postscript output. You could try contacting John Bradley:-

	John Bradley  -  [email-masked]

Andy.
---------------------------------
From: Bernhard Anton Pabsch <[email-masked]>

High Chuck,

have you tried the xv program?
You may find it with archie somewhere in the net.

On the other hand: Maybe the resolution of your generated pictures
is just 91 dpi at highest and no conversion will increase this.
Of course, if you can always scale down in size which will increase dpi.
So, you might want to save your images in the biggest size and highest
resolution initially and then convert and scale down to the desired size.

Una volta aperto, conservare in frigo!

					  bap-man
----------------------------
From: "Craig W. Burkhart" <[email-masked]>

Chuck:

Since you have an SGI, maybe this will help. In the old IRIX 4.0.5
releases, there was software to perform various RGB image manipulations.
Among these were TIFF to RGB (and back again) filters. Also, there was
an RGB to PostScript filter in which one of the arguments allowed you
to define the output resolution (I believe that 98 dpi is actually the
default, not 91, but I may be wrong).

These goodies were part of the 4Dgifts software available on the 4.0.5
release. I believe you will need to look for the "giftsfull" (or something)
like that) designation when you fire up "inst".

If you need more detailed information than this, get back in touch
with me and I will give you the EXACT info. I'm doing this off the
top of my head {:-). I can tell you that I have used these utilities
in the past, and they have really helped me out. The best part is that
it is all C source code, so you can play with it if you wish...