ZenphotoCMS Forum
PHP Call to Retrieve image type: .jpg, .png, so on - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: PHP Call to Retrieve image type: .jpg, .png, so on (/thread-8163.html)



PHP Call to Retrieve image type: .jpg, .png, so on - Celcius - 2011-01-26

I am looking for a call that will return the image type: jpg, png, gif, bmp, and so on.

getBareImageType()

Or something like that. Does that exist?




PHP Call to Retrieve image type: .jpg, .png, so on - sbillard - 2011-01-27

getSuffix(imageobj->filename)




PHP Call to Retrieve image type: .jpg, .png, so on - Celcius - 2011-01-27

Didn't work for me:

Parse error: syntax error, unexpected T_STRING in ... on line 75

EDIT:

Actually this is the error I am getting now:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in ... on line 75




PHP Call to Retrieve image type: .jpg, .png, so on - Celcius - 2011-01-27

I did a search on this call:
getFullImageURL();
to match it up with .jpg and so on, to determine the filetype.
It's a pretty hackish, but it works for now.