This extension allows you to read an EXIF data (including thumbnails) from your JPEG and TIFF images.
Yii::import('application.extensions.exifreader.CExifReader');
or add to your config:
'components'=>array(
'CExifReader' => array(
'class'=>'ext.exifreader.CExifReader',
),
),
then:
$exifReader = new CExifReader;
// or $exifReader = Yii::app()->CExifReader;
$exif->file = PATH_TO_YOUR_FILE;
$data = $exif->getExifData(array(
array('FILE', array('SectionsFound')),
'COMPUTED',
'THUMBNAIL',
array('IFD0', array('UndefinedTag:0xC4A5')),
array('EXIF', array('MakerNote')),
));
$thumbnail = $exif->getExifThumbnail();
I tried exifreader using this photo:
P1070954.JPG. And here's the result:
Thumbnail readed from file:
And EXIF data: FILE, COMPUTED:
| FileName | P1070954.JPG |
| FileDateTime | 1205592322 |
| FileSize | 2297804 |
| FileType | 2 |
| MimeType | image/jpeg |
| html | width="2112" height="2816" |
| Height | 2816 |
| Width | 2112 |
| IsColor | 1 |
| ByteOrderMotorola | 0 |
| ApertureFNumber | f/2.8 |
| Thumbnail.FileType | 2 |
| Thumbnail.MimeType | image/jpeg |
You can download it from Yii's page