सामग्री पर जाएँ

सहायता:चित्र जोड़ना

विकिपुस्तक से

चित्र किसी पुस्तक में सूचना देने तथा संप्रेषण करने के महत्वपूर्ण साधन हो सकते हैं। सही रूप में लगाए गए चित्र पुस्तक के पृष्ठ की प्रस्तुति को बहुत बढ़िया बना देते हैं।



From Wikipedia's image syntax guide, the general syntax for including an image is:

[[File:{name}|{type}|{location}|{size}|{border}|{caption}]]

{name} is the name of the image file, e.g. Commons-logo.svg, either stored here on Wikibooks or on Wikimedia Commons. All images need to have a name specified.

{type} is the type of formatting the image has. "thumb" makes the image a thumbnail and puts it in a box and resizes the image if it is larger than the thumbnail size value set in the user preferences under the Files tab. The default is 180px, and this is used for people without an account or who are not logged in. "frame" puts the image in a box and doesn't resize it. Not putting in a type will just put the image in without a box at its original size, unless a size is given.

{location} is where the image will be put on the page. "left", "right", and "center" put the image on either the left or right side of the page, or in the center of the page, respectively, and wrap the text around the image. "none" puts the image under the text and puts following text underneath it. If you don't put in a location the image is included inline with the text.

{size} is the width of the image in pixels, written as the number of pixels followed by px, E.g. 200px for 200 pixels width. The image will be scaled to maintain aspect ratio to fit into this size. Images can be scaled up or down. If not used then image is shown at full size, or if it is a thumbnail, then the maximum size of a thumbnail. With thumbnails the size option won't work if you try to make the image larger, even if it is still below the limit for images being resized in thumbnails (180px by default), and the image will remain its normal size in the thumbnail if you try. But you can still make the picture smaller if you want by using a size less than the images original width and less than the thumbnail size.

{border} just gives the image a gray line border, by using "border" as one of the options. Not giving a border will leave the image without a border, unless it already has one from the type.

{caption} is the alternate text of the image that you see when you hold the mouse over it. It is also used as the caption text for images using "thumb" or "frame". Wikiformatting can be used in this, E.g. links, but the formatting is removed for the alternate text and only shown in captions. If no caption is given, the filename is used as alternate text, and the caption on a frame or thumb is left blank.

The order of the options shouldn't matter except for the name part. Using thumb and frame at the same time will just default to frame. Using multiple locations in the image will make the image use whatever location was given last. Same thing with multiple sizes.

चित्र जोड़ना

[सम्पादन]

सामान्य रूप से किसी चित्र को पृष्ठ में केवल उसका नाम टाइप कर लगा सकते हैं। अंग्रेजी में यह फाइल का नाम इस रूप में होता है- [[File:ImageName]]। हिंदी में चित्र का नाम इस रूप में हो सकता है-[[चित्र:चित्रनाम]]। विकि पुस्तक पृष्ठों पर अंग्रेजी और हिंदी दोनों तरह के नाम रखे जा सकते हैं। नाम उसी रूप में रखें जिस रूप में चित्र का नाम कॉमन्स या विकि पुस्तक पर पहले से हो।

इस तरह चित्र का नाम किसी भी पृष्ठ पर लिखने से चित्र पृष्ठ में जुड़ जाएगा किंतु वह पूरे आकार में रहेगा और पाठ के साथ सही रूप में लगा हुआ दिखाी नहीं देगा। यह नीचे प्कीरदर्शित चित्र की तरह दिखाई देगा।

जोड़ा गया

[[File:Vista-folder.png]]

to the middle of the text makes

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante. Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. आप मानेंगे कि यह ठीक दिखाई नहीं दे रहा है। पाठ चित्र के साथ ठीक से नहीं लगा हुआ है और चित्र बहुत बड़ा है।

चित्र लगाना

[सम्पादन]

