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

Under construction. Email me your wish list for improvements.