Jump to content

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

Recommended Posts

Posted

I'm at a loss as to why I'm getting "ERROR" when:

I have an image (JPG) 3648 x 5472 pixels at this location:

$crop_location = /Volumes/Macintosh HD/Applications/Wolf Spring/Wolf Spring Lightroom/Originals/Anderson_Austin_RB6649233682XA-O9330018750AV-crop.JPG

The file location is definitely correct.

This function:

CropImage( $crop_location ; 0 ; 300 ; 3648 ; 5172 )

Should simply crop 300 pixels off the top, right?

I get "ERROR"

Any ideas?

Posted

Without any more details I would surmise the original is not an RGB image, or has some other non-standard format..

Posted

Hi truelifeajf,

If you call SMLastError after you get "ERROR" then you will get a more detailed error. You could also get the error and the entire stack trace from the plugin logs. See this page for log locations. Do a search for "Severe" and the error should be at the bottom of the file. Post the error here with the entire stack trace and it will be easier to diagnose what is going on.

Posted

Ah ok... the log says:

java.lang.OutOfMemoryError: Java heap space

There's more information after that but I'm guessing that may not be relevant right now. Image too large? Increase FM Memory allocation?

Posted

I tried on a smaller file and it "worked", this time this:

$result = CropImage( $crop_location ; 0 ; 0 ; 10 ; 10 )

$result is "image.jpg". Why does it show "image.jpg" as a result?

Posted (edited)

Are you setting a container field to that result?? Win/ Mac?

Again, guessing is a slow method to help out.

Can you post that part of your script?

Edited by john renfrew
Posted
18 hours ago, truelifeajf said:

Ah ok... the log says:

java.lang.OutOfMemoryError: Java heap space

There's more information after that but I'm guessing that may not be relevant right now. Image too large? Increase FM Memory allocation?

Our plugins have 96MB of heap space memory by default so if you are doing something that involves larger files, it easy to run out of memory. Follow the link that David Wilkström posted and then restart FileMaker. If the memory file worked you should be able to look in logs and at around line 9 there should be a statement that says "found custom memory file -Xmx512m".

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