August 2003
Intermediate to advanced
1104 pages
19h 27m
English
These functions read information from images.
The exif_imagetype function reads the first few bytes of an image file and returns the type as an integer. Table 16.1 lists image types recognized. If PHP cannot determine the type, it returns FALSE.
| Constant | Description | File Extension |
|---|---|---|
| IMAGETYPE_BMP | Windows Bitmap | .bmp |
| IMAGETYPE_GIF | Graphic Interchange Format | .gif |
| IMAGETYPE_IFF | Interchange Format Files | .iff |
| IMAGETYPE_JB2 | Joint Bi-level Image Experts Group | .jb2 |
| IMAGETYPE_JP2 | JPEG 2000 | .jp2 |
| IMAGETYPE_JPC | JPEG 2000 | .jpc |
| IMAGETYPE_JPEG | Joint Photographic Experts Group | .jpg |
| IMAGETYPE_JPX | JPEG 2000 | .jpx |
| IMAGETYPE_PNG | Portable Network Graphics | .png |
| IMAGETYPE_PSD | Adobe Photoshop | .psd |
| IMAGETYPE_SWC | MacroMedia ... |
Read now
Unlock full access