CCL Home Preclinical Pharmacokinetics Service
APREDICA -- Preclinical Service: ADME, Toxicity, Pharmacokinetics
Up Directory CCL October 10, 1997 [007]
Previous Message Month index Next day

From:  <Steve.Bowlus "-at-" sandoz.com>
Date:  Wed, 8 Oct 1997 18:08:33 +0100
Subject:  Summary2: Presentation Graphics


*** This message was "doctored by Jan Labanowski, CCL Admin.
*** I had to do it, since some lines had unprotected From at
*** at the beginning and were splitting message in pieces in UNIX mail

>From kfink -AatT- u.washington.edu Fri Dec 30 15:07:59 MST 1994
From: Kevin Fink 
Subject: Re: Interlacing GIFs
Organization: University of Washington

> In article <3ddjqg$3qd &$at$& news-2.csn.net>, tholmes &$at$& csn.net says...
> >        Where can I find a utility to convert a GIF image to an
> interlaced GIF image, and vice-versa?

For those of us who know and love XV, I have modified the code
slightly so that it can write interlaced GIFs (it could already read
them) and can set the transparent flag on (although right now the
transparent background color has to be the first color in the color
map.  I haven't had time to add a simple form to ask the user which
color map entry to make transparent.  Should be really simple, except
that this is ski season...)
Kevin
kfink ( ( at ) ) u.washington.edu
http://alfred1.u.washington.edu:8080/~kfink/homepage.html



>From norbert $#at#$ kassandra.uni-hamburg.de Fri Dec 30 15:12:14 MST 1994
From: norbert' at \`kassandra.uni-hamburg.de ()
Newsgroups: comp.infosystems.www.misc,alt.hypertext
Subject: Re: How do I make GIF background match grey of Web browsers?
Organization: University of Hamburg -- Germany

: I've set up a descriptive page on creating transparent gifs on
: http://www.achilles.net/~kkeogan/homepage.htm

Here is an additional SHORT answer:
1) get the program "giftrans" from the net
2) type " giftrans -t '#ffffff' " and RETURN.

norbert <-at-> philosophie.uni-hamburg.de



>From gordo-0at0-interlog.com  Wed Apr 12 21:46:17 MST 1995
From: Gordon Jessop 
Subject: Re: Mac and Transparent Backgrounds
Organization: Interlog Internet Services -Voice (416) 975-2655 -Data 515-1414

fischer -8 at 8- cs.umn.edu (Tim Fischer) wrote:
>> jwyckoff "at@at" ux4.cso.uiuc.edu (Jason Wyckoff) wrote:
>> >  Is there some (shareware possibly) Mac program that can turn regular
>> >GIFs to GIFs with the transparent background?  I thought Photoshop 3.0
>> >would have it, but I haven't found a way to do it yet.
>> >JASON D. WYCKOFF                                         URH 314 Carr
>> >Univ. of Illinois at Urbana/Champaign            906 W. College Court
>> >jwyckoff at.at uiuc.edu                               Urbana, IL 61801-4786
>> >http://ux4.cso.uiuc.edu/~jwyckoff/
(217) 332-3926
>
>GraphicConverter is an indispensible utility for WWW design.  It does
>conversions to/from most formats, does transparent/interlaced GIF's, etc.
>The transparency function is a bit hidden, it's controled by a "set
>transparent color" entry in a "colors" heirarchical menu, or something
>like that.  You just set your background color, and you're all set.
>GraphicConverter also does neat stuff like clipping sizes, minor editing,
>etc, so it's great for those last-minute touch-ups.
>Timothy S. Fischer
>Teaching Assistant/Comp. Sci. Grad Student
>University of Minnesota, Twin Cities
>fischer-: at :-cs.umn.edu

if you're wondering where you can find it, you can pick it up at
one of these places
ftp://ftp.pht.com/mirrors/info-mac/Graphic/util/graphic-converter-207.hqx
ftp://ftp.tidbits.com/pub/tidbits/tisk/Graphic/util/graphic-converter-207.hqx

Otis INDEX         http://www.interlog.com/~gordo/
gordo ^at^ interlog.com             rklama ^at^ interlog.com



