Jump to content

Rotate Image


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

Recommended Posts

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.

Link to comment
Share on other sites

  • Newbies

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Newbies

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:

{}

Link to comment
Share on other sites

  • Newbies

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)?

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 years later...
  • 2 weeks later...
  • 1 year later...

This topic is 3949 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.