[gimp-perl] Include text from Dov's github archive.



commit 1f2bd122434d929d4e21c970c874b46c3d663aee
Author: Ed J <edj src gnome org>
Date:   Thu May 1 03:43:14 2014 +0100

    Include text from Dov's github archive.

 examples/gimp-make-img-map |   45 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/examples/gimp-make-img-map b/examples/gimp-make-img-map
index 172a5d0..adca754 100755
--- a/examples/gimp-make-img-map
+++ b/examples/gimp-make-img-map
@@ -444,6 +444,51 @@ image map for use e.g. within a HTML page.
                           sunken-windows
                     Default is 'drop_shadow'.
 
+=head1 EXAMPLES
+
+Given a text file C<myimg.list> containing the names of four images of
+arbitrary sizes:
+
+ red.png                               
+ green.png
+ blue.jpg
+ pink.jpg
+
+Run:
+
+ gimp-make-img-map -bgcolor #440000 -layoutwidth 400 myimg.list
+
+An alternative command line:
+
+ gimp-make-img-map -index myindex.list -max_height 50 -bgpattern Wood \
+    -decoration sunken-windows -darkcomp -layoutwidth 200 myimg.list      
+
+=head1 LIST FILE
+
+If the option C<-index index.idx> is given then the following info is
+written to the file C<index.idx>:
+
+  red.png 22 20 178 70 
+  green.png 55 85 105 135 
+  blue.png 120 85 145 135 
+  pink.png 62 150 138 200
+
+This info can easily be converted into a html image map with a script
+similar to the following:
+
+  #!/usr/local/bin/perl
+  my $map = q(<map name="mymap">);
+  my $idx = 0;
+  while(<>) {
+     ($img, $x0, $y0, $x1, $y1) = split;
+     $map .= "<area shape=\"rect\" coords=\"$x0,$y0,$x1,$y1\" ".
+            "href=\"img$idx.html\">\n";
+     $idx++;
+  }
+  $map .= "</map>";
+  print "$map";
+  print "<img src=\"index.jpg\" usemap=\"#mymap\>\n";
+
 =head1 BUGS
 
   -padx px means at least px and not exactly px. This should be fixed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]