![]() |
GDName:
GIF is still probably the most popular format for web applications. GIF was not supported in earlier versions due to a patent issue. The patent is no longer being enforced, so GIF support was included starting in 3/2006. JPEG is primarily intended for photographic type images, although it can be used for basic plotting images as well. PNG was developed as a free and non-patented alternative to GIF. It is the primary image format for a number of popular software programs (for example, Perl). Although GIF, JPEG, and PNG images can be created from Dataplot Postscript files using one of the numerous image conversion programs now available, it is still convenient to be able to generate these files directly from Dataplot. This can be done using the GD device driver. Note that Postscript files may still be of interest for some applications due to the fact that the Postscript graphs are rendered with greater resolution. Dataplot uses the GD library, originally developed by Thomas Boutell, to generate GIF, PNG and JPEG files. This is the library used by Perl (and many other programs) to generate GIF, PNG, and JPEG images. GD in turn uses four additional libraries: zlib, libpng, libjpeg, and libfreetype. These libraries are all freely downloadable from the web. If these libraries are not currently installed on your system, the URL's and current versions (as of 10/2014) are as follows:
Dataplot is not particularly sensitive to which version of the GD library you have on your system. Any reasonably current version should suffice. The major restriction is that GD 1.x versions are no longer supported (GD changed some calling sequences in moving to the 2.x versions. The Dataplot code is now updated to use the 2.x calling sequence This change was made in the 3/2006 version of Dataplot). The availability of the GD device driver in Dataplot is dependent on having these libraries built on the given platform. The pre-built Dataplot executables for Linux, Cygwin, and Mac OS X should support this capability. The GD library is not currently supported for the Microsoft Windows executables. Note: Dataplot upgraded to use the 2.1 version of GD July, 2014 (this is the version that is now being maintained by the PHP organization). With this upgrade, Dataplot now supports several additional image formats.
where <format> is one of PNG, JPEG, GIF, BMP, WBMP, TIFF, TARGA, or WEBP. This form designates device 1 as an GD graphics device.
where <format> is one of PNG, JPEG, GIF, BMP, WBMP, TIFF, TARGA, or WEBP. This form designates one of DATAPLOT's 3 devices (typically device 2) as an GD device.
DEVICE 2 GD JPEG
DEVICE 2 GD PNG generate first plot DEVICE 2 CLOSE SET IPL1NA PLOT2.PNG DEVICE 2 GD PNG generate second plot DEVICE 2 CLOSE The SET IPL1NA command specifies the name of the file. Note that this name is currently converted to upper case. This command should come before the DEVICE 2 GD command.
DEVICE 2 GD PNG DEVICE 2 PICTURE POINTS 300 300 generate first plot DEVICE 2 CLOSE
Under Windows, an alternative is to use Ghostview to convert postscript files to JPEG or PNG. Once you import the Dataplot postscript graph into Ghostview, select "File" and then select "Convert". This menu will then let you select the image type and the resolution (we suggest using 300 dpi since this is the default resolution Dataplot uses for Postscript graphs). This is preferred method under Windows since it allows you to preserve the high quality fonts and 300 dpi resolution of the original Postscript graph while providing a graphics format that can be easily handled by most Windows applications. The one drawback is that it doesn't work if you need a fully automated process.
In either case, you can specify the font to use with the command (there is no default font)
GD renders fonts using the Free Type library. This capability was added to Dataplot 3/2008. Versions prior to this rendered text using one of Dataplot's software fonts.
To specify the color model, enter
The default is FIXED. The TRUE mode is recommended if you are going to be generating image plots.
2008/04 - added support for hardware text 2014/07 - upgraded to GD version 2.1, added support for BMP, WBPM, TGA, and TIFF formats
DEVICE 2 GD PNG DEVICE 2 PICTURE POINTS 400 300 TITLE SAMPLE PNG PLOT PLOT X**2 FOR X = 1 1 9 DEVICE 2 CLOSE SET IPL1NA PLOT2.PNG DEVICE 2 GD PNG DEVICE 2 PICTURE POINTS 500 400 TITLE SECOND SAMPLE PNG PLOT PLOT X**3 FOR X = 1 1 9 DEVICE 2 CLOSE
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 06/05/2001 |