Object Model Reference : Classes : S : StructPaletteOptions : Properties : StructPaletteOptions.NumColors |
Property NumColors As Long
Member of StructPaletteOptions
The NumColors property specifies the maximum number of colors that can be added to the image palette. (The actual number of colors may be less than the specified number.)
The following VBA example exports the image using a 16-color optimized palette:
Sub Test() |
Dim pal As New StructPaletteOptions |
Dim flt As ExportFilter |
pal.NumColors = 16 |
pal.PaletteType = cdrPaletteOptimized |
Set flt = ActiveDocument.ExportBitmap("C:\Temp\img.gif", cdrGIF, , cdrPalettedImage, PaletteOptions:=pal) |
flt.Finish |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.