From: Brian E. L. <br...@us...> - 2004-10-20 06:20:45
|
Update of /cvsroot/rideplot/rideplot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27339 Modified Files: rideplot Log Message: Added image map file generation support when merging GPS data with digital photo exif data. Also added a transparent option Index: rideplot =================================================================== RCS file: /cvsroot/rideplot/rideplot/src/rideplot,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** rideplot 23 Aug 2004 18:23:45 -0000 1.9 --- rideplot 20 Oct 2004 06:20:36 -0000 1.10 *************** *** 66,70 **** $speed_cutoff $cutoff_count $brush_width $brush_color $output_file @waypoints $waypoint_file $waypoint_width $waypoint_fill $waypoint_name $waypoint_merge ! $photo_dir @photos @mapped_photos $photo_idx ); --- 66,70 ---- $speed_cutoff $cutoff_count $brush_width $brush_color $output_file @waypoints $waypoint_file $waypoint_width $waypoint_fill $waypoint_name $waypoint_merge ! $photo_dir @photos @mapped_photos $photo_idx $imap_file $transparent); *************** *** 375,378 **** --- 375,380 ---- "waypoint-name" => \$waypoint_name, # Print the Waypoints name. "photo-dir=s" => \$photo_dir, # Directory containing photos during tracking + "imap-file=s" => \$imap_file, # file to output image map to correspond to photo dots + "transparent" => \$transparent, # generate a transparent image for track "help" => sub { pod2usage({ -message => "\t\tRide Plot\n\t\t---------\n" , -exitval => 1 }); } , ); *************** *** 732,736 **** $black = $image->colorAllocate(0,0,0); $blue = $image->colorAllocate(0,0,255); ! $image->transparent($white); # Make white the transparent color if ( $use_color ) { --- 734,738 ---- $black = $image->colorAllocate(0,0,0); $blue = $image->colorAllocate(0,0,255); ! ($transparent) && $image->transparent($white); # Make white the transparent color if ( $use_color ) { *************** *** 833,836 **** --- 835,846 ---- } + ($debug) && print STDERR $imap_file,"\n"; + if ( defined $imap_file ) { + if ( !open ( IMAP_FILE, ">$imap_file" ) ) { + print STDERR "$0: unable to open IMap File " + ."imap_file for writing: $!\n"; + } + } + # Plot photo points here # @mapped_photos, [ $interplat, $interplon, $name ]; *************** *** 838,842 **** if ( $#mapped_photos > 0 ) { ! my $mapped_photo; foreach $mapped_photo (@mapped_photos) --- 848,853 ---- if ( $#mapped_photos > 0 ) { ! ! my $mapped_photo; foreach $mapped_photo (@mapped_photos) *************** *** 851,855 **** --- 862,871 ---- $image->arc( @rec_coords[0..1] ,6,6,0,360,$blue); + $image->fill( @rec_coords[0..1] ,$blue); + if ( defined $imap_file ) { + print IMAP_FILE "circle http://mapped_photo_url/#",${$mapped_photo}[2]," ", + join (",",@rec_coords[0..1]), " ",$rec_coords[0]+3 ,",",$rec_coords[1],"\n"; + } } *************** *** 1052,1055 **** --- 1068,1076 ---- file types are "gd2" (Linux Gardown 2) or "gd2d" (Same but degrees format ( -f 1)). + =item C<--imap-file="str"> + + When merging photos taken during collection of tracklog, this option will + generate an image map file that can be used with Apache's image map module + =item C<--output="str"> *************** *** 1084,1087 **** --- 1105,1113 ---- travelled. + =item C<--transparent> + + Generate image with transparent background. Works well when doing + an overlay. Otherwise, it uses a white background. + =item C<--brush-width=str> |