[ pel-Support Requests-1815728 ] adding EXIF Information from scratch
Support Requests item #1815728, was opened at 2007-10-18 12:05 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=650323aid=1815728group_id=108380 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: adding EXIF Information from scratch Initial Comment: Hi, I wrote this function, adding EXIF Information from the scratch to a JPG-Image. Unfortunately in the second GPS entry, the minutes and seconds are missing. If longitude is the second then its missing there, if i switch their places its missing in latitude? It doesnt make any sense, so ... well i'm asking for help here :) Here's the function (with german comments): function add_EXIFinfo( $filename = filename.jpg Default, $description =DESCRIPTION Default, $USER_COMMENT =USER_COMMENT Default, $MODEL =MODEL Default, $GPS_VERSION_ID =123, $GPS_LONGITUDE = 0, $GPS_LATITUDE = 0, $GPS_LONGITUDE_REF = E, $GPS_LATITUDE_REF = N, $GPS_ALTITUDE = array(0, 0, 0), $GPS_ALTITUDE_REF = 0) { $GPS_LONGITUDE = convertGps($GPS_LONGITUDE); $GPS_LATITUDE = convertGps($GPS_LATITUDE); $jpeg = new PelJpeg($filename); //Ein PelJpeg Objekt wird erstellt (mit dem gegebenen JPG) $exif = new PelExif(); //Exif Objekt wird erstellt $jpeg-setExif($exif); //Exif Objekt wird dem JPG hinzugefügt $tiff = new PelTiff(); // Tiff Objekt wird erzeugt (Tiff Objekt enthält exif info) $exif-setTiff($tiff); //Dem Exif-Objekt wird das Tiff Objekt zugewiesen $ifd0 = $tiff-getIfd(); //erste Exif-Info wird aus dem tiff Obj herausgelesen ( müsste null sein) if ($ifd0 == null) { $ifd0 = new PelIfd(PelIfd::IFD0); $tiff-setIfd($ifd0); } $GPSSubIFD = new PelIfd(PelIfd::GPS); //SubIFD für GPS-Informationen wird erstellt. $ifd0-addSubIfd($GPSSubIFD); //dem Ifd0 wird GPS sub IFD hinzugefügt $EXIFSubIFD = new PelIfd(PelIfd::EXIF); //SubIFD für EXIF-Informationen wird erstellt. $ifd0-addSubIfd($EXIFSubIFD); //dem Ifd0 wird EXIF sub IFD hinzugefügt $INTOSubIFD = new PelIfd(PelIfd::INTEROPERABILITY); //SubIFD für INTEROPERABILITY-Informationen wird erstellt. $ifd0-addSubIfd($INTOSubIFD); //dem Ifd0 wird INTEROPERABILITY sub IFD hinzugefügt echo USER_COMMENT wird geschriebenbr; $exif_entry = new PelEntryUserComment($USER_COMMENT); $ifd0-addEntry($exif_entry); echo MODEL wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::MODEL, $MODEL); $ifd0-addEntry($exif_entry); echo IMAGE_DESCRIPTION wird geschriebenbr; //IMAGE_DESCRIPTION $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description); $ifd0-addEntry($desc); echo GPS_VERSION_ID wird geschriebenbr; $exif_entry = new PelEntryByte(PelTag::GPS_VERSION_ID,$GPS_VERSION_ID); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_LATITUDE_REF, $GPS_LATITUDE_REF); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LATITUDE, $GPS_LATITUDE); print_r($GPS_LATITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_LONGITUDE_REF wird geschriebenbr; $exif_entry4 = new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, $GPS_LONGITUDE_REF); $GPSSubIFD-addEntry($exif_entry4); echo GPS_LONGITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LONGITUDE, $GPS_LONGITUDE); print_r($GPS_LONGITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_ALTITUDE, $GPS_ALTITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, $GPS_ALTITUDE_REF); $GPSSubIFD-addEntry($exif_entry); $file = basename($filename); file_put_contents(tagged_pics/.$file, $jpeg-getBytes()); } -- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-03 22:16 Message: KDAtEI a href=http://rqdsltiidszu.com/;rqdsltiidszu/a,
[ pel-Support Requests-1815728 ] adding EXIF Information from scratch
Support Requests item #1815728, was opened at 2007-10-18 12:05 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=650323aid=1815728group_id=108380 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: adding EXIF Information from scratch Initial Comment: Hi, I wrote this function, adding EXIF Information from the scratch to a JPG-Image. Unfortunately in the second GPS entry, the minutes and seconds are missing. If longitude is the second then its missing there, if i switch their places its missing in latitude? It doesnt make any sense, so ... well i'm asking for help here :) Here's the function (with german comments): function add_EXIFinfo( $filename = filename.jpg Default, $description =DESCRIPTION Default, $USER_COMMENT =USER_COMMENT Default, $MODEL =MODEL Default, $GPS_VERSION_ID =123, $GPS_LONGITUDE = 0, $GPS_LATITUDE = 0, $GPS_LONGITUDE_REF = E, $GPS_LATITUDE_REF = N, $GPS_ALTITUDE = array(0, 0, 0), $GPS_ALTITUDE_REF = 0) { $GPS_LONGITUDE = convertGps($GPS_LONGITUDE); $GPS_LATITUDE = convertGps($GPS_LATITUDE); $jpeg = new PelJpeg($filename); //Ein PelJpeg Objekt wird erstellt (mit dem gegebenen JPG) $exif = new PelExif(); //Exif Objekt wird erstellt $jpeg-setExif($exif); //Exif Objekt wird dem JPG hinzugefügt $tiff = new PelTiff(); // Tiff Objekt wird erzeugt (Tiff Objekt enthält exif info) $exif-setTiff($tiff); //Dem Exif-Objekt wird das Tiff Objekt zugewiesen $ifd0 = $tiff-getIfd(); //erste Exif-Info wird aus dem tiff Obj herausgelesen ( müsste null sein) if ($ifd0 == null) { $ifd0 = new PelIfd(PelIfd::IFD0); $tiff-setIfd($ifd0); } $GPSSubIFD = new PelIfd(PelIfd::GPS); //SubIFD für GPS-Informationen wird erstellt. $ifd0-addSubIfd($GPSSubIFD); //dem Ifd0 wird GPS sub IFD hinzugefügt $EXIFSubIFD = new PelIfd(PelIfd::EXIF); //SubIFD für EXIF-Informationen wird erstellt. $ifd0-addSubIfd($EXIFSubIFD); //dem Ifd0 wird EXIF sub IFD hinzugefügt $INTOSubIFD = new PelIfd(PelIfd::INTEROPERABILITY); //SubIFD für INTEROPERABILITY-Informationen wird erstellt. $ifd0-addSubIfd($INTOSubIFD); //dem Ifd0 wird INTEROPERABILITY sub IFD hinzugefügt echo USER_COMMENT wird geschriebenbr; $exif_entry = new PelEntryUserComment($USER_COMMENT); $ifd0-addEntry($exif_entry); echo MODEL wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::MODEL, $MODEL); $ifd0-addEntry($exif_entry); echo IMAGE_DESCRIPTION wird geschriebenbr; //IMAGE_DESCRIPTION $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description); $ifd0-addEntry($desc); echo GPS_VERSION_ID wird geschriebenbr; $exif_entry = new PelEntryByte(PelTag::GPS_VERSION_ID,$GPS_VERSION_ID); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_LATITUDE_REF, $GPS_LATITUDE_REF); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LATITUDE, $GPS_LATITUDE); print_r($GPS_LATITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_LONGITUDE_REF wird geschriebenbr; $exif_entry4 = new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, $GPS_LONGITUDE_REF); $GPSSubIFD-addEntry($exif_entry4); echo GPS_LONGITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LONGITUDE, $GPS_LONGITUDE); print_r($GPS_LONGITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_ALTITUDE, $GPS_ALTITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, $GPS_ALTITUDE_REF); $GPSSubIFD-addEntry($exif_entry); $file = basename($filename); file_put_contents(tagged_pics/.$file, $jpeg-getBytes()); } -- Comment By: Nobody/Anonymous (nobody) Date: 2009-03-20 06:23 Message: fNn2Od a href=http://zuuyajtdehje.com/;zuuyajtdehje/a,
[ pel-Support Requests-1815728 ] adding EXIF Information from scratch
Support Requests item #1815728, was opened at 2007-10-18 14:05 Message generated for change (Comment added) made by mgeisler You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=650323aid=1815728group_id=108380 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: adding EXIF Information from scratch Initial Comment: Hi, I wrote this function, adding EXIF Information from the scratch to a JPG-Image. Unfortunately in the second GPS entry, the minutes and seconds are missing. If longitude is the second then its missing there, if i switch their places its missing in latitude? It doesnt make any sense, so ... well i'm asking for help here :) Here's the function (with german comments): function add_EXIFinfo( $filename = filename.jpg Default, $description =DESCRIPTION Default, $USER_COMMENT =USER_COMMENT Default, $MODEL =MODEL Default, $GPS_VERSION_ID =123, $GPS_LONGITUDE = 0, $GPS_LATITUDE = 0, $GPS_LONGITUDE_REF = E, $GPS_LATITUDE_REF = N, $GPS_ALTITUDE = array(0, 0, 0), $GPS_ALTITUDE_REF = 0) { $GPS_LONGITUDE = convertGps($GPS_LONGITUDE); $GPS_LATITUDE = convertGps($GPS_LATITUDE); $jpeg = new PelJpeg($filename); //Ein PelJpeg Objekt wird erstellt (mit dem gegebenen JPG) $exif = new PelExif(); //Exif Objekt wird erstellt $jpeg-setExif($exif); //Exif Objekt wird dem JPG hinzugefügt $tiff = new PelTiff(); // Tiff Objekt wird erzeugt (Tiff Objekt enthält exif info) $exif-setTiff($tiff); //Dem Exif-Objekt wird das Tiff Objekt zugewiesen $ifd0 = $tiff-getIfd(); //erste Exif-Info wird aus dem tiff Obj herausgelesen ( müsste null sein) if ($ifd0 == null) { $ifd0 = new PelIfd(PelIfd::IFD0); $tiff-setIfd($ifd0); } $GPSSubIFD = new PelIfd(PelIfd::GPS); //SubIFD für GPS-Informationen wird erstellt. $ifd0-addSubIfd($GPSSubIFD); //dem Ifd0 wird GPS sub IFD hinzugefügt $EXIFSubIFD = new PelIfd(PelIfd::EXIF); //SubIFD für EXIF-Informationen wird erstellt. $ifd0-addSubIfd($EXIFSubIFD); //dem Ifd0 wird EXIF sub IFD hinzugefügt $INTOSubIFD = new PelIfd(PelIfd::INTEROPERABILITY); //SubIFD für INTEROPERABILITY-Informationen wird erstellt. $ifd0-addSubIfd($INTOSubIFD); //dem Ifd0 wird INTEROPERABILITY sub IFD hinzugefügt echo USER_COMMENT wird geschriebenbr; $exif_entry = new PelEntryUserComment($USER_COMMENT); $ifd0-addEntry($exif_entry); echo MODEL wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::MODEL, $MODEL); $ifd0-addEntry($exif_entry); echo IMAGE_DESCRIPTION wird geschriebenbr; //IMAGE_DESCRIPTION $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description); $ifd0-addEntry($desc); echo GPS_VERSION_ID wird geschriebenbr; $exif_entry = new PelEntryByte(PelTag::GPS_VERSION_ID,$GPS_VERSION_ID); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_LATITUDE_REF, $GPS_LATITUDE_REF); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LATITUDE, $GPS_LATITUDE); print_r($GPS_LATITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_LONGITUDE_REF wird geschriebenbr; $exif_entry4 = new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, $GPS_LONGITUDE_REF); $GPSSubIFD-addEntry($exif_entry4); echo GPS_LONGITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LONGITUDE, $GPS_LONGITUDE); print_r($GPS_LONGITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_ALTITUDE, $GPS_ALTITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, $GPS_ALTITUDE_REF); $GPSSubIFD-addEntry($exif_entry); $file = basename($filename); file_put_contents(tagged_pics/.$file, $jpeg-getBytes()); } -- Comment By: Martin Geisler (mgeisler) Date: 2007-10-19 08:08 Message: Logged In: YES user_id=1264592 Originator: NO Thanks, you can attach them to this tracker item, no
[ pel-Support Requests-1815728 ] adding EXIF Information from scratch
Support Requests item #1815728, was opened at 2007-10-18 14:05 Message generated for change (Comment added) made by mgeisler You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=650323aid=1815728group_id=108380 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: adding EXIF Information from scratch Initial Comment: Hi, I wrote this function, adding EXIF Information from the scratch to a JPG-Image. Unfortunately in the second GPS entry, the minutes and seconds are missing. If longitude is the second then its missing there, if i switch their places its missing in latitude? It doesnt make any sense, so ... well i'm asking for help here :) Here's the function (with german comments): function add_EXIFinfo( $filename = filename.jpg Default, $description =DESCRIPTION Default, $USER_COMMENT =USER_COMMENT Default, $MODEL =MODEL Default, $GPS_VERSION_ID =123, $GPS_LONGITUDE = 0, $GPS_LATITUDE = 0, $GPS_LONGITUDE_REF = E, $GPS_LATITUDE_REF = N, $GPS_ALTITUDE = array(0, 0, 0), $GPS_ALTITUDE_REF = 0) { $GPS_LONGITUDE = convertGps($GPS_LONGITUDE); $GPS_LATITUDE = convertGps($GPS_LATITUDE); $jpeg = new PelJpeg($filename); //Ein PelJpeg Objekt wird erstellt (mit dem gegebenen JPG) $exif = new PelExif(); //Exif Objekt wird erstellt $jpeg-setExif($exif); //Exif Objekt wird dem JPG hinzugefügt $tiff = new PelTiff(); // Tiff Objekt wird erzeugt (Tiff Objekt enthält exif info) $exif-setTiff($tiff); //Dem Exif-Objekt wird das Tiff Objekt zugewiesen $ifd0 = $tiff-getIfd(); //erste Exif-Info wird aus dem tiff Obj herausgelesen ( müsste null sein) if ($ifd0 == null) { $ifd0 = new PelIfd(PelIfd::IFD0); $tiff-setIfd($ifd0); } $GPSSubIFD = new PelIfd(PelIfd::GPS); //SubIFD für GPS-Informationen wird erstellt. $ifd0-addSubIfd($GPSSubIFD); //dem Ifd0 wird GPS sub IFD hinzugefügt $EXIFSubIFD = new PelIfd(PelIfd::EXIF); //SubIFD für EXIF-Informationen wird erstellt. $ifd0-addSubIfd($EXIFSubIFD); //dem Ifd0 wird EXIF sub IFD hinzugefügt $INTOSubIFD = new PelIfd(PelIfd::INTEROPERABILITY); //SubIFD für INTEROPERABILITY-Informationen wird erstellt. $ifd0-addSubIfd($INTOSubIFD); //dem Ifd0 wird INTEROPERABILITY sub IFD hinzugefügt echo USER_COMMENT wird geschriebenbr; $exif_entry = new PelEntryUserComment($USER_COMMENT); $ifd0-addEntry($exif_entry); echo MODEL wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::MODEL, $MODEL); $ifd0-addEntry($exif_entry); echo IMAGE_DESCRIPTION wird geschriebenbr; //IMAGE_DESCRIPTION $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description); $ifd0-addEntry($desc); echo GPS_VERSION_ID wird geschriebenbr; $exif_entry = new PelEntryByte(PelTag::GPS_VERSION_ID,$GPS_VERSION_ID); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_LATITUDE_REF, $GPS_LATITUDE_REF); $GPSSubIFD-addEntry($exif_entry); echo GPS_LATITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LATITUDE, $GPS_LATITUDE); print_r($GPS_LATITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_LONGITUDE_REF wird geschriebenbr; $exif_entry4 = new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, $GPS_LONGITUDE_REF); $GPSSubIFD-addEntry($exif_entry4); echo GPS_LONGITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_LONGITUDE, $GPS_LONGITUDE); print_r($GPS_LONGITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE wird geschriebenbr; $exif_entry = new PelEntryRational(PelTag::GPS_ALTITUDE, $GPS_ALTITUDE); $GPSSubIFD-addEntry($exif_entry); echo GPS_ALTITUDE_REF wird geschriebenbr; $exif_entry = new PelEntryAscii(PelTag::GPS_ALTITUDE_REF, $GPS_ALTITUDE_REF); $GPSSubIFD-addEntry($exif_entry); $file = basename($filename); file_put_contents(tagged_pics/.$file, $jpeg-getBytes()); } -- Comment By: Martin Geisler (mgeisler) Date: 2007-10-18 20:10 Message: Logged In: YES user_id=1264592 Originator: NO Nice that figured it out by yourself -- the rationals