How to add a graphic from a file

From Apache OpenOffice Wiki
Jump to: navigation, search 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.

Graphics may be downloaded from the Internet, scanned, created with a graphics program, or they may be photos taken with a digital camera. Some questions come to mind:

  • How is a graphic inserted?
  • Should the graphic be included in the document, or should it be linked to the file?
  • How can the size of the graphic be adjusted?
  • How can the relative position between the graphic and the text be changed?

These questions will be discussed in order.

Inserting a graphic from a file

To insert a graphic image from a file, the file must be already stored in a directory (folder) on the computer.

Proceed as follows:

  1. Determine the destination for the image. For example, place the cursor at the appropriate location in the document.
  2. On the main menu, select Insert > Picture > From File. This displays the dialog box shown below.
  3. Navigate to the file to be inserted.
  4. Select the file to insert and click Open.

Insert picture dialog box
Insert picture dialog box

Note: At the bottom of the Insert picture dialog box are two checkboxes. If the Preview checkbox is checked, the selected graphic file is previewed in a pane, so you can verify that you have the correct file. The Link checkbox is discussed below.

Linking a graphic file

If the Link checkbox in the Insert picture dialog box is checked, OOo will create a link to the file containing the graphic, instead of saving a copy of the graphic in the document. The result is that the figure will be displayed in the document, but when the document is saved, it will contain only a reference to the graphic file but not the graphic 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.
  • 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.
  • Disadvantage – If you send the document to someone else, you must also send the image file, or the receiver will not be able to see the linked image.

Resizing a graphic

It is possible, and quite likely, that the inserted image will not fit perfectly into the document because it is too big or too small. Therefore, you will probably need to resize the image.

The position of the image is not relevant for now. Changing the position of an image relative to the text is discussed in Positioning graphics within the text.

You can modify the size of a graphic in two ways:

  • Unscaled resize
  • Scaled resize

The figure below shows three examples of an image inserted into a document and resized.

Resized images
Three examples of resized images, plus the original image

Unscaled resize

In Example 1, the image is in its natural size. When you add a new graphic (and also when you select an existing one by clicking on it), it displays some square points along its perimeter; these are called handles. To resize the graphic:

  1. Move the cursor onto a point.
  2. Click the left mouse button.
  3. Drag the mouse to modify the size of the figure.

This basic resizing process is useful if you need to specify the size and the height independently of each other. The problem with this method, as demonstrated in Example 3, is that when the graphic is not changed to scale, it will be distorted.

You need to either carefully measure and calculate how much the image needs to be adjusted in both the horizontal and vertical directions in order to maintain the correct proportions or use the scaled resize method described below.

Scaled resize

A scaled resize is usually the best option, because it automatically maintains the proportions of the graphic. To perform a scaled resize:

  1. Press and hold the Shift key.
  2. Click and drag a handle of the graphic. It will resize proportionally, as shown in EXAMPLE 2.
  3. Release the mouse button to complete the resize.

Inserting images from other sources

You can insert images from sources other than a file. The possible sources for images are:

From a graphics program

You can use many different graphics programs to edit a graphic file. In these programs, you can select, copy, and paste an image or part of a graphic into an document. The figure below shows an example of this procedure, which can be recreated with these steps:

Using a graphics program
Using a graphics program

  1. In the imaging program window, select an area of the image to be copied. (The program used in the example is Paint Shop.)
  2. Move the cursor over the selected area and press Control+C to copy.
  3. Switch to the Writer window.
  4. Click to insert the cursor where the graphic is to be inserted.
  5. Press Control+V to paste.


If a scanner is connected to your computer, can call the scanning application. The scanned item will then be added into the OOo document page as an image. To start this procedure, on the main menu select Insert > Picture > Scan > Select Source. Gallery

The Gallery is available in all components of For an introduction to the Gallery, see Chapter 14 (Working with the Gallery) in the Getting Started guide.

You can select a graphic from the Gallery and drag it into the document. The Gallery icon is located in the right side of the Function Bar. Proceed as follows:

  1. Click on the Gallery icon GalleryIcon.png.
  2. Select the theme containing the image you want to insert.
  3. Click on the image with the left mouse button and, holding the button pressed, drag the image into the document.
  4. Release the mouse button.

The figure below shows an example of an image dragged from the Gallery.

Insert from Gallery
Inserting an image from the Gallery

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