PHP Image Manipulation Functions

  1. Home
  2. Knowledge Base
  3. WordPress Plugins
  4. PHP Image Manipulation Functions

Lets define some PHP functions well be calling on for our PHP image tutorial series. We define all these functions in a file named functions.phtml and call it in our PHP code through a PHP include_once(), this way we dont bother with the functions in our PHP image code.

This first function allows us to determine if the requested image file is an image is_image().

This function returns the extension for any file getExtension().

The next function allows us to call the proper MIME type, based on image type, in the header of the PHP code get_mime().

This fourth function allows for the use of the proper PHP image createfromxxx() call based on image type imagecreatefrom().

Lastly this functions will output the image to the browser image_same_type().


Was this article helpful?

Related Articles

Leave a Reply