OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 13-05-2003, 08:45
Rick Randall
Posts: n/a
Default 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:

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?
Reply With Quote
Old 14-05-2003, 09:06
Posts: n/a

from the help files:


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

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.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CorelDraw 10 DXF export relative coordinates - VBA solution? asb617 CorelDRAW/Corel DESIGNER VBA 2 01-04-2010 02:34
How can I extract a piece of a bitmap object using VBA code oswaldon Corel Photo-Paint VBA 2 25-04-2004 19:37
Accesing CorelDraw 10 VBA Object Model without running it dolmos CorelDRAW/Corel DESIGNER VBA 5 19-12-2003 07:52
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35
CorelDraw 11 VBA DOM? sdickson CorelDRAW/Corel DESIGNER VBA 2 03-12-2002 15:05

All times are GMT -5. The time now is 22:45.

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