![]() |
#1
|
|||
|
|||
![]()
Alex,
I decided to start a new topic for my ImageBCI related problems since it didn't have anything to do with assigning a macro to a button. I downloaded your converter program and tried it on a Photo-Paint 7 script and the converter program ran ok. One thing, when I tested to see if I had the Rich Text I didn't get a yellow box, however the .cab file was in my Windows XP system. Unfortunately, I could not see any effect on the image I was trying to adjust when I tried the program in Photo-Paint 11 TRIAL. I have stripped down the program and attached the code. Perhaps you might see what I am doing incorrectly. Also, if it is not a secret, how in the world did you ever figure out what parameters, etc. to use for your converter program. In my 25+ years of working with Mainframe computers and PCs, I have never encountered such awful (erroneous and incomplete) documentation as that supplied with Photo-Paint 10 and 11 automation. It is also has more bugs than any software product I've ever used. Saturated with "Description goes here" and no description and "Example of usage goes here" with no example, and Descriptions of Parameters with no description. I've worked with beta versions of programs that were far better than Photo-Paint 10 and 11 automation. I had trouble adding the Code Sample attachment (it didn't like the .bas extension of the exported program) so I used copy and paste here: 'Option Explicit Sub TESTBME() Dim IBCIBRGT As Long ' Image Brightness adjustment IBCIBRGT = -80 ' (-100 to 100) Dim IBCICONT As Long ' Image Contrast adjustment IBCICONT = 5 ' (-100 to 100) Dim IBCIINT As Long ' Image Intensity adjustment IBCIINT = -4 ' (-100 to 100) Dim IMGFSPEC As String ' Image filespec IMGFSPEC = "G:\WINDOWS\WEB\WALLPAPER\Stonehenge.jpg" CorelScript.FileOpen IMGFSPEC, 0, 0, 0, 0, 0, 1, 1 ' Open image MsgBox ("Image before modification") 'CorelScript.ImageBCI IBCIBRGT, IBCICONT, IBCIINT ' No effect on image 'xxce$ = "Brightness-Contrast-Intensity": zq1$ = "": zq2$ = "": zq3$ = "": zq4$ = "":xxep$ = "BCIEffect BCIBrightness=" & .Brightness = IBCIBRGT & ",BCIContrast=" & .Contrast = IBCICONT & ",BCIIntensity=" & .Intensity = IBCIINT & "" xxce$ = "Brightness-Contrast-Intensity": zq1$ = "": zq2$ = "": zq3$ = "": zq4$ = "": xxep$ = "BCIEffect BCIBrightness=" & IBCIBRGT & ",BCIContrast=" & IBCICONT & ",BCIIntensity=" & IBCIINT & "" CorelScript.BitmapEffect xxce$, xxep$ & zq1$ & zq2$ & zq3$ & zq4$ MsgBox ("After ImageBCI") CorelScript.BitmapEffect "Color Tone", "ColorToneEffect HSLHue=:0:0:0:0:0:0:0:1668178284,HSLSaturation=:0:0:0:0:0:0:0:0,HSLLightness=:0:0:0:0:0:0:0:-2147483648,BCIBrightness=" & IBCIBRGT & ",BCIContrast=" & IBCICONT & ",BCIIntensity=" & IBCIINT & ",ColorToneStep=10" MsgBox ("After ColorTone") CorelScript.FileClose End Sub Thank You, Carl E. Johnson |
#2
|
||||
|
||||
![]()
I believe that when you run the commands under PP 11 you will need to change the effect names slightly, so instead of calling
CorelScript.BitmapEffect "Color Tone", "ColorToneEffect SomeParameters" you need to do this: CorelScript.BitmapEffect "Color Tone", "ColorToneEffect.V11 SomeParameter" The best way to figure out the parameters to be used with bitmap effects, just record a script using Recorder docker, then save it to CSC file and see what is generated... That was the way I did it when I created the converter... I hope this helps. |
#3
|
|||
|
|||
![]()
Alex,
I really appreciate the assistance you gave me in getting my problem solved. I have been trying for over 2 weeks to get ImageBCI or a similar method to work. The code from your converter program worked fine in Photo-Paint 10 without any changes. Using the Recorder to "try it and see" was a great idea. I was so frustrated I never even thought to use the recorder and see what commands were generated and then use them in VBA. When I saw your mention of "V11" in your reply I decided to try the recorder in PP11 and "see for myself". It had been so long since I've used the recorder I forgot where it was "hidden". I brought up the PP11 HELP and even though I maximized the Find List, searching on RECORD, SCRIPT, or MACRO brought up NO reference to the recorder. I started PP10 and saw it was in the Window/Dockers. Another downgrade of the documentation in PP11. Also in PP11, in the Tools/Options windows there is no longer the little box with a question mark in the upper right-hand corner that you can click and get a question mark you can drag to the item you want information about. Another inconvenience provided by PP11 is that all of the "easy" links to Help for the CorelScript Class when you are in the VBA Editor or Object Browser have been broken. If you are in the VBA editor and put the cursor to the left of FileOpen and then press F1 in PP11 you get VBA help instead of help for FileOpen as was the case for PP10. If you are in the Object Browser in the CorelScript Class, select Member FileOpen, and then press F1 you get a pop-up informing you thet no help is available. In PP10 you got help for FileOpen. To get help from the PP11 Object Browser you have to select the CorelScript Class and press F1. Then you have to select methods and select FileOpen from all the methods that are listed (hardy worth the effort because most of the CorelScript Class help is essentially useless). Strangely, this downgrade only effects the CorelScript Class and not CorelScriptFile and CorelScriptTools. I don't understand why Corel keeps making changes like having to put "V11" on functions that didn't require it before and why they shipped a product that needs so much work. Can't PP determine what version is being used and operate accordingly? If the mainframe software over the past 30+ years had been making these kinds of undocumented changes we would still be using punched-cards. I will definitly NOT be upgrading to PP11 or any other release until the automation problems and documentation have been corrected, and I'll have to see it with my own eyes (either from a Trail or on someone elses computer) before I'll believe it. I thought about going back to using Corel Script in Photo-Paint 7, but I have a VBA program that uses a modeless User Form so I'm stuck at PP10 for now. However, just in case, I have PP7 installed on this computer and it is also on my backup tapes that get periodically rotated to my bank safe deposit box. Thank you again for all your help and I hope I can return the favor to someone in the future. Sorry about my diatribe, but you can see my frustration level with PP10 and PP11. Sincerely, Carl E. Johnson |
![]() |
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 |
Corel Photo Paint 11 Document Events problem | cyrilgupta | Corel Photo-Paint VBA | 1 | 07-11-2004 12:51 |
color profile problem in Photo Paint 9 | flip | Corel Photo-Paint VBA | 2 | 11-07-2003 03:55 |
Open - Resize - Savefile in Photo Paint | greenee | Corel Photo-Paint VBA | 2 | 28-06-2003 03:54 |