Jump to content

File References in FMP7--should I use them?

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

Recommended Posts

I am redesigning a database from FMP6 which will handle > 10,000 images. Currently, I am storing a reference to the images as a text string, which I then use AppleScript to manipulate (eg, 'Tell application "Finder" to select file <<FMP field>>'). I am thinking of using file references in FMP7, since they seem designed to solve my problem, but I am afraid of finding out some bad consequences of this decision later and having to undo a lot of work. Some questions:

1) What are the rules for displaying a file reference? I tried making a reference to a large TIFF file and it appeared that FMP7 had to parse the entire tiff every time it showed the record in browse mode. A layout in list view with references to lots of big tiffs could be impossible to display.

2) What are the rules for accessing a file reference? Let's say I move a bunch of images from one folder to another, will it be straightforward to change the references to point to the new place? Can I do a search by filename, or will I have to store the file as a string anyway?

3) What is the best way to store thumbnails? Even if I decide to use strings to refer to the original images, I have the choice of storing the thumbnails as either an image (in a container field) or a file reference. If I have (eventually) 10,000 or more thumbnails of, say, 10K each, will scrolling etc be faster with 10,000 file references (putting the onus on the operating system) or 100MB of images (putting the work into FileMaker)?

4) Any other "gotchas" that can be foreseen?


Link to comment
Share on other sites

I've not done big files with big pictures, but I've done quite a bit of messing about with smaller ones.

1) I don't know that it would a big difference to display time whether you embedded the image or referenced it. I don't the exact process FileMaker and the operating system uses to display pictures, but it seems to me that basically a bigger picture (file size) takes a longer time to draw to the screen. For that reason you should never put big pictures in a list view by using "reduce" in FileMaker. Much better to use a separate thumbnail, which FileMaker can produce upon Folder import, or you can do your own.

2) The new capability in 7, which you don't specifically mention, is the ability to show an image just by using a "relative" file reference in a calculation. This is different from Importing or Inserting the image. It's just a calculation of its relative location to the current database file, with text result, using the special prefix "image:", result container.

If you're going to be moving the images around, that would seem to be the best method. You can go "up" a directory using the standard "./". I'm not sure how it works on a network, but I assume it functions somewhat like HTML references. Has anyone tried this?

This method allows you to store paths to images in fields and calculations. No Import or Insert needed (see 3 for thumbnail question). A "file:" reference allows you to open the original; shows as an icon (which doesn't seem to support transparency however?). Don't know how that would work on a network?

3) It seems to me that the most efficient method would be to embed thumnails into the file itself, and use the calculation method above to show the larger pictures, which would be on another shared machine (or drive). That would give you the best of both worlds. The thumbnails could be created during import along with the file names (just not the picture; I imagine you can do that).

Or just do both thumbnails and pictures as calculations. That would seem to be easiest, though, as you say, there are questions about whether it would be the fastest.

4) The main gotcha is of course that referenced images are not visible on a network, unless they are in a shared folder, which should be on another drive or machine than the database files.

Another gotcha is that changing the file names or paths is going to break connections (duh). Changes to the original image will be reflected, unless they are embedded. This shouldn't matter much to embedded thumbnails. I wouldn't embed TIFFs. I'm no graphics expert, but I know that: TIFFs are really big, and there are different types of TIFFs, esp. if they have some kind of built-in compression.

Link to comment
Share on other sites

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