OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   How do you switch Bitmap modes in CorelDraw 10 VBA? (http://forum.oberonplace.com/showthread.php?t=147)

Rick Randall 13-05-2003 08:45

How do you switch Bitmap modes in CorelDraw 10 VBA?
 
I have a macro for CorelDraw 11 but I need it to work in Corel 10 also. This part of the macro won't work in version 10:

Code:

Private Function GreyAllBMPS()

Dim bmp As Bitmap
Dim sh As Shape


For Each sh In ActiveDocument.ActivePage.Shapes
If sh.Type = cdrBitmapShape Then

    If sh.Bitmap.Mode <> cdrGrayscaleImage Then
        sh.Bitmap.ConvertTo cdrGrayscaleImage
    End If
           
End If

Next sh

End Function


Does anyone know how to do the same thing for CorelDraw 10?

bbolte 14-05-2003 09:06

from the help files:


Code:

Shape.ConvertToBitmap

Function ConvertToBitmap(ByVal BitDepth AS Long, ByVal Grayscale AS Boolean, ByVal Dithered AS Boolean, ByVal TransparentBG AS Boolean, ByVal Resolution AS Long, ByVal AntiAliasing AS cdrAntiAliasingType, ByVal UseColorProfile AS Boolean) AS Shape
Shape

Description
The ConvertToBitmap method converts a shape object from a vector image to a bitmap image in CorelDRAW. A shape is an object that can be displayed as several variations of a rectangle or a circle.
A bitmap is an image composed of grids of pixels or dots. Scanners and paint applications such as Corel PHOTO-PAINT generate bitmap images. CorelDRAW creates images using vector objects.
Bitmaps have a fixed resolution so a bitmap looks best when you display or print it at its original size. Enlarging the bitmap appears to enlarge each pixel because extra pixels are added, making the graphic look jagged and distorted. Reducing the size of the bitmap eliminates pixels and shrinks the bitmap.



Parameters        Description

BitDepth        Lets you specify bit depth. This value is optional and the default value is 24.
Grayscale        Set to TRUE (-1) converts to grayscale. This value is optional and the default value is False.
Dithered        Set to TRUE (-1) enables dithering. This value is optional and the default value is True.
TransparentBG        Set to TRUE (-1) enables transparent background. This value is optional and the default value is True.
Resolution        Lets you specify the resolution. This value is optional and the default value is 72.

AntiAliasing        Lets you specify the anti aliasing type.This value is optional and returns cdrAntiAliasingType. The default value is cdrNormalAntiAliasing.
UseColorProfile        Set to TRUE (-1) use the color profile. This value is optional and the default value is True.



All times are GMT -5. The time now is 05:10.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com