Newbies hideout Posted December 14, 2009 Newbies Posted December 14, 2009 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.
Smef Posted December 14, 2009 Posted December 14, 2009 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 hideout Posted December 14, 2009 Author Newbies Posted December 14, 2009 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?
shmert Posted December 15, 2009 Posted December 15, 2009 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 hideout Posted December 15, 2009 Author Newbies Posted December 15, 2009 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) [color:red][color:red] java.net.MalformedURLException: no protocol: image.jpg Parameters: {}
shmert Posted December 15, 2009 Posted December 15, 2009 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 hideout Posted December 15, 2009 Author Newbies Posted December 15, 2009 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)?
Tanner Posted December 29, 2009 Posted December 29, 2009 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.
jsubiros Posted January 12, 2012 Posted January 12, 2012 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.
wbasham Posted January 12, 2012 Posted January 12, 2012 You should use a file URI. On Windows this should be something like More information on file URI schemes can be found here. file:///c:/path/to/the%20file.txt
jsubiros Posted January 12, 2012 Posted January 12, 2012 I've used this one: "file:///c:/temp/image.jpg" and it says this error: java.lang.outofmemoryerror: java.heap.space Any help please ???
wbasham Posted January 12, 2012 Posted January 12, 2012 Can you provide the image to me at [email protected]? Also, if you can send us a bug report as well?
jsubiros Posted January 24, 2012 Posted January 24, 2012 I'm sorry..... Today I've done some tests, and it's ran correctly ... 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.
Newbies bestimage Posted July 26, 2013 Newbies Posted July 26, 2013 i was wondering which programming language do you want. vb.net or c#. i have some vb scripts on how to rotate images. it rotate images to any angles you desire.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now