Christensen Design Posted June 21, 2008 Posted June 21, 2008 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
Søren Dyhr Posted June 21, 2008 Posted June 21, 2008 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
comment Posted June 21, 2008 Posted June 21, 2008 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.
Christensen Design Posted June 21, 2008 Author Posted June 21, 2008 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
Christensen Design Posted June 21, 2008 Author Posted June 21, 2008 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
comment Posted June 21, 2008 Posted June 21, 2008 "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...
Søren Dyhr Posted June 22, 2008 Posted June 22, 2008 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now