Editing Wikitext/Pictures/Tiled Images
Pelargonium: 'Geranium'; 300x225 pixels
Pink Gerbera: 300x225 pixels
All in a Line
mages are easily placed in a line without the use of an image container, and most associate this kind of line-up with the notion of floating images; that is to say, if one too many of these images is added, the last one will just float to another page position rather than anchoring itself where it was put. The simplest method for an image line-up depends on limiting the image options to the minimum. Specify only the image names and their sizes, and disregard all other options, otherwise the method might become problematic. The image syntax can be written all in one line, or in successive lines, and an example of the coding to use has been included in a drop-box for the adjacent line-up of images.
Notice that the example shown has no captions, since captions can only be used in the frame or thumbnail format. However, by using templates such as Noframeleft for the images in such a lineup, tiled images with captions can be obtained. A set of these templates has been made to include all of the image positions.
A thin dividing space has been made between adjacent images by inserting a single space character between the image definitions. To set the images edge to edge without any space between them, simply omit the space characters. Because we rarely want to start an image line-up at the left margin of the page, it is useful to have a means of padding out the images. In fact, a transparent, blank image has been uploaded to the image collection for that purpose; it is called Padding.gif, and it can be sized on the page like any other image. Refer to the code notes for an example of its use. (Another method, capable of precise positioning, is described in the next section).
Images are rarely the size that you would prefer them to be and this is especially the case when the images are set side by side. There is a method to get the images standardized. Consider the image line-up. Because these images were greatly different in their initial shapes, and their exact dimensions were laborious to find, it was decided to set their heights to be the same, and to allow the widths to be scaled accordingly. The method to do this, shown in the code box below, is to specify the important dimension exactly, in this case the height, while greatly exaggerating the size of the less important dimension, the width. Note that some dimension for width is required, but its exact value need not be known. The software will use the smaller and more practical possibility, ignoring the implied larger scaling. In this way the vastly different shapes can be scaled without having to make calculations based on both width and height.
ost image positioning is restricted to the three preset locations. These of course are, left, right, and center. However, with the help of a little in-line HTML, images, tables, text paragraphs and other structures can be placed anywhere on the page. In particular, this means that an image can be placed at a point relative to its position as expected by other code. To explain further, if the usual position for an image is at the left margin, according to the syntax used, then the addition of relative positioning code allows it to be shifted relative to that point, up or down, right or left, even beyond the margin. The pixel values for the vertical and horizontal shifts specify the exact extent of the displacements.
The main problem with this method, apart from its complexity, is that it will not deliver wrapped text for the placements. Like centered images, the text is restricted to following-on. Another problem concerns frames for the images; because shifting is applied to images within their immediate containers, all types of borders must be avoided. As a result of losing frames and thumbnail borders, all of the captions have to be arranged by other means.
To expand on the matter of text having to follow-on, it is perhaps helpful to note the sequence of events for relative positioning. When the image, box or other structure is first placed, it is allocated to the space without relative positioning; that is, as if the shifting code were missing or set to zeros. Then the code shifts the item to its new position by the amounts given by the shifting code. A space is left at the first location, equal in size to the item that was moved. When the next line of text or another item is added to the work, it must take account of that allocated space. As a result, when a large image or block of text is moved vertically, the following text cannot be located until after the gap.
Although it is theoretically possible to shift tables and large blocks of text, the above mentioned limitation renders it less useful. Relative positioning works best when the shifts and texts are fairly small. The method meets these requirements for shifting images that are initially tiled across the page, and for overlapping effects.
An example of overlapping images is given below. The normal position for these images, without shifting,would have been in-line, starting from the left margin, and the padding image has been omitted for this example. The images were shifted from these tiled positions by the required amounts to create the overlapping effect.
The paleness or density of images can be varied. The code for twenty percent opacity can be found in the drop-box along with an example of shifted text.
This is the text.
Two images can occupy the same space provided that only one of them is seen at a time. The usual way to do this is to hover the mouse over the default image, the one that is stable and seen most of the time. When this is done the alternative image replaces it, and when the mouse is removed, the original image reappears.
This technique is available using the template HoverImage. The names of the two images are provided to the template, along with any other image options, and two separate captions can be made. The method works best with images that are the same shape; that is, have the same aspect ratio. Then, with one base size setting, both will be scaled to the same size. When the shapes differ and the images change, the height or the width of the presented work changes too. Because the text adjusts in wrapping around the images the effect is not necessarily bad, and you can see this best for yourself by trying it in the sandbox. As was suggested elsewhere on this page, a method exists to allow fixing of image heights instead of widths, and this might suit some better.
In all other respects the template can be used as if it were a single image, with for example, text wrapping for the left and right positioned images. The template can be used in any situation that needs the full image syntax; for example, it could not be used to build gallery entries, since these use only an abbreviated image syntax; the image name. It could be used on a page, within tables and drop-boxes, and anywhere else that can make use of the full image syntax.
The image on the right shows an example of the template's use; more detailed notes can be found on the page Templates Ready to Use, and on the template page itself.
Other Pictures Pages