Difference between revisions of "Documentation/OOo3 User Guides/Writer Guide/Adding images"

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: {{DISPLAYTITLE: Adding images to a document - DRAFT}} {{Documentation/WG3GraphicsTOC |ShowPrevNext=block |PrevPage=Documentation/OOo3_User_Guides/Writer Guide/Working with Graphics |NextPa...)
 
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE: Adding images to a document - DRAFT}}
+
{{DISPLAYTITLE: Adding images to a document}}
 
{{Documentation/WG3GraphicsTOC
 
{{Documentation/WG3GraphicsTOC
 
|ShowPrevNext=block
 
|ShowPrevNext=block
Line 5: Line 5:
 
|NextPage=Documentation/OOo3_User_Guides/Writer Guide/Modifying an image
 
|NextPage=Documentation/OOo3_User_Guides/Writer Guide/Modifying an image
 
}}__notoc__
 
}}__notoc__
Images (also called ‘pictures’ in this guide) can be taken from a variety of sources. They may be downloaded from the Internet, scanned, or created with a graphics program; or they may be photos taken with a digital camera.
 
  
== Inserting an image from a file ==
+
==Creating and Editing Images==
In the case where the image is already available in a file stored on the computer, it can be immediately inserted in the Writer document. OOo can import various vector (line drawing) and raster (bitmap) file formats. The most common are GIF, JPEG or JPG, PNG, and BMP. See [[Documentation/OOo3_User_Guides/Writer Guide/Graphic file types|Graphic file types supported]]]] for a full list of supported graphic file types.
+
  
To insert an image from a file, proceed as follows:
+
You might create images (also called ‘pictures’ in OpenOffice.org) using a graphics program, scan them, or download them from the Internet (make sure you have permission to use them), or use photos taken with a digital camera. Writer can import various vector (line drawing) and raster (bitmap) file formats. The most common are GIF, JPG, PNG, and BMP. See the Help for a full list.
 +
Some things to consider when choosing or creating pictures include image quality and whether the picture will be printed in color or black and white (grayscale).
  
# Determine the destination for the image. Place the cursor at or near the appropriate location in the document.
+
To edit photos and other bitmap images, use a bitmap editor. To edit line drawings, use a vector drawing program. You do not need to buy expensive programs. Open-source (and usually no-cost) tools such as Gimp (bitmap editor) and Inkscape (vector drawing program) are excellent. For many graphics, OOo Draw is sufficient. These and many other programs work on Windows, Macintosh OS X, and Linux.
  
{{Documentation/Note| Do not worry too much about the exact placement of the image at this stage as this can be easily changed later as described in [[Documentation/OOo3_User_Guides/Writer Guide/Positioning graphics|Positioning graphics within the text]].}}
+
For best results:
  
# On the main menu, select '''Insert > Picture > From File'''. This displays the dialog box shown below.
+
* Create images that have the exact dimensions required for the document, or use an appropriate graphics package to scale photographs and large drawings to the required dimensions. Do not scale images with Writer, even though Writer has tools for doing this, because the results might not be as clear as you would like.
# Navigate to the file to be inserted, select it, and click '''Open'''.
+
  
[[Image:WG8-1.png|thumb|none|500px|''Insert picture dialog box.'']]
+
* Do any other required image manipulation (brightness and contrast, color balance, cropping, conversion to grayscale, and so on) in a graphics package, not in Writer, even though Writer has the tools to do a lot of these things too.
 +
 
 +
* If the document is meant for screen use only, there is no need to use high resolution images of 300 or more dpi (dots per inch). Most computer monitors work at between 72 and 96 dpi, reducing the resolution (and the file size) has no negative impact on what is displayed but does make Writer more responsive.
 +
 
 +
==Preparing Images for Black-and-White Printing==
 +
 
 +
