static function getJpegComment($fname) { // make sure you have ~/src in your php.ini include_path require_once 'jpeg-toolkit/JPEG.php'; $headers = get_jpeg_header_data($fname); $ret = stripslashes(get_jpeg_Comment($headers)); if (trim($ret) == 'AppleMark') { $ret = ''; /* include('jpeg-toolkit/EXIF.php'); $data = get_EXIF_JPEG($fname); funx::decho($headers); echo Interpret_EXIF_to_HTML($data,$fname); */ } return $ret; }
function Interpret_Comment_to_HTML($jpeg_header_data) { // Create a string to receive the output $output = ""; // read the comment segment $comment = get_jpeg_Comment($jpeg_header_data); // Check if the comment segment was valid if ($comment !== FALSE) { // Comment exists - add it to the output $output .= "<h2 class=\"JPEG_Comment_Main_Heading\">JPEG Comment</h2>\n"; $output .= "<p class=\"JPEG_Comment_Text\">{$comment}</p>\n"; } // Return the result return $output; }
if (!$couleur) { $couleur = $this->GetParameter('pointcolor'); } // Taille point par défaut : 10 $point_size = $this->GetParameter('pointsize'); if (!$point_size) { $point_size = 10; } // parametre centrage point $centrage = $this->GetParameter('pointcenter'); if ($centrage == '') { $centrage = 1; } // Fin lecture Parametre de l'action // Lecture commentaires embarqués dans la page $comment_jpeg = get_jpeg_Comment(get_jpeg_header_data('tools/cartowiki/images/' . $src_map)); // Solution facile de lecture, mais difficile à maintenir : notamment la notation parse_str($comment_jpeg); // Fuseau 31T : // Rappel : Pixel : O,0 en haut gauche // X Coin inferieur gauche en Pixel //$Px_echelle_X1['31T']=0; $Px_echelle_X1['31T'] = $X131T; // Y Coin inferieur gauche en Pixel //$Px_echelle_Y1['31T']=539; $Px_echelle_Y1['31T'] = $Y131T; // Pour calcul Resolution // X Coin inferieur droit en Pixel //$Px_echelle_X2['31T']=805; $Px_echelle_X2['31T'] = $X231T; // Y Coin inferieur droit en Pixel