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

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

Recommended Posts

  • Newbies
Posted

Hi I volunteer for a not for profit organiasation. They use macs and iphoto to record the work of young people. They need a multi user photo library and I am looking at creating one in filemaker.

However importing needs to be snag free and simple, as the people concerned are used to iphotos import functionality. I have hit a brick wall when importing.

I can get them into filemaker ok, but cannot get portrait photos always show in landscape. I do not want to use the select photos option I want to creat some form of auto rotate or a script to rotate once the picture is in filemaker.

I am importing images from folders or digital cameras. Is there any way I can

1) AUTO ROTATE the image in the import process.

2) Rotate the image once it is in the database (or refered to by the database depending upon import options)

any thought suggestion suitable plugins greatly appreciated,

Many thanks

Simon

Posted

I can think of a couple ways to do this. My personal preference is always "free," so I'll give that option first. It may be the most geeky, but there are examples, some from Apple. That would be AppleScript, run via FileMaker's Perform AppleScript script step.

There are two methods to do simple things to picture files. One is the background application (which every Mac has) named "Image Events." The other is a command-line tool, sipps. Both of them do much the same thing, with the same options (sipps can do a few other things more I think).

But you'd mostly just want rotate. This is an example from Apple, modified by me, to point out that the script as is will overwrite the original file. Or, use the line I added (below the save) to specify another file. But it's likely you'd want to rotate the original.

(*

The rotate command takes a positive integer as the value for the to angle parameter.

To convert a negative rotation angle, such as -90 to a positive value, add 360: -90 + 360 = 270

*)

-- WARNING - WILL OVERWRITE THE ORIGINAL FILE, unless you use:

-- save this_image in file filepath.ext fej

set this_file to choose file without invisibles

try

tell application "Image Events"

launch

-- open the image file

set this_image to open this_file

-- perform action

rotate this_image to angle 270

-- save the changes

save this_image with icon

-- save this_image in file "filepath.ext"

-- purge the open image data

close this_image

end tell

on error error_message

display dialog error_message

end try

Posted

Actually, that's just the middle part of the process. The 1st part of the process is to either: 1. Know where the file is (the referenced file path, if any), or, 2. If the file is embedded, Export Field Contents to a file, use the AppleScript to rotate the image in the file, then re-embed it in FileMaker.

No matter what tool or process you use, you first need to know whether the pictures showing in the containers are referenced or embedded; you can use Length (container field) for that; referenced is 0.

There are also plug-ins. Such as InsideScan, which works fairly well, though I am not entirely confident of the long-term life of this plug-in (it is rarely updated). It has a simple rotate command, which works on the container field; so would need to be written out to a file (which it has a command for).

  • 5 weeks later...
  • Newbies
Posted

Fenton thank you very much for these two posts, sorry not been back to you sooner.

Will be trying this out later tonight will let you know

  • Newbies
Posted

It Works !!

Thanks Fenton for introducing me to the world of apple script, didnt realise how powerful link into the os it was. However great site at

http://www.macosxautomation.com/applescript/imageevents/index.html

Great tutorial for newbies in there, also more information on the image events program.

Once i had the applescript worked out I still needed a bit of fmp script to extract the osx file path and convert this into the class objects used in applescript. As i have never done any text parsing before this took quite a time as I want to be able to have some flexibility in where the files go. It took a surprising ammount of time but its done now.

I was hoping to paste the script in here but FMP only seems to paste into itself. If anyone knows of a way to do this let me know and Ill put the script up if anyone is interested.

Posted

Apple nice...

any help for the PC users

getting images in or 3rd party tools ?

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