Previous Document Next Document

Object Model Reference : Classes : S : StructPaletteOptions : Properties : StructPaletteOptions.NumColors


StructPaletteOptions.NumColors

Property NumColors As Long

Description

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.)

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.