Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 11: Adding Graphics to Documents

Previous HourNext Hour

Sections in this Hour:

 

Hour 11
Adding Graphics to Documents

In this hour, you learn how to add the graphic images and figures that you create to your documents. You also learn how to position and edit a graphic.

StarOffice includes StarDraw for creating vector-based graphics (see Hour 6, "Creating Graphics with StarDraw"), and the Image Editor for creating bitmapped graphics. Both types of graphics can be inserted into documents as described in this hour.

StarWriter documents can also use standard line drawing and borders. In this hour, you learn how to insert and position such elements in a document.

Importing Graphics


Pictures or diagrams add a lot to any document. Because StarOffice can create Web pages so readily, you'll probably use a lot of graphics as you create documents in StarOffice.

Instead of using StarDraw or the StarOffice image editor (which you'll learn about later in this hour), you can create the images you need in a standard Linux package such as GIMP or Xpaint. Both of these excellent tools are included in nearly every Linux distribution.

After you've created a graphic or downloaded one that you want to add to your document, you're ready to import the graphic into your StarOffice document.

Placing Graphics in Your Document

StarOffice includes a clip art library of dozens of images that you can insert into your documents. You can also use most graphics in standard formats. (A list of major supported formats is included in the next section.) In this hour, you learn how to use both clip art and other imported graphics.

To prepare for this example, open a document that you've been working on and check both the Explorer and the Beamer in the View menu so that they're visible on your screen. Then follow these steps:

1. Click on the plus sign (+) next to the Gallery in the Explorer window.

2. Choose a category of clip art by clicking on it. Choose Maps. The graphics in that group appear in the Beamer. (See Figure 11.1.)

Figure 11.1
Clip art can be viewed in the Beamer window.

3. Scroll through the Beamer until you find an interesting graphic.

4. Click on the graphic in the Beamer and drag it to the main document window.

5. Release the mouse button in the location within the document in which you want the graphic placed. The graphic isn't placed at the current cursor location.

You've just inserted a graphic into your document. The image is selected, as shown by the green handles around it. (See Figure 11.2.) A little anchor is also shown. The anchor is provided mainly for reference purposes; it indicates where the graphic is anchored in the document. Because you can use your mouse to drag the document wherever you want it, the anchor doesn't matter much in text documents.

Figure 11.2
A graphic is selected after being dragged into a document.

A little later, you'll look at how to work with the graphic that you've inserted. First, however, you will try two other methods of inserting a graphic.

Remember that the Workplace item in the Explorer window is a method of browsing your entire Linux filesystem. With the Beamer open, you can open the Workplace icon in the Explorer and locate a graphic in your Linux filesystem.

As you browse the directories in the Explorer, you can click on any directory (rather than the plus sign next to the directory) to see a listing of the files that the directory contains in the Beamer window.

When you see a graphic file in the Beamer window that you want to insert in your document, click on the icon or filename in the Beamer window and drag it to a spot in your document.

If the file is in a graphics format that StarOffice can read (more on that soon), the graphic appears in your document.

Finally, you can use the old-fashioned method of inserting graphics into your document. Choose Picture from the Insert menu and then choose From File on the submenu. The Insert Picture dialog box appears, as shown in Figure 11.3.

Figure 11.3
From the Insert Picture dialog box, you can select a graphics file to insert.

The advantage of using the Insert Picture dialog box (instead of the Beamer) for graphics that aren't in the StarOffice Gallery is that you can select the Preview checkbox (as it is in the figure) and see the graphic before you insert it.

After you find the graphic file that you want to insert, choose OK to close the dialog box and insert the graphic. The graphic appears with the green handles, ready to be edited (as described later in this hour).

Using Other Linux Programs to Convert Graphic Formats

This book isn't all about Linux graphics tools, but it is useful to review a few popular programs that can help you get your graphics into StarOffice.

StarOffice supports a variety of image formats, including GIF, TIFF, BMP, EPS, JPEG, WMF, Mac-pict, PNG, and a few others.

When you have to deal with another image format, however, you can also try one of these tools to convert it to one supported by StarOffice:

1. Start the xv program from an X Window System command line, with the name of a graphic file that you need to convert.

2. Click the right mouse button in the graphic to open the control window.

3. Choose Save to open the Save dialog box.

4. Choose a graphics format in which to save the image.

Use one of the following formats:

The GIMP is another excellent graphics program for Linux. It's intended as a graphics editor, however, and might seem like overkill if you just need to convert graphic formats.

If you need to convert a large number of files, or need to convert to or from a format that isn't available in StarOffice, XV, or GIMP, you can use the ImageMagick package, which converts between dozens of image formats.

For example, if you need to convert a file from Targa (tga) to Macintosh pict, you can use the following command:


$ convert samplepic.tga samplepic.pict

Creating New Images in the Image Editor

StarOffice includes a simple bitmapped image editor that can come in handy--not because it's a full-featured editor, but because it's always available.

Suppose you need to insert a graphic of a large colored circle in your document. Rather than creating a StarDraw drawing or opening a separate drawing program such as the GIMP, you can follow these steps in StarOffice:

1. From the Insert menu, choose Picture, and then From Image Editor. The New Image dialog box appears, as in Figure 11.4.

Figure 11.4
Select a size and color depth for each new image that you create in the Image Editor.

2. Select the size, in pixels, for the image that you want to create.

3. Select the number of color bits per pixel to include in the saved image (this dialog box doesn't consult your system to see how many are available, so disregard the higher numbers if your system doesn't support them).

Caution - Note that you can't Cancel the insert operation from here. If you change your mind, choose the Create button and then just delete the graphic by clicking in your document--to end Edit mode--and pressing the Delete key.


4. Choose Create to start editing the graphic. The graphic appears as a blank canvas and the Image Editing toolbar appears (see Figure 11.5).

5. Click on the filled-in circle icon on the Image Editing toolbar on the left of the editing window.

6. Click on a color that you like in the palette at the bottom of the screen.

7. Click in the image editing window and drag to size your circle.

8. Use any other icons to add lines, rectangles, or a variety of special effects to your image.

Figure 11.5
You can edit a graphic as part of your text document using the Image Editor.

9. When you have finished, click anywhere in your document, outside the image editing window. The image is selected with green handles, but is no longer being edited.

10. Click again in your document to deselect the image and continue editing the text of your document.

To further edit the image that you created in the Image Editor, double-click on the image. You are switched to image editing mode.

Tip - Although the Image Editor is great for creating a quick embedded image, bitmapped graphics take a lot more space (memory and hard disk) than do vector graphics created by StarDraw.


Although the use of the Image Editor is being downplayed here in favor of StarDraw or other programs, following is a list of some of the features of the Image Editor. As you'll see in the next section, these can be used with any bitmapped image you import, as well as with images that you draw from scratch in the Image Editor. All the following features are available from the Image Editing toolbar:

  • Independent RGB level controls

  • Brightness, contrast, and grayscale controls

  • Visual effects, such as solarization, tiling, smoothing, and noise reduction

  • Eyedropper for color sourcing

  • Airbrush

  • Multiple magnification ratios and cropping

Sams Teach Yourself StarOffice® 5 for Linux in 24 Hours

ContentsIndex

Hour 11: Adding Graphics to Documents

Previous HourNext Hour

Sections in this Hour: