Brian Dunning's FileMaker Custom Functions

phpGetImageInfo ( theFilePath )

Return info about an image file

  Average rating: 4.5 (28 votes) Log in to vote

Mark DeNyse   Mark DeNyse - Show more from this author
Driftwood Interactive
http://DriftwoodInteractive.com

Share on Facebook Share on Twitter

  Sample input:
phpGetImageInfo("myimage.jpg")
  Sample output:
640
480
2
width="640" height="480"
image/jpeg
3
8

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Return 7 lines information about the given image file

[1] Width
[2] Height
[3] Image Type
[4] HTML width/height attributes string
[5] Mime type
[6] Num Channels (3 for RGB, 4 for CMYK)
[7] Bits (bits per color)

Example script usage:

Set Variable[$imageInfo, Value: phpGetImageInfo($theImageFilePath)]

Set Variable[$imageType, Value: GetValue($imageInfo, 3)]

Requires SmartPill PHP plug-in from Scodio

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth:

Under construction. Email me your wish list for improvements.