>From chemistry-request.,at,.www.ccl.net  Tue Aug 12 21:15:43 1997
From: "Jeffrey J. Ayres" 
To: chrirena ( ( at ) ) techunix.technion.ac.il
Subject: CCL:converting cacao output into html

PSP, paint shop pro converts
 .hgl files, resolution is not as good as the orginals.  In addition if
size of the image is reduced too much the colors are lost and the images
must be viewed in black and white.  MS Word 97 is the easiest to use,
however once the files are converted to .html resolution is poor.  To
improve the resolution for smaller size images use PSP, first resize,
second crop the image using the square selection tool(should save as a
 .gif image) under the edit menu copy the cropped image using the paste
function into a new selection, it should convert the file into a .gif
file. Save the file. Gif files are readable with several browsers.
        The post script files mentioned by John Nash were not verifiable using
my system.  The post script files were not copied into files on my hard drive.
                                                Jeff Ayres
                                                MS Biochemistry
                                                Cal. State Univ. Hayward
You may download paintshop from
ftp://ftp.support.lotus.com//pub/utils/pubutils/win32/psp32.zip

---
the file of cacao are HPGL files, you produce them for all the picture
on the
screen
and they are colected under
/moan
with the names

cacao1.hgl
cacao2.hgl.. and so on
togheter with
moan1.hgl...

you can preview them with view (if you installed printgl)
or you can easily import in WORD6.0 (htere is a filter for HPGL file)

or in any other graphic program able to read hpgl files,
then form there you may be able to convert them in .bmp or jpg
Davide Proserpio

---
        CACAO can output its pictures in PostScript and I think HPGL.  (You
have to have the PRINTGL package installed as well.)  From there, you can
use Illustrator, GhostScript, or anything else that will convert PS for the
former, and I believe that PC WordPerfect will read in HPGL.  On the Mac,
Graphic Converter can read HPGL, too.
        Personally, I've had good luck with the color postscript files.
Since they are "true" PostScript files, they are small and easily
manipulatable (i.e. vector not bitmap).  I've had the best luck using
Illustrator to make my figures.
-==-John R. Nash-==-nash[ AT ]chem.wisc.edu-==-UW-Madison Chem. Dept-==-

SOARING BEAR   bear # - at - # pharmacy.arizona.edu
O-topoisomerase
Computational Medicinal Chemistry            5'*:        :*.*
Cancer Biochemistry & Drug Design              |'*.    .*'| |
Protein & DNA Structural Biology               | | *.,* | | |
Pharmacognosy & Natural Dentistry            3'*.DNA helix| *
http://ellington.pharm.arizona.edu/~bear
'***'  '**'

>From Steve.Bowlus # - at - # sandoz.com  Wed Oct  8 14:39:19 1997
From: 
To: 
Subject: Summary: Presentation Graphics
Date: Wed, 8 Oct 1997 18:08:34 +0100


The original posting:

I'm looking for a converter program which will take a screen capture image
(e.g. an RGB file from the SGI snapshot utility, or a postscript file
generated from it) and generate a high quality postscript file.  By high
quality, I mean with the jaggies removed from letters and edges of smooth
curves, and some color/ pattern dithering for shaded surfaces, etc.

I know I can generate high quality images from molscript and/or Raster3D.  I
wish, however, specifically to process screen images (grabbed at screen
resolution) and upgrade them to printer resolution.

My thanks to all who responded.

>From the responses, there appears to be two problems.  _Text_ can be overlaid on
a screen image using a layout program such as Photoshop, whence high quality
printing is no problem.  Improving the image is another kettle of fish, however.
Some responders expect some (marginal?) improvement by processing the image
through a layout program, while others expect none -- making a silk purse from a
sow's ear, as one person put it.  I haven't had a chance to check on any of
these, but several seem reasonable (and cheap!) to try.

There were also a number of responses specifically targeting use of SGI tools,
which is the environment of greatest interest to me.

Soaring Bear (bear-0at0-pharmacy.arizona.edu) provided an extensive summary from
a
related query.  His response will be separately posted with the subject:
Summary2: Presentation graphics.
------------------------------------------------------------------------------

