Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4150 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am trying to to create a simple rotate image script, so that after using my webcam to grab an image, I have the option to go vertical. What are the steps to create this script using the Rotate Image module? Thanks.

Posted

You will first need to register the function at some point (usually in a startup script) and then call the actual function in your rotation script.

Basic instructions for how to register a function can be found in the 1-2-3 Go section on the home page of the scriptmaster.fp7 file. Once registered, the function is best called in a setVariable script step (for example: $rotate = Rotate Image(picturelocation; degrees; {background})), though it has the potential to be called anywhere you can enter a calculation in FileMaker, such as a set field script step or a Calculation field calculation.

  • Newbies
Posted

Thanks for the reply, David. I had already registered the function and have already successfully been using the QuicktimeFrameCapture module (works great, BTW).

I have made a simple script as:

Set Variable[$rotate; Value:RotateImage( Asset Management::Picture ; 90 ; 0 )]

but nothing happens. What am I missing? Thx.

Also, assuming I want no background, is 0 the correct value?

Posted

The rotated image will be stored in the $rotate variable. If something goes wrong, the $rotate variable will contain the word "ERROR". You can use SMLastError for a detailed error description in this case.

I'd recommend using a hex color (#336699) for the background color, or just leave it as empty quotes.

  • Newbies
Posted

Still getting ERRORS

Here is my script:

Set Error Capture [On]

Set Variable [$rotate; Value;RotateImage( AssetManagement::Picture ; 90 ; "" ]

Set Field [Asset Management::Picture; $rotate]

Error Details (From SMLastError)B)

[color:red][color:red]

java.net.MalformedURLException: no protocol: image.jpg

Parameters:

{}

Posted

What's your image field? There's not currently a good way to pass container fields into ScriptMaster, so you need to use a URL as the first parameter. This can be a file url or http url.

  • Newbies
Posted

Being that the image is already in the container field, having been brought in with QuickTime Frame Capture, I am not sure. If I understand your last post, it sounds as though I cannot rotate the image once it is in the container field (in this case, Asset Management::Picture)?

  • 2 weeks later...
Posted

You will need to export the image from the container and then reference that exported image as a "file:///" url to be rotated and inserted back in using scriptmaster. You cannot rotate an image directly from a container field. Take a look at the export field contents script step to export the container.

  • 2 years later...
Posted

Please, CAn you explain me exactly the syntax to refer a file in "c:tempimage.jpg" ?????

I try this Imagerotate ( "filewin:/c:/temp/image.jpg ; "" ; "" ) but it doesn't work

it says ERROR.

  • 2 weeks later...
Posted

I'm sorry..... Today I've done some tests, and it's ran correctly :yep: ... Maybe it was a bad image....

Another question: How can I reduce the size of the image I put in a container field ??? Thanks a lot.

  • 1 year later...

This topic is 4150 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.