Gimp提供了一个名为 Gimp 图像映射的插件/过滤器,它有一个很好的界面来帮助创建图像映射。我认为它将提供您正在寻找的功能。选择Filters -> Web -> Image Map...
以弹出对话框
打开 Image Map 对话框后,您可以创建令人愉悦的多边形区域:
您可以根据需要创建和自定义区域,如修改链接、替代文本、框架、多边形本身,甚至设置 javascript 事件。
完成后,保存它,您将能够使用刚刚保存在 html 中的片段
<img src="us_map.gif" width="771" height="448" border="0" usemap="#map" />
<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:Colin Harrington -->
<area shape="poly" coords="149,292,254,332,308,41,262,33,232,27,169,14,120,9,102,52,92,190" alt="West Coast" href="wc.html" />
<area shape="poly" coords="474,267,522,368,574,62,465,17,422,19,326,51,284,161,293,224,322,250,363,219,419,222" alt="Midwest" href="mw.html" />
<area shape="poly" coords="634,58,583,74,527,360,670,419,757,180,770,65,770,24,705,10,735,29" alt="East Coast" href="ec.html" />
<area shape="poly" coords="380,251,379,285,458,300,464,363,413,426,330,373,287,317,335,323,340,250" alt="Texas" href="tx.html" />
</map>