Richard G. A. Bone (rgab &$at$& proteus.co.uk):
I saw a program which did exactly this at an Expo in San Francisco a couple
of years ago.  So, yes, they do exist, but the price-tag was fairly high
(around $600US, as I recall).  I'm not sure if it worked on PostScript
though:  it was more for scanned images.

>From my program to the '96 MacExpo up at the Moscone Center,
I deduced that the company I saw was "ScanVec" and their product was called
"Tracer".  They appear to be still in business (from a web-search on 'scanvec'
and 'scanvec tracer') and a reasonably useful review is at:

http://www4.zdnet.com/macuser/mu_0696/reviews/review08.html

The trouble is,  I'm not 100% sure that it's exactly what you want but it may
sprout a few pointers.
----------

Malcolm A. Cline (mac -AatT- tripos.com):
What you are asking to do is virtually impossible.  Think about it--you
go from screen resolution (72dpi) to printer resolution (300dpi or higher).
This means you have to invent new pixels.  It's trivial to double or
quadruple the number of pixels, but to have the image "tailored" to be
better is something the algorithms cannot do.  There are definitely
smoothing algorithms, but even the best of them just muddle the sharp
edges instead of preserving the sharp edges in new sets of pixels.  In
a color image, there is not enough information in the existing pixels
to know what's a shadow, a shaded surface, a sharp edge of text overlays
or the like.

What I do typically, BTW, is to process the image as best as I can with
something like Adobe Photoshop WITHOUT the text, and then add text at
the final resolution.  We encounter this problem repeatedly in trying
to "blow up" SYBYL screen images for posters and full size graphics.
The only way to have a solution is to start with vectorized images.
They scale infinitely, unlike screen images or postscript files.

%%%%%%%%%%
I replied off-line to this, spelling out my thinking on how this might be
accomplished, even if no one has written a program (yet?!).  Being neither a
mathemetician or a programmer, I don't know whether this is feasible:

What I'm really talking about, I think, is image enhancement.  I know that we
can do edge detection, so what we now need is a program that would do something
like this:

For each edge/line segment detected:

    Look at the existing pixels in the segment and decide whether it is a
          straight line or a curve;
    If it is a straight line, find the ends and calculate the equation fitting
          the line;
    Calculate the color/intensity of the pixels for the line at the new
          resolution and store the results;

For each new line segment at higher resolution:

    Do some sort of check to insure that line segments are smoothly joined;

    Look at the old pixel color/intensity on either side of the old line;
    Compare this with some "bulk" color/intensity n pixels away;
    Blend the bulk color up to the new line, at the higher resolution, and store
          the results.

For edges/line segments which are not straight lines, one would do the same
thing, but do some sort of spline fit to get the equation of the line that you
would then pixelate.

This would, of course, give _huge_ files.
Is what I described above a means of "vectorizing" the image?
%%%%%%%%%%
----------

Robert B. Funchess (bobf at.at msi.com):
Most printers will automatically handle dithering for any color they
can't reproduce as a pure tone, so you're probably better off leaving
that and concentrating on smoothing the edges unless you _really_
dislike the way the printer's doing it.

In general, there's no magic way to recover lost detail, though some of
the painting/photo-refinishing programs these days are capable of
amazing things and would be worth looking into.  Normally the feature
you need will be called something like "smooth" or "blur", or possibly
"convolve" or "filter".

If you don't have access to a program like that, you could try rescaling
the image to the size (in terms of number of pixels) that you need, and
then using a convolution function to blur the jagged edges a bit; SGI
has tools for doing this sort of thing in the imgtools subsystem on the
IRIX CD-ROMs.  There are also some programs available from their website
(go to http://www.sgi.com/ and poke around a
bit).

As for the text, personally I'd suggest removing it from the original
bitmapped image whenever possible and adding real postscript text later
using showcase or something similar.  It may be tricky to do that if the
text overlaps something other than the background, though.
----------

Dave Reichert (reichertd %! at !%  %! at !% mirlink.wustl.edu):
Here's what I do using Mac systems. I take the SGI snapshot and then bring it
to my Mac. A shareware program "GraphicConverter" can read the SGI file and
save it in a huge number of different formats. Typically I'll convert it to
Photoshop format, then use Adobe Photoshop to tweak the image and add
captions. GraphicConverter can also save files directly in eps format.
----------

