共用方式為


RasterExportColorReduction Property

Determines the color reduction that is applied to the exported image when you call the Export method of the Master, Page, Selection, or Shape object to export the specified object to a BMP, GIF, PNG, or TIFF file. Read/write.

Version Information

Version Added: Visio 2010

Syntax

expression .RasterExportColorReduction

expression An expression that returns an ApplicationSettings object.

Return Value

VisRasterExportColorReduction

Remarks

When you apply color reduction, you reduce the number of colors present in an image in order to make the resulting file smaller in size.

The value of the RasterExportColorReduction property can be one of the following VisRasterExportColorReduction constants.

Constant

Value

Description

visRasterAdaptive

0

Adaptive color reduction; the default for GIF files

visRasterDiffusion

1

Diffusion color reduction

visRasterHalftone

2

Halftone color reduction

For BMP, PNG, and TIFF files, the default is no color reduction.

For any given session of Microsoft Visio, when the RasterExportColorReduction property value is set, either programmatically or in the user interface, the setting then becomes the new default for the remainder of the session. However, it is not persisted to the next session.

The setting of the RasterExportColorReduction property corresponds to the Color reduction setting in the BMP Output Options, GIF Output Options, PNG Output Options, or TIFF Output Options dialog box. (Click the File tab, click Save As, in the Save as type list, select Windows Bitmap (*.bmp; *.dib), Graphics Interchange Format (*.gif), Portable Network Graphics (*.png), or Tag Image File Format (*.tif), and then click Save.)