GNOME Bugzilla – Bug 124353
Imagemap should use style properties for height,width,border instead of old attributes
Last modified: 2018-05-24 10:56:07 UTC
Description of Problem: Imagemap should use CSS properties height,width,border instead of the old style HTML attributes height,width,border Steps to reproduce the problem: 1. Create any imagemap 2. Look at the generated html code Actual Results: height="256" width="256" border="0" (in img tag) Expected Results: style="height:256px;width:256px;border:0" (instead of separate attributes) How often does this happen? Always Additional Information: See css at w3.org if unfamiliar
Changed this bug to an enhancement. It's not a completely trivial change because of two reasons: 1) I will have to adapt the scanner/parser so the plug-in will correctly read the changed format and stay compatible with the `old' format. 2) I would like to make css support an option (maybe default) so imagemap can still generate the old format.
I converted a sample output from Image Map to use css in two different ways. The document should be attached.
Created attachment 20645 [details] converted imagemap spew
Created attachment 20646 [details] converted imagemap spew
In the first example, imagemap should not spit out the <head> <style type="text/css"> img.map { width:489px; height:437px; border:none; } </style> </head> part imho (a required element, title, is missing), but rather something like <!-- put the following <style ...>...</style> into the head of your document <style type="text/css"> img.map { width:489px; height:437px; border:none; } </style> --> An option to suppress the output of the <style> should be provided, too.
Can you please specify the GIMP version you are reporting this problem against. A bug-report w/o version information is pretty much useless.
Changed version number. Problem report is applicable for all releases, but we are not going to make enhancements on the 1.2.x series.
I suggest keeping the style in the img tag instead of moving it to the head because you would like to concatenate the resulting html file with other stuff to make a web page. If you add a head, and you keep the body, the maintainer of the web page needs to split the two apart and throw out the head tags, etc. each edit cycle. On the other hand, if the style is inline, the maintainer of the website only needs to concatenate the output of the imagemap plugin with whatever goes above and below it. The specific image must have these dimentions anyway because that's how image maps work, so please put it as an attribute of the image itself. Please don't create a style element which would often need to be located separately in the resulting HTML document. (principle: keep related things together) Mahalo (thanks)
sp. dimensions (above) please don't flame.
Shouldn't block the 2.2 release so I am changing the milestone accordingly. Of course if Maurits add this feature during the next days, that's fine.
I will start working on this as soon as I'm ready with the code cleanup for the imagemap plug-in.
Bumping to Future since this is not a blocker for 2.4.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/53.