Joel (joelp # - at - # agiss.com):
Hmm.  Corel's PhotoTRACE, followed by "node reduction" of the curves in
their PhotoPaint package, seems to do a decent job of cleaning up jaggies
in lines and curves.  I haven't worked with it extensively, and I don't
know what Corel's software does for dithering, but I'd be a bit surprised
if one or the other package didn't handle it.  I've generally been pleased
with Corel's software, though recent releases have suffered from featuritis
and from inadequate debugging.

As far as I know, their software is for PCs only; you'd need to port the
image over.  If you're working from an RGB file, you'd need to translate
it to some other format, but even if your SGI doesn't have those translation
utilities as part of the OS, you shouldn't have any trouble finding them.
-----------

Malcolm (gillies ( ( at ) ) cmcind.far.ruu.nl):
Some good in-depth discussion of this can be found in the Raster3D
FAQ at

    http://www.bmsc.washington.edu/raster3d/r3d_FAQ.html#PostScript

as well as a recipe for getting reasonable results using the ImageMagick
convert utility.

    http://www.bmsc.washington.edu/raster3d/html/r3d_hints.html#PostScript

Some general comments (apologies if you know all this already):

No image conversion program can remove jaggies from a screen image,
except by decreasing the resolution. The quality of the output image
can never be better than what appears on screen, given that you are
operating with a raster image of predetermined resolution.

Rendering of continuous tones is highly dependent upon the printing
technology you use. Mostly, they are rendered as half-tone process
colour. Precisely the type of half-toning, screen frequency, etc.
will depend upon the relative resolution of your image and your
printer.

The Postscript language contains many facilities for manipulating
colour information, and for rendering continuous tone images. By
default, these are configured to give good results, on average, for
the particular printer that is being used. However, getting the
best possible image quality will depend upon factors such as matching
the image resolution to the printer resolution (and adjusting halftoning
parameters accordingly) and making sure the image colours match the
output capabilities of the printer.

Unfortunately, there are no general recipes for optimising this.
Commercial software such as Adobe Photoshop (or alternatively, commercial
colour pre-press software) is probably the easiest solution, but you
can also achieve good results using freeware image manipulation and
conversion tools (like the pbm tools), if you know what you're doing.
-----------


Some tips/comments on using the SGI image conversion programs utilities:

Paul Veilleux (veilleux %-% at %-% corp.sgi.com):
I am a Systems Engineer in Mountain View and received a copy of your question
regarding converting a SGI screen image and outputting to Postscript.

Have you tried the 'tops' conversion program on the SGI? It takes an image and
converts to whichever format you select. However, I am not certain about the
resolution that the resultant image is converted to.

Below is the syntax for using 'tops':

chembio 7% tops
usage: tops inimage [-l screendensity]
                    [-p pixelsperinch]
                    [-a screenangle]
                    [-b bitsperpixel]
                    [-B ]
                    [-x xpixelsperinch]
                    [-y ypixelsperinch]
                    [-t scaletrim
                    [-m maxxinches maxyinches]
                    [-h horrizontal line screen]
                    [-o xorg yorg]
                    [-rgb]
                    [-RGB]
                    [-cmyk]
                    [-CMYK]
                    [-eps ]
                    [-I ]


The -eps option should be used for your case.
-----------

Dorina Kosztin (dorina-0at0-ks.uiuc.edu):
If you have a Next computer and the TIFFany2.app application, then
all you have to do is load the rgb file in it and fix whatever you
want to have fixed.

If you don't, then you may use Image Magic on the SGI's but I don't
think you can change the resolution of the picture without having
to shrink it. So you should take a snapshot of the screen as big as
you can and then size it down and by doing this you'll increase the
resolution of the picture.
----------

David A. Larson (dlarson \\at// tripos.com):
I recommend using imgworks which comes with the graphics tools on
your SGI.  It has the image processing tools you are looking for.
The path to imgworks is /usr/sbin/.

You can import RGB images into Showcase which comes with the IRIX
CD.  Once the image is in Showcase you can scale the image on the
page as you like and then print to a postscript file if you like.
The nice thing is that the full RGB image data is used when doing
the postscript conversion.  To maintain the image's aspect ratio
hold down the SHIFT key while scaling.  Another caveat is to
select the menu "View >> Full Color" to maximize the image quality.
-----------

Gene Fleischmann (gene <-at-> q-chem.com):
If you have not already tried on SGI systems you might use:
/usr/lib/print/sgi2ps -C rgb "filename".rgb "filename".ps
to do the conversion and then:
/usr/bin/X11/xpsview "filename".ps
to view the results immediately and compare with:
/usr/sbin/imgworks "filename".rgb
----------

And thanks to responders who made similar suggestions:

Joseph I. Landman (landman %-% at %-% firestorm.physics.wayne.edu)
Hongyu Zhang (hyzhang %-% at %-% carb.nist.gov)
----------

Michael K. Gilson (gilson { *at * } indigo14.carb.nist.gov):
Try the program xv.  It can read rgb,
do a 24-->8bit conversion, and write out
color postscripts.
----------

Steve Greatbanks (Steve.Greatbanks %-% at %-% anu.edu.au):
There are two slightly different problems here. With molscript, you get
vector postscript output which will take maximum advantage of the
resolution of whatever postscript output device you use - thus, on a good
printer, there will be no jaggies or aliasing, and hence, no problem. I
think the problem that you are referring to is a result of the printer
`aliasing' the postscript because your postscript file has a resolution
(in dpi) different from the printer. To get rid of this, you must ensure
you generate postscript files which match the target resolution of the
output device. The best way I've found of doing this from your rgb file
is to use xv, and when saving as postscript, make sure you resize the
picture using the dials until you get the resolution you require in terms
of multiples of the printer resolution - for standard laser printers, try
100, 150 (usually fine), 300 (good) and 600 (often overkill) dpi.
Obviously, this will change the size of the graphic. In the case of
screendumps you are clearly limited in the size of image you can capture,
but 150 dpi (especially for colour pictures) is often good enough on a
300 or 600 dpi laser printer.

For programs like raster3d, or if you raytrace your own outputs, you can
work out the size of the postscript file you want (in inches), the
resolution of your output device (in dpi) and then render an appropriately
large picture (the resulting postscript may be huge, but will look
excellent on your output device). For example - if you have a 600 dpi
printer, and you want a 5x3 inch picture, just render the screen
image to 3000x1800 pixels and things will look great (provided your
printer can cope with the size of the ps file!).

Text added in modelling packages often looks rather poor as the fonts are
generally not antialiased. To improve the quality of the text on
screendumps, it might well be better to add the text in another program.
You can add either to the bitmap (e.g. using something like the gimp
(http://www.gimp.org) which has flexible text
handling and can add
antialiased text), and then generate your postscript at the appropriate
resolution or generate the unlabelled postscript (ensuring it contains a
bitmap preview, using something like ps2epsi) and then read it into a
program where you can add postscript text and export the compound object
as an encapsulated postscript graphic (which ensures the text will make
maximum use of the resolution of the output device). I used to do this in
showcase on SGIs, but the newer versions don't show the preview (so you
can't see where the labels go) - that's progress for you! I now do it on
the mac instead.

In general, even though programs like xv will dither colour pictures to
black and white for you, you are much better off letting the printer
decide. Just pass the printer colour postscript and take advantage of the
rasterising of the printer (which is optimised for the particular engine
used in the printer). Trust the printer.

You need to bear in mind that you are never going to do better than the
picture on screen. If there are visible jaggies on screen, the higher
resolution of the printer will only exacerbate them. Sometimes you can use
a little judicious image manipulation to help things (e.g. using the
smooth option in xv prior to generating the postscript can *occasionally*
help).




Similar Messages
08/08/1994:  Image translation program Summary
02/15/1998:  summary: postscript editor
10/03/1997:  Re: CCL:Presentation graphics
08/12/1997:  converting cacao output into html
09/23/1994:  5
07/06/1995:  SUMMARY: Color Printers
12/01/1995:  Summary of 3D to 2D conversion
11/04/1993:  Re: Mac that reads postscript
04/23/1992:   Huckel MO Theory software
11/13/1993:  RE: Orbital Plotting Packages


Raw Message Text