From: Uwe G. <gi...@us...> - 2010-06-27 17:02:39
|
Update of /cvsroot/gps2photo/gpsPhoto/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv399 Modified Files: gpsPhoto.pl Log Message: This closes https://sourceforge.net/tracker/?func=detail&aid=2978081&group_id=180378&atid=892944 The placemark and photooverlay images get width and height attribute. Index: gpsPhoto.pl =================================================================== RCS file: /cvsroot/gps2photo/gpsPhoto/src/gpsPhoto.pl,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** gpsPhoto.pl 16 Jun 2010 17:15:51 -0000 1.151 --- gpsPhoto.pl 27 Jun 2010 17:02:29 -0000 1.152 *************** *** 568,572 **** sub kml_write_folder_end($); sub kml_write_image($$$); ! sub kml_write_image_placemark($$$$$$); sub kml_write_image_screenoverlay($$$$); sub kml_write_image_groundoverlay($$$$$); --- 568,572 ---- sub kml_write_folder_end($); sub kml_write_image($$$); ! sub kml_write_image_placemark($$$$$$$); sub kml_write_image_screenoverlay($$$$); sub kml_write_image_groundoverlay($$$$$); *************** *** 1697,1705 **** if ($kml) { kml_write_image_placemark($kml_fh, $fn, $kml_image_file_name, $kml_thumb_file_name, ! $point, $image_landscape); } if ($kmz) { kml_write_image_placemark($kmz_temp_kml_fh, $fn, $kmz_image_file_name, $kmz_thumb_file_name, ! $point, $image_landscape); $kmz_embed_image++; $kmz_embed_thumb++; --- 1697,1705 ---- if ($kml) { kml_write_image_placemark($kml_fh, $fn, $kml_image_file_name, $kml_thumb_file_name, ! $point, $image_landscape, $image_ratio); } if ($kmz) { kml_write_image_placemark($kmz_temp_kml_fh, $fn, $kmz_image_file_name, $kmz_thumb_file_name, ! $point, $image_landscape, $image_ratio); $kmz_embed_image++; $kmz_embed_thumb++; *************** *** 1779,1794 **** } ! sub kml_write_image_placemark($$$$$$) { ! my ($fh, $_fn, $_file, $_thumb, $_point, $_landscape) = @_; my $thumb_scale; # The longer side is fixed to $opt_kml_placemark_thumbnail_size. if ($_landscape) { ! $thumb_scale="width=\"$opt_kml_placemark_thumbnail_size\""; ! } ! else { ! $thumb_scale="height=\"$opt_kml_placemark_thumbnail_size\""; } print $fh qq( --- 1779,1798 ---- } ! sub kml_write_image_placemark($$$$$$$) { ! my ($fh, $_fn, $_file, $_thumb, $_point, $_landscape, $_ratio) = @_; my $thumb_scale; + my $width; + my $height; # The longer side is fixed to $opt_kml_placemark_thumbnail_size. if ($_landscape) { ! $width = $opt_kml_placemark_thumbnail_size; ! $height = $width * $_ratio; ! } else { ! $height = $opt_kml_placemark_thumbnail_size; ! $width = $height / $_ratio; } + $thumb_scale=sprintf("width=\"%d\" height=\"%d\"", $width, $height); print $fh qq( *************** *** 1959,1963 **** # Portrait mode. # print "Portrait\n"; ! $thumb_scale="height=\"$opt_kml_placemark_thumbnail_size\""; $av = 25.0; $ah = rad2deg(atan(tan(deg2rad($av) / $_image_ratio), 1)); --- 1963,1969 ---- # Portrait mode. # print "Portrait\n"; ! my $height = $opt_kml_placemark_thumbnail_size; ! my $width = $height / $_image_ratio; ! $thumb_scale=sprintf("width=\"%d\" height=\"%d\"", $width, $height); $av = 25.0; $ah = rad2deg(atan(tan(deg2rad($av) / $_image_ratio), 1)); *************** *** 1965,1969 **** # Landscape mode. # print "Landscape\n"; ! $thumb_scale="width=\"$opt_kml_placemark_thumbnail_size\""; $ah = 25.0; $av = rad2deg(atan(tan(deg2rad($ah) * $_image_ratio), 1)); --- 1971,1977 ---- # Landscape mode. # print "Landscape\n"; ! my $width = $opt_kml_placemark_thumbnail_size; ! my $height = $width * $_image_ratio; ! $thumb_scale=sprintf("width=\"%d\" height=\"%d\"", $width, $height); $ah = 25.0; $av = rad2deg(atan(tan(deg2rad($ah) * $_image_ratio), 1)); |