gimp-make-img-map [-max_height mh] [-htmlindex hi] [-layoutwidth lw]
[-flatten] [-bgcolor clr] [-bgpattern ptn] list
gimp-make-img-map communicates with Gimp through the Perl Net-Server and automizes the process of combining a list of images into an image map for use e.g. within a HTML page.
-max_height mh Set max height of images. (Default 64) -index if Create an index file mapping filename to bounding box coordinates in output image, where if is the name of the index file. The index file may e.g. be translated by a subsequent program into a html index file. -layoutwidth lw Set total width of layout. (Default 600) -flatten Flatten the final image. -bgcolor Set bg color. -bgpattern Set bg pattern. Overrides the bgcolor. -padx px Extra space around all images in x-direction. (Default 20) -pady py Extra space around all images in y-direction. (Default 20) -gutterx gx Space between images in x-direction. (Default 15) -gutterx gy Space between images in y-direction. (Default 15) -darkcomp Compensate for darkening when bumpmapping. -decoration alg Choose algorithm for drawing the decoration in the layout. Known algorithms are:
- drop-shadow
- sunken-windows
red.png green.png blue.jpg pink.jpg |
gimp-make-img-map -bgcolor #440000 -layoutwidth 400 myimg.listcreates the image:
gimp-make-img-map -index myindex.list -max_height 50 -bgpattern Wood \
-decoration sunken-windows -darkcomp -layoutwidth 200 myimg.list
creates the image:
If the option -index index.idx is given then the following info is written to the file index.idx:This info can easily be converted into a html image map with a script similar to the following:
red.png 22 20 178 70 green.png 55 85 105 135 blue.png 120 85 145 135 pink.png 62 150 138 200
#!/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";
I will be happy to receive ideas about additional layout algorithms and decorations that may be added to gimp-make-img-map.