I am trying to record a script that will resize pictures of varying sizes to a particular dimension, in this case, 1920 pixels wide. Any ideas how I can do this?
If I use "resample" to resize a photo to the desired size, and record that action as a script, the resulting script will only work on other images that are the identical size of the image I used when recording the script. How can I write a script that will resize images to the same width, regardless of their original size?
I cannot explain it -- but also I tried copying what I posted here and saving it as a script and I get the error message as well. It shouldn't make any difference, it's just a simple text file. It used to be (X6 and earlier) that a .bmp file was saved along with the script file, but X7 doesn't do that. I am wondering if there is something else going on under the hood that we don't see.
To create my script....What I did was record a script in PPX7 and opened it in Notepad. I made my changes to the code and then just saved over the original. It works fine when I use that script.
I have attached my original .csc, so if you want, you can try it to see if it will work for you.
Finally figured out how to attach/add the .csc file. I changed its extension to .txt, so you will need to change it back to .csc. The only other thing I can think of would be for you to record/open one of your own scripts, save as with a new name, replacing the script code with what I gave here. It should not be this much trouble to share a script, wish Tony Severenuk (or someone who knows) would throw in some thoughts here.
BTW...it's crazy that this forum won't allow Corel .csc scripts!
Patti
WITHOBJECT "CorelPHOTOPAINT.Automation.17" h& = .GetDocumentHeight() w& = .GetDocumentWidth() IF h > w THEN p# = 250 / h w = w * p .ImageResample w, 250, 72, 72, TRUE ELSE p# = 250 / w h = h * p .ImageResample 250, h, 72, 72, TRUE END IF END WITHOBJECT
Mek said:Tools-Macro-Run Macro-Macros in and then select FileConverter.
FileConverter doesn't appear.
Sorry, Ihave overlooked that it's regarding to PhotoPaint and not Draw