चित्र के कोड को थोड़ा बदलकर हम पृष्ठ पर चित्र की स्थिति को निर्धारित कर सकते हैं। हमारे पास चुनने के लिए कई विकल्प उपलब्ध हैं। पुस्तक के पृष्ठ की जरूरत के अनुरूप हम इनको चुन सकते हैं।

उदाहरण के, दायीं तरफ, पाठ लगा हुआ

[सम्पादन]
[[File:Vista-folder.png|right]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Phasellus orci. Etiam tempor elit auctor magna. Nullam nibh velit, vestibulum ut, eleifend non, pulvinar eget, enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer velit mauris, convallis a, congue sed, placerat id, odio. Etiam venenatis tortor sed lectus. Nulla non orci. In egestas porttitor quam. Duis nec diam eget nibh mattis tempus. Curabitur accumsan pede id odio. Nunc vitae libero. Aenean condimentum diam et turpis. Vestibulum non risus.

हम देख सकते हैं कि चित्र पृष्ठ में दायीं तरफ पाठ के साथ लगा हुआ है।

उदाहरण के, दायीं तरफ, पाठ लगा हुआ, अनुशीर्षक सहित

[सम्पादन]

Example Two, Right Align, With Caption, Wrapped Text

[सम्पादन]
[[File:Vista-folder.png|frame|right|Caption goes here]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Caption goes here

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Phasellus orci. Etiam tempor elit auctor magna. Nullam nibh velit, vestibulum ut, eleifend non, pulvinar eget, enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer velit mauris, convallis a, congue sed, placerat id, odio. Etiam venenatis tortor sed lectus. Nulla non orci. In egestas porttitor quam. Duis nec diam eget nibh mattis tempus. Curabitur accumsan pede id odio. Nunc vitae libero. Aenean condimentum diam et turpis. Vestibulum non risus.

Here we can see how the image has been placed on the right hand side of the page with a caption underneath and the text wraps around it.

Example Three, Left Align, Wrapped Text

[सम्पादन]
[[File:Vista-folder.png|left]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Here we can see how the image has been placed on the left hand side of the page and the text wraps around it.

Example Four, Text Not Wrapped

[सम्पादन]
[[File:Vista-folder.png|none]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

Here we can see how the image appears to be completely separate to the text.

Resizing an Image

[सम्पादन]
[[File:Vista-folder.png|25px]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante. Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla.

अंगूठाकार चित्र

[सम्पादन]

If you wish to add a caption to an image and resize it, use 'thumb' instead of 'frame'.

[[File:Vista-folder.png|75px|thumb|right|Caption goes here]]

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis tellus. Donec ante dolor, iaculis nec, gravida ac, cursus in, eros. Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu egestas ante nisl non justo. Fusce tincidunt, lorem nec dapibus consectetuer, leo orci mollis ipsum, eget suscipit eros purus in ante.

Caption goes here

Mauris at ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non, venenatis vel, lorem. Sed lacinia. Suspendisse potenti. Sed ultricies cursus lectus. In id magna sit amet nibh suscipit euismod. Integer enim. Donec sapien ante, accumsan ut, sodales commodo, auctor quis, lacus. Maecenas a elit lacinia urna posuere sodales. Curabitur pede pede, molestie id, blandit vitae, varius ac, purus. Morbi dictum. Vestibulum adipiscing pulvinar quam. In aliquam rhoncus sem. In mi erat, sodales eget, pretium interdum, malesuada ac, augue. Aliquam sollicitudin, massa ut vestibulum posuere, massa arcu elementum purus, eget vehicula lorem metus vel libero. Sed in dui id lectus commodo elementum. Etiam rhoncus tortor. Proin a lorem. Ut nec velit. Quisque varius. Proin nonummy justo dictum sapien tincidunt iaculis. Duis lobortis pellentesque risus. Aenean ut tortor imperdiet dolor scelerisque bibendum. Fusce metus nibh, adipiscing id, ullamcorper at, consequat a, nulla. ← Advanced Techniques · चित्र जोड़ना · Wikipedian Primer →