Commit d38d17c9 authored by Andrey Filippov's avatar Andrey Filippov

fixing tags

parent 408aa909
...@@ -30,7 +30,10 @@ ...@@ -30,7 +30,10 @@
<CameraSerialNumber tag="0xc62f" format="ASCII" function="SERIAL"/> <CameraSerialNumber tag="0xc62f" format="ASCII" function="SERIAL"/>
<ImageNumber tag="0x9211" format="LONG" count="1" seq="25" dlen="4"/> <ImageNumber tag="0x9211" format="LONG" count="1" seq="25" dlen="4"/>
<Orientation tag="0x112" format="SHORT" count="1" seq="27" dlen="2"/> <Orientation tag="0x112" format="SHORT" count="1" seq="27" dlen="2"/>
<PageNumber tag="0x129" format="SHORT" count="1" seq="28" dlen="2"/> <PageNumber tag="0x129" format="SHORT" count="2" seq="28" dlen="2">
<value> 0 </value>
<value> 4 </value>
</PageNumber>
<ExifTag tag="0x8769" format="LONG" function="EXIFTAG"/> <ExifTag tag="0x8769" format="LONG" function="EXIFTAG"/>
<GPSTag tag="0x08825" format="LONG" function="GPSTAG"/> <GPSTag tag="0x08825" format="LONG" function="GPSTAG"/>
<!-- Tiff only --> <!-- Tiff only -->
......
...@@ -645,7 +645,6 @@ function finish_ifd(&$exif_data, &$ifd_pointer) { // we do not have additional I ...@@ -645,7 +645,6 @@ function finish_ifd(&$exif_data, &$ifd_pointer) { // we do not have additional I
function addDirEntry0($ifd_entry, &$dir_sequence, &$dir_entries, $lh) { function addDirEntry0($ifd_entry, &$dir_sequence, &$dir_entries, $lh) {
// global $dir_sequence,$dir_entries,$exif_head; // global $dir_sequence,$dir_entries,$exif_head;
// $lh=count($exif_head); // $lh=count($exif_head);
$attrs = $ifd_entry->attributes(); $attrs = $ifd_entry->attributes();
// var_dump($attrs); // var_dump($attrs);
// if (array_key_exists ( "seq" , $attrs )) { // if (array_key_exists ( "seq" , $attrs )) {
...@@ -830,7 +829,10 @@ echo "\n"; ...@@ -830,7 +829,10 @@ echo "\n";
$ifd_entry->addChild ("ltag",$ltag ); $ifd_entry->addChild ("ltag",$ltag );
if (count($ifd_data) <=4) { if (count($ifd_data) <=4) {
$ifd_entry->addChild ('value_offest',$ifd_pointer); $ifd_entry->addChild ('value_offest',$ifd_pointer);
$ifd_data= array_pad($ifd_data,-4,0); // add leading zeroes if <4 bytes
// $ifd_data= array_pad($ifd_data,-4,0); // add leading zeroes if <4 bytes
$ifd_data= array_pad($ifd_data, 4,0); // add trailing zeroes if <4 bytes (for shorts)
for ($i=0;$i<4;$i++) $exif_data[$ifd_pointer++]=$ifd_data[$i]; for ($i=0;$i<4;$i++) $exif_data[$ifd_pointer++]=$ifd_data[$i];
} else { //pointer, not data } else { //pointer, not data
$ifd_entry->addChild ('value_offest',$data_pointer); $ifd_entry->addChild ('value_offest',$data_pointer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment