Gimp Guillotine Follow Up Table and Image Map Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Gimp Guillotine Follow Up Table and Image Map Tutorial

Gimp Guillotine Follow Up Table and Image Map Tutorial

The recent Gimp Guillotine Follow Up Canvas Tutorial had us with โ€œjigsaw pieced togetherโ€ image representations for โ€ฆ

  • Div Margin
  • Canvas

โ€ฆ and today we add to that โ€ฆ

  • Table
  • Image Map

โ€ฆ inspired by existant GIMP functionalities, respectively โ€ฆ

  • Filters -> Web -> Sliceโ€ฆ
  • Filters -> Web -> Image Mapโ€ฆ

We service these new functionalities by new โ€œaโ€ link hashtags. We also add to the viewing adaptability by encasing all these display options within the (introduced with HTML5) details tag and its nested summary tag โ€œrevealersโ€. These great HTML elements can help clarify situations where there are many choices but the user is in all likelihood wanting to focus on just one at a time. These details/summary tags are initially set โ€œclosedโ€ for lack of clutter but as a user clicks on an associated โ€œaโ€ link hashtag they are โ€œopenedโ€ on the fly via (the (pseudo) Javascript) โ€ฆ



document.getElementById([detailTagObjectID]).open=true;

So see how we got to the new PHP gimp_guillotine_followupโšซphp today changed in thisway and, again, it is more than likely you will use this PHP with a local web server like MAMP.



Previous relevant Gimp Guillotine Follow Up Canvas Tutorial is shown below.

Gimp Guillotine Follow Up Canvas Tutorial

Gimp Guillotine Follow Up Canvas Tutorial

The second of the non-primer tutorial themes to improve and build on yesterdayโ€™s Gimp Guillotine Follow Up Div Margin Tutorial โ€ฆ



HTML div element housing HTML img elements (no position: absolute like we like so much for overlay work) using style property margin-left and HTML br (line break) element (which sometimes requires negative margin-top tweaking)

โ€ฆ involves the ever useful canvas element introduced with HTML5 as per โ€ฆ



HTML canvas element object's drawImage method helps draw HTML img elements positionally so as to recreate the original image look from constituent "jigsaw image element" HTML img elements

Letโ€™s take a step back, reread Emoji Border or Background Image Canvas Tutorial โ€ฆ

Whatโ€™s the big deal with the HTML5 canvas element? For a few things โ€ฆ

  • the HTML5 canvas element right click or two finger gesture functionality includes Copy options โ€ฆ
  • the canvas can collect both images and text and be able to summarize that into โ€ฆ
  • a single image can be derived from the canvas element, encapsulating its contents โ€ฆ so that โ€ฆ
  • the canvas element can export that graphical content into a data URI that involves no absolute URLs โ€ฆ and so ties in nicely with โ€ฆ
  • email attachments can go hand in hand with the canvas element via a serverside function such as PHPโ€™s mail function to enhance sharing functionalities

โ€ฆ because it is both pertinent to this project and shows how the canvas element is such a great generic โ€œgraphicโ€ sharing element. Express all its content by data URIs and you have a totally โ€œmobileโ€ and transportable container of graphical or pixel data.

The PHP gimp_guillotine_followupโšซphp today changed for canvas use thisway and it is more than likely you will use this PHP with a local web server like MAMP. We hope this gives you ideas, and please feel free to download this PHP.


Previous relevant Gimp Guillotine Follow Up Div Margin Tutorial is shown below.

Gimp Guillotine Follow Up Div Margin Tutorial

Gimp Guillotine Follow Up Div Margin Tutorial

The first non-primer tutorial theme to improve and build on the recent Gimp Guillotine Follow Up Primer Tutorial are a series of representations to put the Gimp Guillotine โ€œjigsaw image piecesโ€ back together to make humpty dumpty โ€ฆ down, Nala โ€ฆ representations of the original image back for the user. Sounds a bit counterproductive, but these are all steps in a process to eventually be able to do quite a bit we hope. Todayโ€™s โ€œfirst cab off the rankโ€ representation is โ€ฆ



HTML div element housing HTML img elements (no position: absolute like we like so much for overlay work) using style property margin-left and HTML br (line break) element (which sometimes requires negative margin-top tweaking)

