PictureFormat.ColorsInPalette Property
Publisher Developer Reference |
Returns a Long that represents the number of colors in the picture's palette. Read-only.
Syntax
expression.ColorsInPalette
expression A variable that represents a PictureFormat object.
Return Value
Long
Remarks
This property applies only to pictures that are not TrueColor (that is, pictures that contain color data of less than 24 bits per channel). Returns "Permission Denied" for shapes representing pictures that are TrueColor.
Use the IsTrueColor property of the PictureFormat object to determine whether a picture contains color data of 24 bits per channel or greater.
Example
The following example tests each picture in the active document and prints whether the picture is TrueColor. If the picture is not TrueColor, the example prints how many colors are in the picture's palette.
Visual Basic for Applications |
---|
|
See Also