Create Image Maps with GIMP
Posted
by SGWellens
on ASP.net Weblogs
See other posts from ASP.net Weblogs
or by SGWellens
Published on Thu, 03 Feb 2011 03:45:00 GMT
Indexed on
2011/02/03
7:26 UTC
Read the original article
Hit count: 486
Having a clickable image in a web page is not a big deal. Having an image in a web page with clickable hotspots is a big deal. The powerful GIMP editor has a tool to make creating clickable hotspots much easier.
GIMP stands for GNU Image Manipulation Program. Its home page and download links are here: http://www.gimp.org/ (it is completely free).
Beware: GIMP is an extraordinarily advanced and powerful image editor. If you wish to use it for general image editing tasks, you have a steep learning curve to climb. FYI: I used it to create the shadows you see on the images below. Fortunately, the tool to make Image Maps is separate from the main program.
To start, open an image with GIMP or, drag and drop an image onto the GIMP main window. I'm using the image of a bar graph.
Next, we have to find the Image Map tool and launch it (Filters->Web->Image Map…):
Why is the Image Map tool under Filters and not Tools? I don't know. It's mystery—much like the Loch Ness Monster, the Bermuda Triangle, or why my socks keep disappearing when I do laundry. I swear I've got twenty single unmatched socks. But I digress…
Here is what the Image Map tool looks like:
If we click the blue 'I' button, we can add information to the Image Map:
Now we'll use the rectangle tool to create some clickable hotspots. Select the Blue Rectangle tool, drag a rectangle, click when done and you'll get something like this:
You can also make circle/oval and polygon areas. You can edit all the parameters of an image map area after drawing it.
Rectangle settings (for fine tweaking):
JavaScript functions (it's up to you to write them):
Here is a setup with two rectangles and one polygon area:
When you hit save a map file is generated that looks something like this:
Paste the contents into a web page and you are almost there. I made some tweaks before it became usable:
- Replaced ' with apostrophes in the javascript functions.
- Changed the image path so it would find the image in my images directory
- Tweaked the href urls.
- Added Title="Some Text" to get tool tips.
- Cleaned out the comments.
Result:
The final markup (with JavaScript function):
© ASP.net Weblogs or respective owner
Related posts about ASP.NET
-
Migrating ASP.NET MVC 1.0 applications to ASP.NET MVC 2 RTM
as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
Note: ASP.NET MVC 2 RTM isn’t yet released! But this tool will help you get your ASP.NET MVC 1.0 applications ready for when it is! I have updated the MVC App Converter to convert projects from ASP.NET MVC 1.0 to ASP.NET MVC 2 RTM. This should be last the last major change to the MVC App Converter… >>> More -
April 14th Links: ASP.NET, ASP.NET MVC, ASP.NET Web API and Visual Studio
as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
Here is the latest in my link-listing blog series: ASP.NET Easily overlooked features in VS 11 Express for Web: Good post by Scott Hanselman that highlights a bunch of easily overlooked improvements that are coming to VS 11 (and specifically the free express editions) for web development: unit… >>> More -
Use ASP.NET 4 Browser Definitions with ASP.NET 3.5
as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
We updated the browser definitions files included with ASP.NET 4 to include information on recent browsers and devices such as Google Chrome and the iPhone. You can use these browser definition files with earlier versions of ASP.NET such as ASP.NET 3 Read More......(read more) >>> More -
ASP.NET webforms + ASP.NET Ajax versus ASP.NET MVC and Ajax framework freedom
as seen on Stack Overflow - Search for 'Stack Overflow'
If given the choice, which path would you take? ASP.NET Webforms + ASP.NET AJAX or ASP.NET MVC + JavaScript Framework of your Choice Are there any limitations that ASP.NET Webforms / ASP.NET AJAX has vis-a-vis MVC? >>> More -
ASP.NET MVC 2 Released
as seen on ASP.net Weblogs - Search for 'ASP.net Weblogs'
I’m happy to announce that the final release of ASP.NET MVC 2 is now available for VS 2008/Visual Web Developer 2008 Express with ASP.NET 3.5. You can download and install it from the following locations: Download ASP.NET MVC 2 using the Microsoft Web Platform Installer Download… >>> More
Related posts about Image Map
-
ASA hairpining: I basicaly want to allow 2 spokes to be able to communicate with each other.
as seen on Server Fault - Search for 'Server Fault'
ASA Spoke to Spoke Communication I have been looking at spke to spoke comms or "hairpining" for months and have posted on numerouse forums but to no avail. I have a Hub and spoke network where the HUB is an ASA Firewall version 8.2 * I basicaly want to allow 2 spokes to be able to communicate with… >>> More -
How do I map a java Map including another Map, as element, into hibernate *.hbm.xml
as seen on Stack Overflow - Search for 'Stack Overflow'
is there possibility to map something like: private Map<Website, Map<String, String>> parameterMaps = new HashMap<Website, Map<String, String>>(); Where 'Website' is my class having some strings attributes, and inner map should be some website specific url parts. I'd… >>> More -
Twitter Bootstrap styling conflicts with plug-ins like jqGrid and other third part libraries
as seen on Geeks with Blogs - Search for 'Geeks with Blogs'
Issues:The concern is that the Twitter Bootstrap framework is that some of their css selectors are simply too generic and have incompatibility issues and conflicts with most third party plug-ins and css libraries, like jQuery-UI and jqGrid.My most pressing concern is only with the generic selector… >>> More -
How to create multiboot flash drive
as seen on Super User - Search for 'Super User'
I've found a guide here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/ And found this menu.lst in my flash drive, which seems to be the one that I'm seeing when I boot using my flash drive: # This Menu Created by Lance http://www.pendrivelinux.com # Ongoing Suggested Menu… >>> More -
Image anotation (Highlighting parts of an image, Scrubbing an image) using Javascript
as seen on Stack Overflow - Search for 'Stack Overflow'
Hi, We are working on an application and would like users to annotate an image. By annotation I mean, the ability to highlight parts of an image. Once the image is highlighted, and submit is clicked, the highlighted attributes (color, area highlighted) are submitted to the server to be stored in… >>> More