I am running IDL V5.4 on OpenVMS AXP V7.1-2. I cannot upgrade to a
later version of IDL since it is no longer made for VMS (dumb move,
but that's another thread). In fact, since IDL V5.4 doesn't generate
GIF files, I may have to go back to an earlier version to get that
capability. But I'm getting ahead of myself.
I want to generate a GIF file with a raster-like plot in it. I know
how to do this using the Z-buffer as a device (SET_PLOT,'Z'). All my
experience with GIF plots on other systems, though, show they display
with slightly jagged lines, as though made on a low-res plot (which
GIF is, I suppose). I have seen, however, GIF plots made by other
packages that have a great look: smooth curves and letters, no
jaggies.
I know how to vary the size of the output GIF file: the SET_RESOLUTION
keyword to the DEVICE command. The problem is that this keyword only
changes the *size* of the resultant GIF file, not its resolution. If
I use this keyword, all I get is a large GIF file with jaggies. When
viewed on a browser, that gives me a larger image. I want the image to
stay the size that can be displayed on a normal browser window, just
to have a higher resolution.
Does anyone know of an IDL solution that'd work in V5.4?
If there's none, I can create an alternate format, such as PostScript,
that has the high resolution plots. I'd then have to convert it to
GIF (simply because very few browsers, if any, interpret PS).
Does anyone know of a way to convert PS to GIF? I read about
Ghostscript and Ghostview, but the ftp site says they removed the GIF
generation capabilities from the package due to licensing problems.
Since we're going to be displaying these gif's on the web, that's
probably not a way for us to go. Any other ideas?
Lastly, a suggestion made here was to generate jpeg files instead of
GIFs. Several questions here:
1) Is this technically a good way to go, since we're displaying line
plots rather than pictures? I.e., could the "lossy" nature of jpeg's
algorithm hurt my plot?
2) Since making jpeg's from IDL also involves the Z-buffer device,
won't this have the same limitations as making a GIF file?
For example of jpeg's with jaggies, see
http://uleis.umd.edu/~bleau/x.jpg <-- default resolution
http://uleis.umd.edu/~bleau/x2.jpg <-- used SET_RESOLUTION=[1000,1500]
In particular, take a look at the characters used to label the axes.
Even at higher resolution they look bad. And yes, I know jaggies are
usually an artifact of the monitor. Only thing is, I've seen a GIF
display on a monitor that *didn't* have jaggies, so I know it's
possible.
Thanks, all.
Lawrence Bleau
University of Maryland
Physics Dept., Space Physics Group
301-405-6223
bleau@umtof.umd.edu
|
|
0
|
|
|
|
Reply
|
bleau (50)
|
2/13/2004 9:37:17 PM |
|
In article <c0jg2d$crv$2@grapevine.wam.umd.edu>, bleau@umtof.umd.edu (Lawrence Bleau) writes:
> I am running IDL V5.4 on OpenVMS AXP V7.1-2. I cannot upgrade to a
> later version of IDL since it is no longer made for VMS (dumb move,
> but that's another thread).
Agreed. I think I know their last big VMS customer that moved to Sun.
Sigh.
> Does anyone know of a way to convert PS to GIF? I read about
> Ghostscript and Ghostview, but the ftp site says they removed the GIF
> generation capabilities from the package due to licensing problems.
> Since we're going to be displaying these gif's on the web, that's
> probably not a way for us to go. Any other ideas?
My first idea would be: don't use gif files so you don't have to
worry about those same licensing issues.
|
|
0
|
|
|
|
Reply
|
koehler2 (8190)
|
2/13/2004 10:14:35 PM
|
|
bleau@umtof.umd.edu (Lawrence Bleau) writes in article <c0jg2d$crv$2@grapevine.wam.umd.edu> dated Fri, 13 Feb 2004 21:37:17 +0000 (UTC):
>Does anyone know of a way to convert PS to GIF? I read about
>Ghostscript and Ghostview, but the ftp site says they removed the GIF
>generation capabilities from the package due to licensing problems.
>Since we're going to be displaying these gif's on the web, that's
>probably not a way for us to go. Any other ideas?
If you can display it in an x-windows application, you can use XV for VMS to
capture the image and save it as GIF. XV was released when the owners of
the GIF patents were still neing nice.
>Lastly, a suggestion made here was to generate jpeg files instead of
>GIFs. Several questions here:
>
>1) Is this technically a good way to go, since we're displaying line
>plots rather than pictures? I.e., could the "lossy" nature of jpeg's
>algorithm hurt my plot?
Yes, it could. In fact, if you blow up your jpgs you will see lots of
non-black (but different shades of dark grey) pixels.
>2) Since making jpeg's from IDL also involves the Z-buffer device,
>won't this have the same limitations as making a GIF file?
>
>For example of jpeg's with jaggies, see
>http://uleis.umd.edu/~bleau/x.jpg <-- default resolution
>http://uleis.umd.edu/~bleau/x2.jpg <-- used SET_RESOLUTION=[1000,1500]
>
>In particular, take a look at the characters used to label the axes.
>Even at higher resolution they look bad. And yes, I know jaggies are
>usually an artifact of the monitor. Only thing is, I've seen a GIF
>display on a monitor that *didn't* have jaggies, so I know it's
>possible.
It looks like you're using a stroke font on a raster device, which should
only be done if the raster is *much* bigger than you need. For display
purposes I'd suggest a 14-point raster font.
The line-drawing algorithm you're using appears to be the
"1-pixel-max-thickness" one (sorry I don't know the technical name). It's
bad because diagonal lines have 0.707 colored pixels per pixel of length,
compared to horizontal and vertical ones which have 1 colored pixel per
pixel of length. I came up with a better one back in the 1980s which
colored in a swath which was 1 (or n) pixel(s) wide. If the center of the
pixel was within half a pixel of the centerline, it gets lit. Making all
the lines uniform thickness does wonders for readability.
--Keith Lewis klewis {at} mitre.org
The above may not (yet) represent the opinions of my employer.
|
|
0
|
|
|
|
Reply
|
lewis17 (80)
|
2/13/2004 11:33:18 PM
|
|
Lawrence Bleau wrote:
> If there's none, I can create an alternate format, such as PostScript,
> that has the high resolution plots. I'd then have to convert it to
> GIF (simply because very few browsers, if any, interpret PS).
You could use Ghostscript to genererate a PDF file from a postscript input.
This has the advantage that the rasrterization is performed by the client at
whatever resolution they want. When you print to a postscript printer, it is
the printer that draws the lines so there are no jagged images at all.
|
|
0
|
|
|
|
Reply
|
jfmezei.spamnot3 (961)
|
2/16/2004 4:36:06 PM
|
|
|
3 Replies
410 Views
(page loaded in 0.078 seconds)
|