Previous Document Next Document

Object Model Reference : Classes : B : Bitmap : Methods : Bitmap.ConvertTo


Bitmap.ConvertTo

Sub ConvertTo(Mode As cdrImageType)

Description

Member of Bitmap

The ConvertTo method changes the color mode of a bitmap.

Parameter
Description
Mode
Specifies the color mode to apply

VBA example

The following VBA example converts all bitmaps on the active page to the RGB color mode.

Sub Test()
 Dim s As Shape
 For Each s In ActivePage.Shapes
  If s.Type = cdrBitmapShape Then
   If s.Bitmap.Mode <> cdrRGBColorImage Then
    s.Bitmap.ConvertTo cdrRGBColorImage
   End If
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.