In association with exif_read_data:
<?php
# The tagnames can vary in different cameras
$imgdir = "/path_to_img/";
$img_file = "image_file.jpg";
echo $img_file . " <sub>TEST</sub>
<br />";
echo '<img src="' . $imgdir . $img_file . '" alt="'
. $img_file . '" title="' . $img_file . '" width="400" /><br /><br />';
$xf_data = exif_read_data($imgdir . $img_file);
$tagg = exif_tagname(0X10F);
echo '<br>' . $tagg . ' >>> ' . $xf_data[$tagg];
$tagg = exif_tagname(0X110);
echo '<br>' . $tagg . ' >>> ' . $xf_data[$tagg];
$tagg = exif_tagname(0X132);
echo '<br>' . $tagg . ' >>> ' . $xf_data[$tagg];
$tagg = exif_tagname(0XA002);
echo '<br>' . $tagg . ' >>> ' . $xf_data[$tagg] . 'px';
$tagg = exif_tagname(0XA003);
echo '<br>' . $tagg . ' >>> ' . $xf_data[$tagg] . 'px';
?>
exif_tagname
(PHP 4 >= 4.2.0, PHP 5)
exif_tagname — Obtém o nome do cabeçalho para um índice
Descrição
string exif_tagname
( string $index
)
Aviso
Esta função não está documentada; somente a lista de argumentos está disponível.
Parâmetros
- index
-
O índice da imagem
Valor Retornado
Retorna o nome do cabeçalho, ou FALSE se index é indefinido.
abc at ed48 dot com
22-Jun-2011 04:03
abc at ed48 dot com
21-Jun-2011 07:20
Theoretically, 65,535 tags are possible. Although not all are used, yet. The code below lists these tags:
<?php
for ($id = 1; $id <= 65535; $id++)
{
$dec2hex = dechex($id);
$strgx = '0x'. $dec2hex;
if(exif_tagname($strgx) != "")
{
echo $strgx . ' ( ' . exif_tagname($strgx) . ' )<br />';
}
}
?>
djmaze@moocms
22-Feb-2008 10:23
Usage: exif_tagname(0x5001)
A list of all supported index numbers is in the exif.c: tag_table_IFD
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?view=markup
As you can see, it doesn't support them all!
