Previous Document Next Document
Bitmap.ConvertTo

Sub ConvertTo(Mode As cdrImageType)

Member of Bitmap

The ConvertTo method changes the color mode of a bitmap.

Parameters
Description
Mode
Specifies the color mode to apply

The following code 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 2007 Corel Corporation. All rights reserved.