Gasp, how rudimentary! But sometimes the rudimentary things are the best. We display this โ€œpieced back together original imageโ€ data (from the data you guillotined (which may not be the whole picture, as with todayโ€™s data we test)) in three different ways โ€ฆ

  • an โ€œaโ€ link hashtag navigates the user below the fold to the โ€œpieced back together original imageโ€
  • another โ€œaโ€ link hashtag navigates the user to a new window with the โ€œpieced back together original imageโ€
  • a new type=submit name=divmarginuse button of the HTML form is an alternate processing option that automatically โ€œunderlaysโ€ (you say underlay, I say overlay, we go) the โ€œpieced back together original imageโ€ under whatever webpage data appears at the top left, with an opacity less than 1 (ie. 0.5 to show with some transparency), this โ€œunderlayโ€ being position:absolute but not asking that of an pre-existant webpage data โ€ฆ it is added dynamically via Javascript DOM techniques

This last optionโ€™s usage we find pretty efficient, and you can read more on this at HTML Multiple Form Multiple Submit Buttons Primer Tutorial. As you might surmise, weโ€™ll be adding more of these as time goes on, and we dip our toes into the myriad number of representations of this โ€œpieced back together original imageโ€ data we visit.

The PHP gimp_guillotine_followupโšซphp today changed thisway it is more than likely you will use this PHP with a local web server like MAMP (though into the future we may offer a command line mode of use).

Hopefully todayโ€™s tutorial picture makes what we are talking about here more clear for you.


Previous relevant Gimp Guillotine Follow Up Primer Tutorial is shown below.

Gimp Guillotine Follow Up Primer Tutorial

Gimp Guillotine Follow Up Primer Tutorial

Still on yesterdayโ€™s Gimp Image Map HTML Primer Tutorialโ€˜s Gimp themes do you remember us saying, relating to GIMP โ€ฆ

โ€ฆ precursor to being able to break an image into component parts via โ€œImage -> Transform -> Guillotineโ€ or the more enticing, for those web developers out there, โ€œFilters -> Web -> Sliceโ€ which effectively does what Guillotine does and writes out some HTML in the form of an HTML table element that includes some โ€œaโ€ link opportunities to do something special for individual images of the new โ€œimage jigsawโ€ surrounded by Guides

โ€ฆ down below? Well, yes, today is a revisit to the โ€œGuillotineโ€ bit of that, because it is all well and good to use โ€œFilters -> Web -> Sliceโ€ for a fait accompli HTML table โ€œslicingโ€ approach, but as you can imagine, there are lots of reasons, such as responsive design, why you might want to stop at the โ€œGuillotineโ€ โ€œjust give me the images, manpersonโ€ stage and from there, do your own thingthang, manperson.

Weโ€™re just starting down the road of this today in our โ€œPrimerโ€ tutorial, just being able to either โ€ฆ

  1. image creation method โ€ฆ
    • start GIMP and listen out for new images created โ€ฆ weโ€™re hoping via โ€œImage -> Transform -> Guillotineโ€ โ€ฆ or โ€ฆ
    • specify your own filespec of images โ€ฆ weโ€™re hoping got there via โ€œImage -> Transform -> Guillotineโ€
  2. list those image files โ€ฆ
  3. show those image files

GIMP being a desktop application, you might have guessed that weโ€™d use a serverside language for this work, and yes, weโ€™re using PHP gimp_guillotine_followupโšซphp today, but donโ€™t show you any live run links because it is more than likely you will use this PHP with a local web server like MAMP (though into the future we may offer a command line mode of use).

So please feel free to download that PHP and/or see its approach via todayโ€™s tutorial picture.


Previous relevant Gimp Image Map HTML Primer Tutorial is shown below.

Gimp Image Map HTML Primer Tutorial

Gimp Image Map HTML Primer Tutorial

As we intimated yesterday with Gimp Guides to HTML Primer Tutorial regarding the GIMP image editorโ€™s โ€œFilters -> Webโ€ menu โ€ฆ

โ€ฆ you would also see an โ€œImage Mapโ€ option helping out in a similar fashion to the stupendous mobilefish functionality.

โ€ฆ and so we are here today to show you how that functionality works via a PDFโœ‚slideshow for your perusal. There are options to shape what goes into the resultant HTMLโ€™s map elementโ€™s area (as rectangle or ellipse or polygon) tag href property link types as per โ€ฆ

โ€ฆ as a very extensive ideas list on top of options to define event logic for โ€ฆ

  • onmouseover
  • onmouseout
  • onfocus
  • onblur

