OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > Corel PHOTO-PAINT > General

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24-02-2012, 03:47
optimpex
Guest
 
Posts: n/a
Default How to call "ImageGamma()" in vba Corel PP ?

I need to modify gamma for a tif file opened with corel PP !
Thank you for anyone send me an solution , maybe an example .
Reply With Quote
  #2  
Old 24-02-2012, 17:25
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Gamma

Here is an example of Gamma in VBA:
Code:
Sub AdjustGamma()
    Dim cs As Object
    
    Set cs = Application.CorelScript
    cs.BitmapEffect "Gamma", "GammaEffect Gamma_Level = 600"
End Sub
Hope that helps,

-Shelby
Reply With Quote
  #3  
Old 29-02-2012, 10:42
optimpex
Guest
 
Posts: n/a
Default one solution

Your initial syntax is correct in vb script.
I still don’t have the way to ImageGamma() in classic vba modules

But I find a mixed solution

I made 4 scriptfile(*.csc) with suggested gamma command in script.
(Ex. BitmapEffect “Gamma”,”GammaEffect Gamma_Level=88” )
Whith this way I don’ t modify the script any time I call the routine for different gamma value .
I’ve tried other way to call the script for different gamma value but it don’t work.

This is working :

some action
Active_doc = Application.OPEN ………….
gm = 88 ‘ example for gamma 0.88
With CorelScript
OpenCorelScriptFile("C:\folder\gamma" & gm & ".csc").Play
End With
other action

it work ,
but is limited by the number of scriptfile that you need to make
(one file for one gamma value)
Reply With Quote
  #4  
Old 29-02-2012, 13:04
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Gamma

You should not need to call the .csc files, just use them to check the syntax then use the example I provided to use CorelSCRIPT via VBA.

-Shelby
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
"error" in Corel Script file johndankey Corel Photo-Paint VBA 1 18-11-2008 18:42
Move objects to selected layer (either "a" or "b") 6fazer CorelDRAW/Corel DESIGNER VBA 3 07-03-2007 20:10
C# and CustomCommand("Boundary", "CreateBoundary") Sasha CorelDRAW/Corel DESIGNER VBA 7 15-01-2007 11:32
4DR Alex:) turn on/off "Snap to objects" & "snap location marks" from VBA wOxxOm CorelDRAW/Corel DESIGNER VBA 1 14-06-2005 13:12
Corel Script "user32.dll" SetWindowPos richard_austria CorelDRAW CS 0 02-06-2005 08:45


All times are GMT -5. The time now is 19:50.


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