PNG
- Last UpdatedOct 27, 2023
- 2 minute read
Models
This driver generates output in PNG file format.
Description
The PNG (Portable Network Graphics) format is a patent-free replacement for GIF and can also replace many common uses of TIFF. It provides a means for the lossless, portable storage of well-compressed raster images.
PNG is designed to work well in online viewing applications, such as the World Wide Web, and for user interface and general usage.
Note that the standard PLOTDRIVERS file changes the default for this driver to use PDMS colours. To find out how to restore the colours to their previous state and other details about modifying the default options of the built-in drivers see the section on creating your own device drivers.
Output
Files output by the PNG driver are in binary format.
Options
The syntax for each option is as follows (individual options must be separated by commas):
|
BItmap width height |
Defines the size of the bitmap image in pixels. Sizes should be greater than 16 x 16 and the upper size limit is 8000 x 8000. The default size is 600 x 400. |
|---|---|
|
LAyout type |
Defines how the image is placed in the bitmap, where type is one of the following: |
|
FIT reduces the width or height of the bitmap so that it fits the image exactly. This is the default. |
|
|
CENtre places the image in the centre of the bitmap. |
|
|
CORner places the image at the top left corner of the bitmap. |
|
|
RGb pen r g b |
Selects colour mode and defines the red/green/blue colour mix for the specified logical pen number (pen must be in the range 0-15). The colour values are in the range 0 to 1. The background colour of the image is black by default but this can be changed by defining pen 0, for example, RGB 0 1 1 1 sets it to white. |
|
SIze width height |
Defines the minimum plot size in millimeters that is scaled to fill the bitmap image. Increasing the size of a number of plots to a common value means that their pixel scaling is also the same. This is important if the bitmap files are to be manipulated by other programs. |
|
TRan |
Sets the image background to be transparent. |
Example
plot png in.dxf out.png "BITMAP 32 32"