โ€ฆ and that there is the option to define exact co-ordinates, and to define the alt attribute and HTML iframe name as applicable, also.

Weโ€™ll leave you with the resultant HTML we had GIMP create for us as a result of the goings on in that PDF slideshow (noting that the only adjustment to HTML in out TextWrangler editing session was to point at the image img element src attribute location properly), and we hope this is of benefit for you โ€ฆ



<img src="mondrian-1504681_640.jpg" width="640" height="480" 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:User -->

<area shape="rect" coords="0,1,36,132" href="mailto:?body=w_1_1&subject=Mondrian%20Composition%20with%20Read%20Yellow%20and%20Blue" />

<area shape="rect" coords="51,0,118,128" href="mailto:?body=y_2_1&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="136,1,295,133" href="mailto:?body=b_3_1&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="310,1,500,132" href="mailto:?body=r_4_1&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="514,0,566,131" href="mailto:?body=y_5_1&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="583,1,596,130" href="mailto:?body=w_6_1&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="0,146,36,293" href="mailto:?body=w_1_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="50,145,119,294" href="mailto:?body=w_2_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="134,146,295,292" href="mailto:?body=w_3_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="310,146,375,294" href="mailto:?body=w_4_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="391,147,498,294" href="mailto:?body=w_5_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="514,144,567,294" href="mailto:?body=r_6_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="582,146,597,385" href="mailto:?body=w_7_2&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="0,309,36,479" href="mailto:?body=w_1_3&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="51,308,119,386" href="mailto:?body=w_2_3&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="133,307,374,385" href="mailto:?body=r_3_3&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="390,307,499,385" href="mailto:?body=w_4_3&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="514,309,569,384" href="mailto:?body=y_5_3&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="51,399,118,481" href="mailto:?body=b_2_4&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="132,400,375,479" href="mailto:?body=y_3_4&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="390,400,568,481" href="mailto:?body=w_4_4&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

<area shape="rect" coords="582,399,597,479" href="mailto:?body=w_5_4&subject=Mondrian%20Composition%20with%20Red%20Yellow%20and%20Blue" />

</map>


Previous relevant Gimp Guides to HTML Primer Tutorial is shown below.

Gimp Guides to HTML Primer Tutorial

Gimp Guides to HTML Primer Tutorial

The great GIMP image editor has several ways to create Guides, which are the precursor to being able to break an image into component parts via โ€œImage -> Transform -> Guillotineโ€ or the more enticing, for those web developers out there, โ€œFilters -> Web -> Sliceโ€ which effectively does what Guillotine does and writes out some HTML in the form of an HTML table element that includes some โ€œaโ€ link opportunities to do something special for individual images of the new โ€œimage jigsawโ€ surrounded by Guides. Within the options of that last menu you would also see an โ€œImage Mapโ€ option helping out in a similar fashion to the stupendous mobilefish functionality.

With this in mind, we almost immediately thought of the great Piet Mondrian and his rectangle paintings in primary colours, wondering if by now you could get image downloads of his work, given he died some time ago now. And yes, there at this Pixabay webpage, thanks, we were able to do that and download an image version of โ€œComposition with Red Yellow and Blueโ€ to open with GIMP.

Which ways, then, in GIMP, can you create Guides?

  • precise Horizontal or Vertical position specification in pixels (via Image -> Guides -> New Guideโ€ฆ) or percentage (via Image -> Guides -> New Guide (by Percent)โ€ฆ) values
  • position via a Selection (via Image -> Guides -> New Guides from Selection) โ€ฆ and todayโ€™s method of choice โ€ฆ
  • user long hover then drag of the rulers at the top and left for dynamic Horizontal and Vertical Guides respectively

Best for this is that you can see us doing this with YouTube video we made for the purpose on our MacBook Pro using QuickTime Player โ€œFile -> New Screen Recordingโ€ resultant presentation you can play below.

โ€ฆ and the resultant HTML code snippet, including our bits, produced looked like โ€ฆ



<!--HTML SNIPPET GENERATED BY GIMP

 

WARNING!! This is NOT a fully valid HTML document, it is rather a piece of

HTML generated by GIMP's py-slice plugin that should be embedded in an HTML

or XHTML document to be valid.

 

Replace the href targets in the anchor (<a >) for your URLS to have it working

