Home > PHP > Function > Exif > exif_imagetype()

exif_imagetype()

exif_imagetype - Determine the type of an image

Syntax

int exif_imagetype (string $filename)

Arguments

  • filename - The image being checked.

Description

exif_imagetype() reads the first bytes of an image and checks its signature.

Version

PHP 4.3.0, 5

Return value

When a correct signature is found, the appropriate constant value will be returned otherwise the return value is FALSE. The return value is the same value that getimagesize() returns in index 2 but exif_imagetype() is much faster.