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?
FileMaker Pro

Avatar of undefined
Last Comment
lesouef

8/22/2022 - Mon
lesouef

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
jroquet111

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
lesouef

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
ASKER
jroquet111

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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
lesouef

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.
lesouef

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.