as a menu.

 

 

Thanks for viewing.


-->

<table cellpadding="0" border="0" cellspacing="0">

<tr>

<td><img alt=" " src="blue_0_0.jpg" style="width: 51px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_1.jpg" style="width: 70px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_2.jpg" style="width: 11px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_3.jpg" style="width: 164px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_4.jpg" style="width: 95px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_5.jpg" style="width: 110px; height: 4px; border-width: 0px;"></td>

<td><img alt=" " src="blue_0_6.jpg" style="width: 139px; height: 4px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_1_0.jpg" style="width: 51px; height: 128px; border-width: 0px;"></td>

<td><a href="#"><img alt=" " src="blue_1_1.jpg" style="width: 70px; height: 128px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_1_2.jpg" style="width: 11px; height: 128px; border-width: 0px;"></a></td>

<td><a title='blue' onclick="alert('Am I blue?');" href="#"><img alt=" " src="blue_1_3.jpg" style="width: 164px; height: 128px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_1_4.jpg" style="width: 95px; height: 128px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_1_5.jpg" style="width: 110px; height: 128px; border-width: 0px;"></a></td>

<td><img alt=" " src="blue_1_6.jpg" style="width: 139px; height: 128px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_2_0.jpg" style="width: 51px; height: 14px; border-width: 0px;"></td>

<td><a href="#"><img alt=" " src="blue_2_1.jpg" style="width: 70px; height: 14px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_2_2.jpg" style="width: 11px; height: 14px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_2_3.jpg" style="width: 164px; height: 14px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_2_4.jpg" style="width: 95px; height: 14px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_2_5.jpg" style="width: 110px; height: 14px; border-width: 0px;"></a></td>

<td><img alt=" " src="blue_2_6.jpg" style="width: 139px; height: 14px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_3_0.jpg" style="width: 51px; height: 147px; border-width: 0px;"></td>

<td><a href="#"><img alt=" " src="blue_3_1.jpg" style="width: 70px; height: 147px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_3_2.jpg" style="width: 11px; height: 147px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_3_3.jpg" style="width: 164px; height: 147px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_3_4.jpg" style="width: 95px; height: 147px; border-width: 0px;"></a></td>

<td><a title='Blue' onclick="alert('Am i Blue?');" href="#"><img alt=" " src="blue_3_5.jpg" style="width: 110px; height: 147px; border-width: 0px;"></a></td>

<td><img alt=" " src="blue_3_6.jpg" style="width: 139px; height: 147px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_4_0.jpg" style="width: 51px; height: 107px; border-width: 0px;"></td>

<td><a href="#"><img alt=" " src="blue_4_1.jpg" style="width: 70px; height: 107px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_4_2.jpg" style="width: 11px; height: 107px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_4_3.jpg" style="width: 164px; height: 107px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_4_4.jpg" style="width: 95px; height: 107px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_4_5.jpg" style="width: 110px; height: 107px; border-width: 0px;"></a></td>

<td><img alt=" " src="blue_4_6.jpg" style="width: 139px; height: 107px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_5_0.jpg" style="width: 51px; height: 78px; border-width: 0px;"></td>

<td><a title='BLUE' onclick="alert('Am i BLUE?');" href="#"><img alt=" " src="blue_5_1.jpg" style="width: 70px; height: 78px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_5_2.jpg" style="width: 11px; height: 78px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_5_3.jpg" style="width: 164px; height: 78px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_5_4.jpg" style="width: 95px; height: 78px; border-width: 0px;"></a></td>

<td><a href="#"><img alt=" " src="blue_5_5.jpg" style="width: 110px; height: 78px; border-width: 0px;"></a></td>

<td><img alt=" " src="blue_5_6.jpg" style="width: 139px; height: 78px; border-width: 0px;"></td>

</tr>

<tr>

<td><img alt=" " src="blue_6_0.jpg" style="width: 51px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_1.jpg" style="width: 70px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_2.jpg" style="width: 11px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_3.jpg" style="width: 164px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_4.jpg" style="width: 95px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_5.jpg" style="width: 110px; height: 2px; border-width: 0px;"></td>

<td><img alt=" " src="blue_6_6.jpg" style="width: 139px; height: 2px; border-width: 0px;"></td>

</tr>

</table>

We hope you find these GIMP โ€œSlice and Diceโ€ webpage creation ideas of interest.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *