![]() |
#1
|
|||
|
|||
![]()
CorelDrawX3
There is a way to change the color model of all the bitmap in a document, with a script or a different way? I prepare the page with cmyk bitmap anyone on is powerclip, sometime I need to export in gray PDF and the conversion in grayscale is very bad. So I have to convert manually all the bitmap mode to grayscale using the icc profile and then export to pdf. I try to use the 'find' tool (find all bitmap) but this does not search inside the Powerclip. Any Idea? Thanks, Xenio |
#2
|
|||
|
|||
![]()
At least, I did it by myself, I am not a coder, but with some cut and paste some trial and error here it is the macro:
Change all the bitmap mode to grayscale (PowerClipped bitmaps too). Any better code are welcome. Thanks, Xenio Code:
Sub ChangeMode() Dim s As Shape, sp As Shape Dim pwc As PowerClip Dim ChangeCountPowerClip As Integer Dim ChangeCount As Integer ChangeCountPowerClip = 0 ChangeCount = 0 For Each s In ActiveDocument.ActivePage.Shapes Set pwc = Nothing Set pwc = s.PowerClip If Not pwc Is Nothing Then For Each sp In pwc.Shapes If sp.Type = cdrBitmapShape Then If sp.Bitmap.Mode <> cdrGrayscaleImage Then sp.Bitmap.ConvertTo cdrGrayscaleImage ChangeCountPowerClip = ChangeCountPowerClip + 1 End If End If Next sp End If If s.Type = cdrBitmapShape Then If s.Bitmap.Mode <> cdrGrayscaleImage Then s.Bitmap.ConvertTo cdrGrayscaleImage ChangeCount = ChangeCount + 1 End If End If Next s MsgBox ChangeCount & " Bitmap and " & ChangeCountPowerClip & " inside PowerClip" End Sub |
#3
|
|||
|
|||
![]()
make a subroutine & call it from main
I think it is more effective cause your code may not convert images in nested powerclips & my codes can Code:
Private Sub DoReplaceOnShapes(ss As Shapes) Dim s As Shape For Each s In ss Select Case s.Type Case cdrBitmapShape If s.Bitmap.Mode = cdrRGBColorImage Or cdrDuotoneImage Or cdrLABImage Or cdrPalettedImage Or cdr16ColorsImage Or cdrBlackAndWhiteImage Then s.Bitmap.ConvertTo cdrCMYKColorImage End If End Select On Error Resume Next If Not s.PowerClip Is Nothing Then DoReplaceOnShapes s.PowerClip.Shapes Next s End Sub amit |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clipping Path in bitmap with X3 | xenio | General | 3 | 06-07-2006 21:01 |
Apply Envelope to bitmap | RonHill | General | 2 | 19-06-2006 21:14 |
[BUG] - Rotatted Bitmap doing bad. | Kursad | General | 7 | 19-07-2005 11:49 |
Bitmap names in Corel 12... | meandirtyjoe | CorelDRAW/Corel DESIGNER VBA | 1 | 17-05-2005 09:14 |
replacing duotone bitmap | please_reboot | CorelDRAW/Corel DESIGNER VBA | 4 | 18-04-2004 22:30 |