If color images are to be printed in grayscale, check that any adjacent colors have good contrast and print dark enough. Test by printing on a black-and-white printer using a grayscale setting. Better still: change the “mode” of the image to grayscale, either in a photo editor or in Writer itself (see [[Documentation/OOo3_User_Guides/Writer_Guide/Modifying_an_image#Modifying an Image| Modifying an Image]]).
 +
 
 +
For example, the following diagram looks good in color. The circle is dark red and the square is dark blue. In grayscale, the difference between the two is not so clear. A third element in the diagram is a yellow arrow, which is almost invisible in grayscale.
 +
 
 +
[[Image:CH8_BlackWhitePrinting1.png|thumb|none|500px|''Original Drawing Colour to Printed Grayscale.'']]
 +
 
 +
Changing the colors of the circle and the arrow improves the contrast and visibility of the resulting grayscale image.
 +
 
 +
[[Image:CH8_BlackWhitePrinting2.png|thumb|none|500px|''Original Drawing Colour to Printed Grayscale.'']]
 +
 
 +
If the document will be available in black-and-white print only, a better result can often be obtained by choosing grayscale fills, not color fills — and you don’t have to guess and test to see if you’ve made good choices.
 +
 
 +
==Adding Images to a Document==
 +
 
 +
Images can be added to a document in several ways: by inserting an image file, directly from a graphics program or a scanner, or from the OOo Gallery.
 +
 
 +
 
 +
 
 +
== Inserting an image file ==
 +
 
 +
When the image is in a file stored on the computer, you can insert it into an OOo document using either of the following methods.
 +
 
 +
 
 +
===Drag and drop===
 +
<ol><li> Open a file browser window and locate the image you want to insert.
 +
<li> Drag the image into the Writer document and drop it where you want it to appear. A faint vertical line marks where the image will be dropped.</li></ol>
 +
 
 +
This method embeds (saves a copy of) the image file in the Writer document. To link the file instead of embedding it, hold down the ''Control+Shift'' keys while dragging the image.
 +
 
 +
 
 +
===Insert Picture dialog===
 +
<ol><li> Click in the OOo document where you want the image to appear.
 +
<li> Choose '''Insert > Picture > From File''' from the menu bar.
 +
<li> On the '''Insert Picture''' dialog, navigate to the file to be inserted, select it, and click '''Open'''.
 +
At the bottom of the dialog are two options, '''Preview''' and '''Link'''. Select Preview to view a thumbnail of the selected image on the right, so you can verify that you have the correct file. See below for the use of '''Link'''.</li></ol>
 +
 
 +
[[Image:CH8_InsertPictureDialog.png|thumb|none|500px| ''Insert Picture Dialog.'']]
 +
 
 +
{{Note| OOo can import various vector (line drawing) and raster (bitmap) file formats. The most common are GIF, JPEG or JPG, PNG, and BMP. See [[Documentation/OOo3_User_Guides/Writer Guide/Graphic file types|Graphic file types supported]] for a full list of supported graphic file types.}}
  
{{Documentation/Note| At the bottom of the Insert picture dialog box are two check boxes. If '''Preview''' is checked, the selected graphic file is previewed in a pane, as shown in Figure 1, so you can verify that you have the correct file. The '''Link''' option is discussed below.}}
 
  
 
=== Linking an image file ===
 
=== Linking an image file ===
Line 30: Line 71:
 
* Advantage – Linking can reduce the size of the document when it is saved, because the image file itself is not included. The file size is usually not a problem on a modern computer with a reasonable amount of memory, unless the document includes many large graphics files. Writer can handle quite large files.
 
* Advantage – Linking can reduce the size of the document when it is saved, because the image file itself is not included. The file size is usually not a problem on a modern computer with a reasonable amount of memory, unless the document includes many large graphics files. Writer can handle quite large files.
 
* Advantage – You can modify the image file separately without changing the document because the link to the file remains valid, and the modified image will appear when you next open the document. This can be a big advantage if you (or someone else, perhaps, a graphic artist) is updating images.
 
* Advantage – You can modify the image file separately without changing the document because the link to the file remains valid, and the modified image will appear when you next open the document. This can be a big advantage if you (or someone else, perhaps, a graphic artist) is updating images.
* Disadvantage – If you send the document to someone else, or move it to a different computer, you must also send the image files, or the receiver will not be able to see the linked images. You need to keep track of the location of the images and make sure the recipient knows where to put them on another machine, so the Writer document can find them. For example, you might keep images in a subfolder named Images (under the folder containing the Writer document); the recipient of the Writer file needs to put the images in a subfolder with the same name (under the folder containing the Writer document).
+
* Disadvantage – If you send the document to someone else, or move it to a different computer, you must also send the image files, or the receiver will not be able to see the linked images. You need to keep track of the location of the images and make sure the recipient knows where to put them on another machine, so the document can find them. For example, you might keep images in a subfolder named Images (under the folder containing the document); the recipient of the file needs to put the images in a subfolder with the same name (under the folder containing the document).  
  
{{Documentation/Note| When inserting the same image several times in the document, it might appear beneficial to create links; however, this is not necessary as OOo embeds in the document only one copy of the image file.}}
+
{{Note| When inserting the same image several times in the document, it might appear beneficial to create links; however, this is not necessary as OOo embeds in the document only one copy of the image file.}}
  
 
=== Embedding linked images ===
 
=== Embedding linked images ===
 
If you originally linked the images, you can easily embed one or more of them later if you wish. To do so:
 
If you originally linked the images, you can easily embed one or more of them later if you wish. To do so:
 
<ol>
 
<ol>
<li>Open the Writer document in OOo.</li>
+
<li>Open the Writer document in OOo and choose '''Edit > Links'''.</li>
<li>Choose '''Edit > Links''' from the menu bar.</li>
+
  
 
The Edit Links dialog box shows all the linked files. In the ''Source file'' list, select the files you want to change from linked to embedded.
 
The Edit Links dialog box shows all the linked files. In the ''Source file'' list, select the files you want to change from linked to embedded.
  
 
<li>Click the '''Break Link''' button.</li>
 
<li>Click the '''Break Link''' button.</li>
<li>Save the Writer document.</li>
+
<li>Save the document.</li>
  
[[Image:EditLinks3.png|thumb|none|500px|''The Edit Links dialog box.'']]
+
[[Image:EditLinksDialog.png|thumb|none|500px|''The Edit Links dialog box.'']]
 
</ol>
 
</ol>
  
{{Documentation/Note| Going the other way, from embedded to linked, is not so easy—you must delete and reinsert each image, one at a time, selecting the '''Link''' option when you do so.}}
+
{{Note| Going the other way, from embedded to linked, is not so easy—you must delete and reinsert each image, one at a time, selecting the '''Link''' option when you do so.}}
  
== Inserting images from other sources ==
 
You can insert images from sources other than a file:
 
  
* Graphics program
+
===Inserting an image from the clipboard===
* Scanner
+
* OOo Gallery
+
  
=== Graphics program ===
+
Using the clipboard, you can copy images into an OOo document from another OOo document and from other programs. To do this:
You can use many different graphics programs to edit a graphic file. From these programs, you can select, copy, and paste an image or part of a graphic into an OOo document. The figure below shows an example of this procedure, which can be recreated with these steps:
+
  
# In the graphic program window, select an area of the image to be copied.
+
<ol><li> Open both the source document and the target document.
# Move the cursor over the selected area and press ''Control+C'' to copy.
+
<li> In the source document, select the image to be copied.
# Switch to the OOo Writer window.
+
<li> Move the mouse pointer over the selected image and press ''Control+C'' to copy the image to the clipboard.
# Click to place the cursor where the graphic is to be inserted.
+
<li> Switch to the target document.
# Press ''Control+V'' to paste the image.
+
<li> Click to place the cursor where the graphic is to be inserted.
 +
<li> Press ''Control+V'' to insert the image.</li></ol>
  
 
[[Image:WG8-3.png|thumb|none|500px|''Using a graphics program.'']]
 
[[Image:WG8-3.png|thumb|none|500px|''Using a graphics program.'']]
  
=== Scanner ===
+
{{Warn| If the application from which the graphic was copied is closed before the graphic is pasted into the target, the image stored on the clipboard could be lost.}}
 +
 
 +
=== Inserting an Image using a Scanner ===
 
If a scanner is connected to your computer, OOo can call the scanning application and insert the scanned item into the Writer document page as an image. To start this procedure, place the cursor where the graphic is to be inserted and select '''Insert > Picture > Scan > Select Source'''.
 
If a scanner is connected to your computer, OOo can call the scanning application and insert the scanned item into the Writer document page as an image. To start this procedure, place the cursor where the graphic is to be inserted and select '''Insert > Picture > Scan > Select Source'''.
  
 
Although this practice is quick and easy, it is unlikely to result in a high-quality image of the correct size. You may get better results by scanning material into a graphics program and cleaning it up there before inserting the resulting image into Writer.
 
Although this practice is quick and easy, it is unlikely to result in a high-quality image of the correct size. You may get better results by scanning material into a graphics program and cleaning it up there before inserting the resulting image into Writer.
  
=== OpenOffice.org Gallery ===
+
=== Inserting an Image from the Gallery ===
The '''Gallery''' contains objects (graphics and sounds) that you can insert into your documents. The Gallery is available in all components of OOo. For an introduction to the Gallery, see [[Documentation/OOo3_User_Guides/Getting Started/Graphics, Gallery, Fontwork|Chapter 11]] (Graphics, the Gallery, and Fontwork) in the [[Documentation/OOo3_User_Guides/Getting Started|Getting Started]] guide.
+
The Gallery provides a convenient way to group reusable objects such as graphics and sounds that you can insert into your documents. The Gallery is available in all components of OOo. It does not come with many graphics, but you can add your own pictures or find extensions containing more graphics. The Gallery is explained in more detail in in [[Documentation/OOo3_User_Guides/Getting Started/Graphics, Gallery, Fontwork|Chapter 11]] (Graphics, the Gallery, and Fontwork) in the [[Documentation/OOo3_User_Guides/Getting Started|Getting Started]] guide.  For more about extensions, see [[Documentation/OOo3_User_Guides/Writer_Guide/Customizing_Writer| Customizing Writer]].
  
To select a graphic from the Gallery and drag it into the document:
+
This section explains the basics of inserting a Gallery image into a Writer document:
 
+
# Click on the '''Gallery''' icon [[Image:GalleryIcon.png]] (located in the right side of the Standard toolbar) or choose '''Tools > Gallery'''.
+
# Select the theme containing the image you want to insert.
+
# Click on the image with the left mouse button, then drag and drop the image into the document. You can also right-click on the object and select '''Insert''' > '''Copy'''.
+
  
 +
<ol><li> To open the Gallery, click on the Gallery icon [[Image:CH8_GalleryIcon.png]] (located in the right side of the Standard toolbar) or choose '''Tools > Gallery''' from the menu bar.
 +
<li> Navigate through the Gallery to find the desired picture.
 +
<li> To insert the picture, click and drag it from the Gallery into the Writer document. You can also right-click on the picture and choose '''Insert > Copy'''.
 
The figure below shows an example of an image dragged from the Gallery.
 
The figure below shows an example of an image dragged from the Gallery.
  
 
[[Image:InsertFromGallery.png|thumb|none|500px|''Inserting an image from the Gallery.'']]
 
[[Image:InsertFromGallery.png|thumb|none|500px|''Inserting an image from the Gallery.'']]
 +
 +
 +
By default, the Gallery is docked above the Writer workspace. To expand the Gallery, position the pointer over the line that divides it from the top of the workspace. When the pointer changes to parallel lines with arrows, click and drag downward. The workspace resizes in response.
 +
 +
To expand the Gallery without affecting the workspace, undock it so it floats over the workspace. To do so, hold down the ''Control'' key and double-click on the upper part of the Gallery next to the View icons. Double-click in the same area while holding down the ''Control'' key to dock it again (restore it to its position over the workspace).
 +
 +
When the Gallery is docked, to hide it and view the full Writer workspace, click the '''Hide/Show''' button in the middle of the thin bar separating the Gallery from the workspace.
 +
 +
To close the Gallery, choose '''Tools > Gallery''' to uncheck the Gallery entry, or click on the Gallery icon again.
  
  
 
{{CCBY}}
 
{{CCBY}}
 
[[Category: Writer Guide (Documentation)]]
 
[[Category: Writer Guide (Documentation)]]

Latest revision as of 20:55, 13 July 2018



Creating and Editing Images

You might create images (also called ‘pictures’ in OpenOffice.org) using a graphics program, scan them, or download them from the Internet (make sure you have permission to use them), or use photos taken with a digital camera. Writer can import various vector (line drawing) and raster (bitmap) file formats. The most common are GIF, JPG, PNG, and BMP. See the Help for a full list. Some things to consider when choosing or creating pictures include image quality and whether the picture will be printed in color or black and white (grayscale).

To edit photos and other bitmap images, use a bitmap editor. To edit line drawings, use a vector drawing program. You do not need to buy expensive programs. Open-source (and usually no-cost) tools such as Gimp (bitmap editor) and Inkscape (vector drawing program) are excellent. For many graphics, OOo Draw is sufficient. These and many other programs work on Windows, Macintosh OS X, and Linux.

For best results:

  • Create images that have the exact dimensions required for the document, or use an appropriate graphics package to scale photographs and large drawings to the required dimensions. Do not scale images with Writer, even though Writer has tools for doing this, because the results might not be as clear as you would like.
  • Do any other required image manipulation (brightness and contrast, color balance, cropping, conversion to grayscale, and so on) in a graphics package, not in Writer, even though Writer has the tools to do a lot of these things too.
  • If the document is meant for screen use only, there is no need to use high resolution images of 300 or more dpi (dots per inch). Most computer monitors work at between 72 and 96 dpi, reducing the resolution (and the file size) has no negative impact on what is displayed but does make Writer more responsive.

Preparing Images for Black-and-White Printing

If color images are to be printed in grayscale, check that any adjacent colors have good contrast and print dark enough. Test by printing on a black-and-white printer using a grayscale setting. Better still: change the “mode” of the image to grayscale, either in a photo editor or in Writer itself (see Modifying an Image).

For example, the following diagram looks good in color. The circle is dark red and the square is dark blue. In grayscale, the difference between the two is not so clear. A third element in the diagram is a yellow arrow, which is almost invisible in grayscale.

Original Drawing Colour to Printed Grayscale.

Changing the colors of the circle and the arrow improves the contrast and visibility of the resulting grayscale image.

Original Drawing Colour to Printed Grayscale.

If the document will be available in black-and-white print only, a better result can often be obtained by choosing grayscale fills, not color fills — and you don’t have to guess and test to see if you’ve made good choices.

Adding Images to a Document

Images can be added to a document in several ways: by inserting an image file, directly from a graphics program or a scanner, or from the OOo Gallery.


Inserting an image file

When the image is in a file stored on the computer, you can insert it into an OOo document using either of the following methods.


Drag and drop

  1. Open a file browser window and locate the image you want to insert.
  2. Drag the image into the Writer document and drop it where you want it to appear. A faint vertical line marks where the image will be dropped.

This method embeds (saves a copy of) the image file in the Writer document. To link the file instead of embedding it, hold down the Control+Shift keys while dragging the image.


Insert Picture dialog

  1. Click in the OOo document where you want the image to appear.
  2. Choose Insert > Picture > From File from the menu bar.
  3. On the Insert Picture dialog, navigate to the file to be inserted, select it, and click Open. At the bottom of the dialog are two options, Preview and Link. Select Preview to view a thumbnail of the selected image on the right, so you can verify that you have the correct file. See below for the use of Link.
Insert Picture Dialog.
Documentation note.png OOo can import various vector (line drawing) and raster (bitmap) file formats. The most common are GIF, JPEG or JPG, PNG, and BMP. See Graphic file types supported for a full list of supported graphic file types.


Linking an image file

If the Link option in the Insert picture dialog box is selected, Writer creates a link to the file containing the image, instead of saving a copy of the image in the document. The result is that the image is displayed in the document, but when the document is saved, it will contain only a reference to the image file—not the image itself. The document and the image remain as two separate files, and they are merged together only when you open the document again.

Linking an image has two advantages and one disadvantage:

  • Advantage – Linking can reduce the size of the document when it is saved, because the image file itself is not included. The file size is usually not a problem on a modern computer with a reasonable amount of memory, unless the document includes many large graphics files. Writer can handle quite large files.
  • Advantage – You can modify the image file separately without changing the document because the link to the file remains valid, and the modified image will appear when you next open the document. This can be a big advantage if you (or someone else, perhaps, a graphic artist) is updating images.
  • Disadvantage – If you send the document to someone else, or move it to a different computer, you must also send the image files, or the receiver will not be able to see the linked images. You need to keep track of the location of the images and make sure the recipient knows where to put them on another machine, so the document can find them. For example, you might keep images in a subfolder named Images (under the folder containing the document); the recipient of the file needs to put the images in a subfolder with the same name (under the folder containing the document).
Documentation note.png When inserting the same image several times in the document, it might appear beneficial to create links; however, this is not necessary as OOo embeds in the document only one copy of the image file.

Embedding linked images

If you originally linked the images, you can easily embed one or more of them later if you wish. To do so:

  1. Open the Writer document in OOo and choose Edit > Links.
  2. The Edit Links dialog box shows all the linked files. In the Source file list, select the files you want to change from linked to embedded.

  3. Click the Break Link button.
  4. Save the document.
  5. The Edit Links dialog box.
Documentation note.png Going the other way, from embedded to linked, is not so easy—you must delete and reinsert each image, one at a time, selecting the Link option when you do so.


Inserting an image from the clipboard

Using the clipboard, you can copy images into an OOo document from another OOo document and from other programs. To do this:

  1. Open both the source document and the target document.
  2. In the source document, select the image to be copied.
  3. Move the mouse pointer over the selected image and press Control+C to copy the image to the clipboard.
  4. Switch to the target document.
  5. Click to place the cursor where the graphic is to be inserted.
  6. Press Control+V to insert the image.
Using a graphics program.
Documentation caution.png If the application from which the graphic was copied is closed before the graphic is pasted into the target, the image stored on the clipboard could be lost.

Inserting an Image using a Scanner

If a scanner is connected to your computer, OOo can call the scanning application and insert the scanned item into the Writer document page as an image. To start this procedure, place the cursor where the graphic is to be inserted and select Insert > Picture > Scan > Select Source.

Although this practice is quick and easy, it is unlikely to result in a high-quality image of the correct size. You may get better results by scanning material into a graphics program and cleaning it up there before inserting the resulting image into Writer.

Inserting an Image from the Gallery

The Gallery provides a convenient way to group reusable objects such as graphics and sounds that you can insert into your documents. The Gallery is available in all components of OOo. It does not come with many graphics, but you can add your own pictures or find extensions containing more graphics. The Gallery is explained in more detail in in Chapter 11 (Graphics, the Gallery, and Fontwork) in the Getting Started guide. For more about extensions, see Customizing Writer.

This section explains the basics of inserting a Gallery image into a Writer document:

  1. To open the Gallery, click on the Gallery icon CH8 GalleryIcon.png (located in the right side of the Standard toolbar) or choose Tools > Gallery from the menu bar.
  2. Navigate through the Gallery to find the desired picture.
  3. To insert the picture, click and drag it from the Gallery into the Writer document. You can also right-click on the picture and choose Insert > Copy. The figure below shows an example of an image dragged from the Gallery.
    Inserting an image from the Gallery.


    By default, the Gallery is docked above the Writer workspace. To expand the Gallery, position the pointer over the line that divides it from the top of the workspace. When the pointer changes to parallel lines with arrows, click and drag downward. The workspace resizes in response.

    To expand the Gallery without affecting the workspace, undock it so it floats over the workspace. To do so, hold down the Control key and double-click on the upper part of the Gallery next to the View icons. Double-click in the same area while holding down the Control key to dock it again (restore it to its position over the workspace).

    When the Gallery is docked, to hide it and view the full Writer workspace, click the Hide/Show button in the middle of the thin bar separating the Gallery from the workspace.

    To close the Gallery, choose Tools > Gallery to uncheck the Gallery entry, or click on the Gallery icon again.


    Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools