OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23-04-2008, 09:50
kliv
Guest
 
Posts: n/a
Default Channel mixer bitmap effect bug?

I am using X3 and I want a macro to:
1. convert the selection to a CMYK bitmap
2. export the cyan and the yellow from that bitmap.

I made the bitmap, but the macro just won't work as is supposed to do - it makes the same result (in my case it makes the yellow exactly like cyan. I cheked it with step throu and it is obvious that the channel mixer won't work 2 times in a run.
Any ideas on a workaround?
This is my code:

Code:
Sub twocolors_C_Y()
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    Dim s1 As Shape
    Set s1 = OrigSelection.ConvertToBitmapEx(cdrCMYKColorImage, False, False, 150, cdrNormalAntiAliasing, True, True, 95)
    Dim scyan As Shape
    Set scyan = s1.Duplicate()
    scyan.Bitmap.ApplyBitmapEffect "Channel Mixer", "ChannelMixerEffect InputColourModel=3,OutputChannel=3,PreviewOutputOnly=0,Level1=0|0|0|100,Level2=0|0|0|0,Level3=0|0|0|0,Level4=0|0|0|0"
    scyan.OrderToFront
    scyan.AddToSelection
    
            With ActiveDocument.ExportBitmap( _
            "c:\_C_.jpg", _
            cdrJPEG, cdrSelection, cdrGrayscaleImage, , , 72, 72, cdrSupersampling, , , UseColorProfile:=True)
         
         .Compression = 20: .Optimized = True: .SubFormat = 0: .Smoothing = 3

         .Finish
      End With
    scyan.Delete
    Dim syell As Shape
    
    Set syell = s1.ConvertToBitmapEx(cdrCMYKColorImage, False, False, 150, cdrNormalAntiAliasing, True, True, 95)
    syell.Bitmap.ApplyBitmapEffect "Channel Mixer", "ChannelMixerEffect InputColourModel=3,OutputChannel=3,PreviewOutputOnly=0,Level1=0|0|0|0,Level2=0|0|0|0,Level3=0|50|0|100,Level4=0|0|0|0"
    syell.OrderToFront
    syell.AddToSelection
          With ActiveDocument.ExportBitmap( _
            "c:\_Y_.jpg", _
            cdrJPEG, cdrSelection, cdrGrayscaleImage, , , 72, 72, cdrSupersampling, , , UseColorProfile:=True)
        
         .Compression = 20: .Optimized = True: .SubFormat = 0: .Smoothing = 3

        .Finish
      End With
    syell.Delete
       
End Sub
Of course there's a good explanation why I need this... anybody curious I will elaborate...
Reply With Quote
  #2  
Old 23-04-2008, 15:34
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

this is a very annoying bug, quite an old one
no workaround except for using 3rd party dll plugins for bitmap effects
Reply With Quote
Reply


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
Replacing bitmap color mode xenio CorelDRAW/Corel DESIGNER VBA 2 29-04-2007 03:12
Help with script - cropping bitmap wangor Macros/Add-ons 2 19-08-2006 19:20
Clipping Path in bitmap with X3 xenio General 3 06-07-2006 21:01
Alpha channel question - Drag and drop annedeblois General 3 11-01-2006 14:10
[BUG] - Rotatted Bitmap doing bad. Kursad General 7 19-07-2005 11:49


All times are GMT -5. The time now is 23:12.


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