Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Exif Functions : exif_imagetype

exif_imagetype

Determine the type of an image (PHP 4 >= 4.3.0, PHP 5)
int exif_imagetype ( string filename )

Example 599. exif_imagetype() example

<?php
if (exif_imagetype('image.gif') != IMAGETYPE_GIF) {
   echo
'The picture is not a gif';
}
?>

Code Examples / Notes » exif_imagetype

10-nov-2006 12:43

Seems to give a 'Read error' warning if the size of the file is very small (2 bytes). I think this is because it needs a min 3 bytes to determine the file type

tom

libexif can also be used to parse image info out of id3 tags:
exif_read_data("mp3_with_2.4ID3TAGS, '', true, false);


tilmauder

After looking for hours, I found a very good source for exif related programs here: http://drewnoakes.com/code/exif/index.html
It lists exif specifications (pdf), a few good links to exif related stuff. The best source I have found in my quest to understand exif better for use in php based exif tools.


Change Language


Follow Navioo On Twitter
exif_imagetype
exif_read_data
exif_tagname
exif_thumbnail
read_exif_data
eXTReMe Tracker