Link to home
Start Free TrialLog in
Avatar of jroquet111
jroquet111

asked on

capturing image metadata in filemaker pro

I want to capture file size of an image when I import it, e.g. width: 400px , height: 800 px
Any thoughts?
Avatar of Member_2_908359
Member_2_908359
Flag of France image

that's built in, just get the image field as a text, or use a calc field.
$metadata = getastext(imagefield)
or
metadata field (calc or auto-entered text type) = image field (container)
you will get 3 lines of text or less, depending on the file format.
ASKER CERTIFIED SOLUTION
Avatar of jroquet111
jroquet111

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
what I indicated works on any platform but returns several lines; so you have to strip these lines to find X and Y data.
the function you are using will return the layout object size, not the image size itself
Avatar of jroquet111
jroquet111

ASKER

lesouef,
Thanks again for the response.
2nd point first: Yes, you hit the nail on the head. I only got the container size, not the photo size. So what I thought was a solution was a false solution.
1st point: GetAsText still returns just the file path and no metadata.
Here is what i think is going on with images. I kept Googling for solutions and found plug-ins that acted thru applescript. One person pointed out that when you import directly from a camera the metadata appears (and if the that camera model  is supported.) but once it is processed through another program the exif data somehow disappears.
Here is the solution I think I have found --
I have cobbled a php file which reads the available exif data that will allow me to access the photos outside of Filemaker. Now, by evoking that php file through the Web Viewer in Filemaker, capturing the text, parsing the captured text, placing the width and height metadata in a height and a width field I get what I want. I can create a list of files for say, a given date, which is how photos are sorted in my app.

I have each component working at this point. I need to write a seamless and invisible (to the user) script, placing the web viewer off the screen and voila it will loop and gather all the correct dimensions in each record when I import a set of photos to Filemaker.
Once I get the thing to work flawlessly, I'll post the php code and Filemaker solution.

Thanks again for staying on top of this.
Regards -- Jake
if you only get the image path, it probably depends on how you imported it. I am sure I got more, but I could not locate the test file I once used to check this.
Do you insert file, or insert picture? and what format? jpg?
or was it using the batch import? I'll let you know if I can grab that file, because your solution may work, but it is a bit like a missile to kill a fly.
You get more data when importing from a folder (a complete batch of images); if you insert them one by one, you just get the filename.
Bur I remember getting the exif data too, I still to locate in which circumstances.