Navigation:  Programmer's Reference > Sending data to DPlot from another application >

SetPluginImageDims macro command

Print this Topic Previous pageReturn to chapter overviewNext page

Macro commands may be used either in macros or by sending the commands to DPlot via dynamic data exchange (DDE). Some commands are valid only in macros (noted by Macros Only). Commands sent to DPlot via DDE must be enclosed by square brackets [     ]. Macro commands should not include the brackets.

Command parameters shown in the descriptions below are placeholders for the actual values. Command parameters are either numeric values, equations that evaluate to numbers, or character strings. Character string parameters are always bound by double quotation marks. Equations must be preceded by an equals sign (=).

The pipe symbol (|) in the command syntax indicates that a parameter is optional, and should not be included in your macro unless otherwise noted.

All indices into arrays are 1-based, e.g. Curve1=1 refers to the first curve in a plot.

A 0x prefix for numbers in the descriptions below indicates hexadecimal notation; e.g. 0x0010 = 16.

JR/Viewer indicates that the command is supported by DPlot Jr or DPlot Viewer.
JR/Viewer indicates that the command is NOT supported by DPlot Jr or DPlot Viewer.



JR   Viewer

Sets the size of images saved to disk with an image file export plugin using FileSaveAs. If either the width or height parameter is set to 0 then the corresponding document window dimension will be used, depending on the resolution setting (option3).


Color depth. Valid values with all file export plugins distributed with DPlot are 8 (256 color), 24 (16 million colors), or 32-bits (PNG only). The JPEG plugin will ignore this entry (JPEGS are always 24-bit). Likewise, GIF's are forced to 8-bits. If this option is omitted, DPlot will force it to the current bit depth of the display.

32-bit PNG images will be saved with an alpha channel, with the plot background color set to transparent. For this image format DPlot will temporarily turn off the system's "Smooth screen fonts" and/or ClearType settings when saving an image, and also temporarily turn off antialiasing.


A combination of:


For 8-bit BMP files, used to specify whether the file should be run-length encoded (=1) or uncompressed (=0).


For 8-bit images, specifies whether a better (though much slower) color quantization method should be used to convert the input 16-, 24-, or 32-bit image to 8-bit. The default color quantization method (=0) is very fast and works well for most images, but not well for background colors other than white. If your 8-bit images seem to be missing colors, use option2=2. NOTE: this flag is ignored for BMP files if the 1 bit is set; the BMP plugin contains a separate (and slower still) color quantization method for RLE bitmaps.


Resolution setting, in dots per inch (dpi). If a value less than 100 (including 0) is used then the saved image will essentially be a screenshot; the display's resolution is used. If greater than 100 then font sizes, line widths, the plot size and other dimensions will be scaled up by resolution/(100 dpi), so that the saved image will have the same proportions as the graph shown on your display. For best results with a resolution setting greater than 100, always specify the plot size with a Size command or the Extents/Intervals/Size menu command. Otherwise you risk generating an Insufficient memory error for high resolution settings.



Quality setting, 1-5. 1 produces the smallest files, though the worst quality. 5 produces a lossless image and a much larger file than the other settings. The default is 4 ("good").


If non-zero, the plot background color will be set to transparent. For this image format DPlot will temporarily turn off the system's "Smooth screen fonts" and/or ClearType settings when saving an image, and also temporarily turn off antialiasing.

NOTE: For images with many unique colors and/or antialiased lines and symbols and for 3D views of 3D/4D data in which one of the light source models is used, you will get better results saving the image as 24- rather than 8-bits (option1). If file size is paramount you can then use a dedicated image editor like Adobe Photoshop or Paint Shop Pro to reduce the color depth, with better results than you will get by saving to an 8-bit image in DPlot.


See also

Image Properties


Page url: