Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP image_type_to_extension - Get Image Extension

PHP image_type_to_extension - Get Image Extension

PHP Image ProcessingPHP Image Processing

image_type_to_extension — Returns the corresponding extension name based on the specified image type.

Syntax



string image_type_to_extension ( int $imagetype [, bool $include_dot = TRUE ] )

Returns the extension name based on the given constant IMAGETYPE_XXX.

Example





Running the file above will generate a test.png image in the current directory.

PHP Image ProcessingPHP Image Processing