1234567891011 |
- version=pmwiki-2.1.1 ordered=1 urlencoded=1
- agent=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
- author=
- csum=
- host=80.129.137.105
- keywords=graphics, pictures, photos
- name=PmWiki.Images
- rev=56
- targets=PmWiki.DocumentationIndex,PmWiki.Uploads,PmWiki.InterMap,PmWiki.Links,PmWiki.WikiStyles
- text=!!Placing images in pages%0a%0aTo place an image into a page, enter the address (url) of the image into the markup text. Any ''alternate text'' (used for tooltips and for browsers that do not display images) is placed in double quotes immediately following the image url.%0a%0a(:markup:) [=%0ahttp://www.pmichaud.com/img/misc/pc.jpg"Paper clips"%0aPaper clips are fun to work with.%0a=]%0a%0aImages can also be specified as [[upload(s)]]ed files (i.e., [@Attach:image.jpg@]) and using [[InterMap]] links. Any file that ends in .gif, .jpg, .jpeg, or .png will be automatically treated as an image. %25note%25 (See [[#notes|Notes]] below for image files that lack extensions.)%0a%0aTo create a [[link(s)]] to an image (like [[http://www.pmichaud.com/img/misc/pc.jpg]] as opposed to displaying the image itself), use double brackets to mark the link, as in [@[[http://www.pmichaud.com/img/misc/pc.jpg]]@] or [@[[Attach:image.jpg]]@].%0a%0aTo have an image link to another location, use the image as the link text as in [@[[http://www.pmwiki.org | Attach:image.jpg"PmWiki"]]@].%0a%0a!! Captions and floating images%0a%0aA caption can be added to an image using a vertical brace and the caption text.%0a%0a(:markup:) [=%0ahttp://www.pmichaud.com/img/misc/pc.jpg"Paper clips" | '''Figure 1'''%0a=]%0a%0aNormally, images are displayed "in line" with the surrounding text. To left or right-align an image with text wrapping around it, use the [@%25lfloat%25@] or [@%25rfloat%25@] [[WikiStyles]].%0a%0a(:markup:) [=%0a%25lfloat%25 http://www.pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0aThe image is left-aligned, and the text wraps on the right side of the image.%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %0a=]%0a%0aThe [@[[%3c%3c]]@] markup breaks floating text, and the text continues at the bottom of the image.%0a%0a(:markup:) [=%0a%25lfloat%25 http://www.pmichaud.com/img/misc/gem.jpg%0aThe image is left-aligned, and the text wraps on the right side of the image. The text after the ''[@[[%3c%3c]]@]'' markup continues below the image.%0a[[%3c%3c]]%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %0a=]%0a%0aUse the [@%25lframe%25@] or [@%25rframe%25@] styles to float an image and place a frame around the image and its caption:%0a%0a(:markup:) [=%0a%25rframe%25 http://www.pmichaud.com/img/misc/gem.jpg | '''Rock on!'''%0aThe image is right-aligned, and the text wraps on the left side of the image.%0a%0aLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.%0a%0a%25cframe width=100px bgcolor=lightblue%25 http://www.pmichaud.com/img/misc/gem.jpg%0a=]%0a%0aUse [@%25center%25@] to center an image. Use [@%25right%25@] to right align an image, without floating it.%0a%0a(:markup:) [=%0a%25center%25http://www.pmichaud.com/img/misc/pc.jpg"Paper clips" | Paper clips are fun to work with %0a%0a%25right%25 http://www.pmichaud.com/img/misc/gem.jpg | Rock on!%0a=]%0a%0a!!Resizing images [[#resizing]]%0a%0aTo resize an image, use [@%25width=50px%25@] or [@%25height=50px%25@] in front of an image. The [@%25thumb%25@] wikistyle is a helpful shortcut for [@%25width=100px%25@].%0a%0a(:markup:) [=%0a%25width=50px%25 http://www.pmichaud.com/img/misc/bubble.jpg \%0a%25height=50px%25 http://www.pmichaud.com/img/misc/bubble.jpg \%0a%25thumb%25 http://www.pmichaud.com/img/misc/bubble.jpg%0a=]%0a%0aResizing an image only affects how it is displayed in a browser; it does not reduce the transfer size of the image itself.%0a%0aResized images using [@%25thumb%25@] can also be floated with frames, as well as made into links.%0a%0a(:markup:) [=%0a%25lframe thumb%25 [[http://www.pmichaud.com/img/misc/bubble.jpg | http://www.pmichaud.com/img/misc/bubble.jpg"Burst the bubble"]] | [-Bubble-]%0a%25lframe thumb%25 http://www.pmichaud.com/img/misc/pc.jpg"Clip the ticket" | [-Paper Clips-]%0a%25lframe thumb%25 [[DocumentationIndex | http://www.pmichaud.com/img/misc/gem.jpg"Visit the Documentation Index"]] | [[DocumentationIndex | [-Rock On-]]]%0a=]%0a%0a[[#notes]]%0a!!!Notes%0a* '''An image file that lacks a correct extension''' can be displayed by addition of a "false" extension to the URL. For example, if the url is [@http://www.example.com/script/tux@], add a fake query string on the end with the desired extension (e.g., [@http://www.example.com/script/tux?format=.png@]). If query strings are unsuitable, a fragment identifier should work, e.g. [@http://www.example.com/script/tux#file.png@].%0a%0a!!!See also%0a* [[Cookbook:BackgroundImages]] - adding background images to divisions, tables and table cells. %0a%0a!!!Credits%0aThe images on this page were obtained from http://www.flickr.com and are redistributed under a Creative Commons License.%0a%0a%25trail%25 %3c%3c|[[DocumentationIndex]]|>>%0a(:keywords graphics, pictures, photos:)
- time=1142416738
|