PHP Call to Retrieve image type: .jpg, .png, so on

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?

Comments

  • `getSuffix(imageobj->filename)`
  • 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
  • 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.
Sign In or Register to comment.