GNU Image Manipulation Program (GIMP)/Image maps
< GNU Image Manipulation Program (GIMP)Imagemaps are created on GIMP using one of the extensions.
Imagemaps from GIMP to Mediawiki
- (copied with permission from commons:User talk:CarolSpears)
Hi Carol. I noticed you wrote a doc about making imagemaps in GIMP (though I'm afraid it went a bit above my head), and was wondering if you might help out with figuring out how to get from GIMP to Imagemaps that use the wikimedia extension (or perhaps a free vector program if you know of one... I use MacOSX).
I want to experiment with a garden design project on wikiversity, where people could create plant combinations either in the garden or using pots, and then submit pictures that you can "mouseover" to get links to information about the plants used. --SB_Johnny talk 13:34, 25 October 2008 (UTC)
- I use the output from GIMP's plug-in. Simple search and replace, simple enough that it can be scripted and also (perhaps) the opposite of what the wiki-software does to render the html, heh.
- Using the plug-in: it has simple selection tools and when an outline of an area is closed (or double mouse clicked) a dialog shows up that has text boxes for the different image table attributes and instructions. I tend to just use the "alt" attribute for what the name of the area is so I can recognize it in the html output. Remembering where the output was saved is part of the task as the save dialog is not so robust as it is in other gimp plug-ins or the main app.
- The output looks like commons:Image_talk:Afrotropic-Ecozone-Biocountries-IM.svg#Partial HTML Markup and to make the wiki markup from that it is simple search and replace "<area shape="" just gets removed, "" coords="" replaced with a space, "," replaced also with a space (in the list of coordinates/numbers), " href=" is replaced with " [[" or " [[:Category:''" and ''" />"'' with "'']]". This "write-up" of the regular expression replacement is more confusing perhaps since I enclosed the strings with quotations.
<area shape="poly" coords="203,193,202,222,195,238,202,268,239,249,264,284,281,289,333,288,329,322,370,277,377,243,346,250,322,221,306,181,256,186,254,194,248,199,226,198,226,205,205,205" href="Northeast Tropical Africa" />
Needs to become:
poly 203 193 202 222 195 238 202 268 239 249 264 284 281 289 333 288 329 322 370 277 377 243 346 250 322 221 306 181 256 186 254 194 248 199 226 198 226 205 205 205 [[:Category:Northeast Tropical Africa]]
- Also, with one of the maps I made here, I had a problem in that I forgot to wikify the comments -- I had to get assistance even, heh.
- Let me know if you have specific questions or need more details. It was kind of learn as I go when I did this. The plug-in has shaped selection tools which are perhaps more robust than a regular garden layout needs but ultimately, only straight lines or uniform ellipse can be selected. -- carol (talk) 22:06, 25 October 2008 (UTC)
- Ah ok :-). That's actually a bit easier than I thought, though it of course makes me wonder if the extension couldn't be amended to accept commas as well as spaces for easier editing. I'll send you a link when I have something.
- If you don't mind, may I copy your comment above to Wikibooks and/or Wikiversity? Both have GIMP resources, and both are in pretty poor shape (GIMP, b:GIMP). I'm looking at inkscape as well for making schematic maps for the same sort of project (unless you can recommend something better for that). --SB_Johnny talk 10:52, 26 October 2008 (UTC)
- Heh, you can copy anything that I write about GIMP anywhere. It is worth mentioning also that the image map plug-in does not work on scaled images (definitely not svg but also maybe not the others) which is the reason I uploaded two versions of the maps I made -- the image map sized ones have IM in the name somewhere. Allowing comas would be nice, but it is one of the easiest parts of the conversion. One thing I never attempted that might be worth an experiment with is using regular image map mark-up within <nowiki> tags. And I have no idea how closely the inkscape coordinates match html page coordinates. My feeling is that they don't match at all, but upon more pondering, I start to think that this is possibly a case where my feelings (once again) make no sense.... -- carol (talk) 11:10, 26 October 2008 (UTC)
This article is issued from Wikiversity - version of the Tuesday, October 28, 2008. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.