Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to get image size? finding duplicate photos?

Featured Replies

Is there any way in native FM9 to get the size of an image in a container field?

or more to the point...

I would like to be able to find all photos that are duplicates. Is there any way to do that without using a plugin to first determine the size of the photo?

BTW... my photos were pasted into the database. So creating a calc field of the photo with text as the result doesn't return the image dimensions (as I've seen suggested in other posts).

Thanks. John

So creating a calc field of the photo with text as the result doesn't return the image dimensions (as I've seen suggested in other posts).

With this function?:)

http://www.filemaker.com/help/FunctionsRef-351.html

--sd

If the picture is embedded, there is no way to get it's dimensions other than to export it, insert it to (another?) container field as reference only, and get the data from there.

It's hard to see how dimensions can determine if the image is a duplicate or not. Lots of images come in one of several standard sizes, e.g. 640x480 (VGA). Getting the embedded file's size in bytes through Length (Container) might be more helpful - though still not guaranteed to be unique.

  • Author

Yes. When I set my calc to 'GetAsText(picture)' and set the result type to 'text', I simply get a '?' as the result. I believe this is because the photos were all pasted into the database.

I just want a function that will tell me the total size in bytes of a container field. Seems like that should be built in.

John

  • Author

Thanks comment!! That's exactly what I needed.

Length(container)

does the trick. It returns the size in bytes which I can then sort by to pair up likely duplicates. Because the images are all different sizes (pasted off the web) the size is actually a good indicator of which may be duplicates.

John

"May" is the operative word here. Because of the way compression works, it's unlikely you'll get exactly the same file size with two different images - but it IS possible. Of course, it's also possible to have two visually identical images with different file sizes, so...

Bummer, Length( it is of course! But to turn an image into something which can be indexed and seached upon - couldn't this be used?:)

http://mbs.geistinteractive.com/reference?view=function&id=115

With an improved guarantee to get rid of dupes? Exif data could be another valuable source for filemaker to poke into to get the correct dsitinction.

--df

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.