Editing Pictures

From Apache OpenOffice Wiki
Jump to: navigation, search

This is Chapter 6 of the OpenOffice.org 3 Draw Guide, produced by the OOoAuthors group. A PDF of this chapter is available from this wiki page.


Earlier chapters of the Draw Guide have dealt only with vector graphics. However, Draw also contains a number of functions for handling raster graphics (bitmaps) such as photographs and scanned pictures, including import, export, and conversion from one format to another.

Draw can read all the usual graphics file formats. It has a subset of the same capabilities as specialized raster graphics programs like Adobe Photoshop or The Gimp.

Importing raster and vector graphics

To import stored graphics files, choose Insert > Picture > From File on the main menu bar or click on the FromFileIcon.png icon on the Draw toolbar. Draw possesses import filters for many different vector and raster graphics formats; a filter for *.svg (scaleable vector graphics) files is available as an extension, http://extensions.services.openoffice.org/en/project/svgimport. If your file has a nonstandard extension, you must choose the format explicitly when importing it.

If you select the Preview option in the Insert picture dialog, Draw shows a preview of the picture in the box on the right-hand side. This makes it much easier to choose the picture you want and to see whether Draw can import a file of this format.

Inserting a picture

To link or to embed?

If you select the Link option in the Insert picture dialog, the graphic is linked rather than embedded. It is not actually inserted into the document; instead, a link to the graphic is created. This link is relative to the folder where the document is stored, even though it shows up as an absolute link in the Edit Links dialog shown below. If you store the document and the graphic in the same folder, and transport the folder as a whole to another computer, the graphic will show up in the document as before.

Linked graphics are not changed as a result of any actions carried out within OpenOffice.org. Such changes affect only the view of the graphic in the document and not the graphic itself. In particular, the format of a linked graphic remains unchanged. In contrast, when a raster graphic is embedded in an OOo document, it is converted into PNG format.

Linking keeps the file size of the Draw document small. The picture can be edited or even replaced by another and the link will still function. As long as the new picture is given the same name as the old one, links will be re-established and updated when the document containing the link is next opened. However, some actions do not last beyond the current session (for example, Filter) or are simply not possible on a linked graphic (for example using the Eyedropper to exchange colors).

Links can easily be removed. The linked picture will then be embedded in the document. To break a link, choose Edit > Links from the main menu bar. In the Edit Links dialog, choose the link to be broken and then click on the Break Link button.

Editing links to documents


With most scanners you can directly insert a scanned picture into a document. Choose Insert > Picture > Scan and then either Select Source or Request.

The Select Source option opens a window which acts as an interface to a scanner device. Some scanner options can be directly set from within this window.

500pxSelect source ..... Scanner

Click on Create Preview to carry out a preview scan. The results are shown in the preview box on the left. Modify the scan area as desired and review the result as before. When you are satisfied with the scan preview output, click OK and then insert the scan into the document with Insert > Picture > Scan > Request.

Scanned images are embedded in the document in PNG format.

Pasting from the clipboard

The clipboard offers another way to insert graphics. Depending on the source and the operating system, figures may be in different formats. You can obtain an overview by choosing Edit > Paste Special from the menu bar or by clicking on the Paste icon's drop-down menu on the main toolbar.


Dragging and dropping

Drag and drop also functions in many situations. The exact way drag and drop works is determined not by whether the graphic is to be embedded or linked but by the operating system in use and the source of the graphic. The behavior can be controlled by the use of the Control or Control+Shift keys together.

Draw objects and images which are used frequently can be stored in the Gallery. Objects can be dragged from the Gallery to the Draw surface quite simply. Working with the Gallery is dealt with in Advanced Draw Techniques.

Inserting from a file

With this option, you can insert complete pages or single objects from existing Draw or Impress documents into your Draw document. In addition you can insert text in Rich Text Format (RTF), HTML format or plain text. The text will be contained within a text frame. The usual paragraph and character formatting options are available for this text.

Choosing Insert > File brings up the File selection dialog. If the file is a Draw or Impress document, a special import dialog opens.

Inserting complete pages or objects on a page

To access single pages or slides of the document, click on the expansion symbol (usually a + or a small triangle, depending on your operating system) to the left of the file name in the selection area. The same method is used to display single objects within slides. Raster graphics (for example, photos) and Metafiles are marked with a FromFileIcon.png symbol, drawing objects with a DG3Ch6F0b.png symbol.

Choose the object or objects (multiple selection using the Control or Shift key is possible). If the inserted object was named in the source document, it keeps its original name unless the name already exists in the current document. In that case you must give the object a new name before it is inserted. To rename an inserted object, right-click and choose Name from the pop-up menu. Renaming has the advantage that the object is then listed in the Navigator.

You can choose whether to embed or link the selected page or object.

Exporting graphics

Saving drawings in the native OpenOffice.org Draw format (*.odg) means that in general only OOo (or StarOffice) users, or users who have installed a suitable ODF plug in, can open the files. To make it easier for other users and to use the drawings in other applications, you can export the graphics in other formats. Choose File > Export and then in the File format pull-down list select the desired format.

Section of the file selection list

Exporting the entire file

The file format options in the upper area of the File format box (PDF, Flash, and HTML) always apply to the complete file. Use of Flash or HTML format causes each page of the Draw document to be exported as a raster graphic. You will no longer be able to access individual objects on the page. If you wish, the Export Assistant can generate a Navigation aid to help in moving from page to page.

If you want to use the objects in other applications, select one of the Metafile formats (JPEG, PNG, TIFF, BMP and so on) in the lower part of the File format list. With this type of export, only the currently active page is exported.

Lower part of the Export dialog

Exporting single objects

In order to export individual drawing objects, you need to first select them. A selection can include more than one object. Take care to choose the Selection option on the Export dialog.

Exporting as a vector graphic

The choice of vector formats is still limited. An export to a DXF format file (Autocad) is not yet possible. Even the export of a graphic to a SVG format file is not yet fully implemented: 2D graphic objects are exported as paths and 3D objects only as preview images. Best supported are the Metafile formats and exporting to one of these is usually successful.

Exporting as a raster graphic

The choice of formats for export as a raster graphic is large enough to support most other applications. In case of doubt, test different formats to see which gives the best results; some programs behave differently depending on the format of the image imported into them.

After typing in a name for the exported file and selecting the file format, you may be able to set options for the exported image — compression, color format, version of Metafile — depending on the format chosen. Some examples of the various option dialogs are shown below.

Where the export dialog allows you to specify the image resolution, this does not affect the number of raster points in the image. Rather it inserts information into the picture that tells other programs the dimensions to be used in displaying the image. This means that, among other things, missing raster points can be interpolated when the graphic is opened in the other program.

Adjusting format specific properties prior to export

The actual number of pixels used is determined by the screen resolution set up by the operating system and the Drawing scale factor set in Tools > Options > OpenOffice.org Draw > General. This is a limitation of the current user interface; it is possible to set other resolutions using macros.

Embedded raster graphics, or objects that have been converted to a bitmap or Metafile (from the context menu Convert > To Bitmap / To Metafile) may subsequently be saved as a picture; from the context menu choose Save as Picture. This saves the picture without Draw-specific additions such as text elements, borders, or shadows and without the possibility of setting any of the options available when exporting.

Draw objects can easily be imported into Writer, Calc, or Impress documents. For objects used often, this is most simply done by storing them in the Gallery or by using the clipboard. As Writer and Calc do not possess the same range of tools available within Draw, it makes sense to use Draw to produce a complex drawing and then to copy it into the other OOo application. A link to single drawing objects is not possible, but you can incorporate Draw documents in the other modules as linked OLE objects.

Tip.png To avoid problems when scaling Draw objects containing text after importing them into Writer, convert the object to a polygon before storing it in the Gallery or copying it to the clipboard. See Convert to a polygon.

Modifying raster object properties

As with other objects, the properties of a raster graphic can be modified. You can format the graphic using the Format menu or the context menu. Use the Picture toolbar to add or change filters using the Graphic Filter Bar; adjust the Lines, Areas and Shadows properties. The Transparency property in the Format menu does not relate to the transparency of the raster graphic itself but to the background area. To set the transparency of the graphic, you must use the Picture toolbar.

Graphics can also have a text element. For more on text, see Advanced Draw Techniques.

You can change the position and size of graphics, or rotate them, using the methods described in Working with Objects and Object Points. Raster graphics can be flipped (Modify > Flip), but note that some Metafile formats might have problems flipping text.

Graphics included as a member of a group behave like other drawing objects when the properties of the group are modified.

It is a good idea to (re-)name the graphic using Name from the Modify menu or the context menu. Only named objects are visible in the Navigator and only named objects can be directly imported from another file.

The picture (editing) toolbar

If you have enabled the Picture toolbar (in View > Toolbars), it will automatically appear on the screen whenever you select a (bitmap) picture. It appears either directly under the menu bar in place of the formatting toolbar or as a floating toolbar elsewhere on the screen.

The Picture toolbar

The following table explains the individual functions on the Picture toolbar and illustrates their use with examples.



Opens the Filter toolbar, which is described in The graphic filter toolbar.
Graphics Mode


Use the Graphics mode menu to change the display of the graphic from normal color to grayscale, black and white, or a watermark. This setting affects only the display and printing of the picture; the picture itself remains unchanged.
Default: The graphic is displayed unaltered in color.
Grayscale: The graphic is displayed in 256 shades of gray.
Black/White: The graphic is displayed in black and white.
Watermark: The brightness and contrast of the graphic are reduced to the extent that the graphic can be used as a watermark (background).


Use the Color tool to adjust the values of the three RGB colors, the brightness, contrast and the Gamma value. These adjustments do not affect the original picture but the values are stored in Draw as a separate formatting set.
DG3Ch6F0d.png You can select values from between -100% (no color) to +100% (full intensity); 0% irepresents the original value of the property.
DG3Ch6F0e.png The brightness can be adjusted between -100% (totally black) and +100% (totally white).
DG3Ch6F0f.png The contrast can be adjusted between -100% (minimum) and +100% (maximum).
DG3Ch6F0g.png The Gamma value affects the brightness of the middle color tones. Values can range from 0.10 (minimum) to 10 (maximum)

Hint: Try adjusting this value if changing brightness /contrast does not give you the result you want.



The degree of transparency of the picture can be adjusted between 0% (opaque) and 100% (fully transparent).


Opens the Line dialog. In this context, line refers to the outline of the border. See also Changing Object Attributes.


Opens the Area dialog. Here you can edit color, gradient, hatching and fills of the background area that contains the graphic — not the graphic itself. To see the background, you must set the transparency of the graphic to a suitably high value.


Use this tool to set a shadow effect around the graphic.


Use this function to crop (trim) an image. When you click on this icon, crop marks appear on the image as shown below. Drag one or more of these marks to crop the picture to your desired size. For more accurate cropping, see the next section.
Figure 9: Interactive crop marks on an image


The Crop dialog

More control and accuracy over cropping functions are available via the Format menu. Click Format > Crop Picture and the dialog box shown above will appear. The fields Left, Right, Top, and Bottom establish the amount to be trimmed off the appropriate edge.

In addition to cropping, you can also enlarge or reduce the size of the graphic by changing the percentage scaling values. The new dimensions of the graphic are shown in the Image Size width and height boxes, which can also be directly adjusted.

In Figure 10 you can see that 2 cm from the left side and 1 cm from the top, bottom, and right side will be trimmed from the original object. The preview pane shows the location of the new edges of the graphic. In addition both height and width have been scaled down by 28%.

  • If you choose Keep Scale, the graphic will be cropped to the scales shown in the width and height boxes and the picture reduced in size accordingly.
  • If you choose Keep image size, the graphic will be cropped and then enlarged to the original image size.

Take care with these operations: in the Crop dialog the width and height are treated as totally independent values. Changing one without the other can result in significant distortion of the image; this might not be what you want. (The Position and Size dialog on the context menu has an option for keeping the width:height ratio fixed while changing one of the two dimensions.) Changing values in one area (Scale or Image Size) will show up correspondingly in the other area.

Documentation caution.png Any changes made in the Crop dialog change only the view of the picture. The original picture is not changed. If you want to export a cropped graphic, you must do it through File > Export. If you use the option Save as Picture from the context menu, the changes are not exported.

The graphic filter toolbar

Click the Filter icon FilterIcon.png to open the Filter toolbar. Draw offers eleven filter effects. Filters work on the current view of an object and they can be combined. Filters always apply to the entire graphic; it is not possible to use filters to edit only a part of the object.

InvertIcon.png Invert reverses (inverts) the colors of an image so that it appears as a color negative of the image.
DG3Ch6F0i.jpg DG3Ch6f0b.jpg
SmoothIcon.png Smooth reduces the contrast between neighboring pixels and produces a slight lack of sharpness. If you use the filter several times in a row, the effect will be strengthened.
DG3Ch6F0i.jpg DG3Ch6f0c.jpg DG3Ch6f0d.jpg
SharpenIcon.png Sharpen increases the contrast between neighboring pixels, emphasizing the brightness difference. This will accentuate the outlines. The effect will be strengthened if you apply the filter several times in a row.
DG3Ch6F0i.jpg DG3Ch6F0e.jpg DG3Ch6F0f.jpg
RemoveNoiseIcon.png Remove noise compares every pixel with its neighbors and replaces the extreme values (those that deviate in color by a large amount from a mean value) by a pixel with a mean color value. The amount of picture information does not increase, but because there are fewer contrast changes our brains can better recognize the resulting graphic. This filter tends to make the picture also a little more smooth.
DG3Ch6F0i.jpg DG3Ch6F0g.jpg DG3Ch6F0h.jpg
SolarizeIcon.png| Solarization was originally a photochemical effect. If the location of a photograph is extremely highly lit, you can experience a reversal of color and brightness. Similarly, entry of light during the developing process reverses the brightness values. These phenomena were used for artistic production of pictures.

With this filter you input a threshold brightness value, above which the color values are reversed (middle picture, threshold value 70%). With the Invert option the whole of the resulting picture is inverted in color (right picture).

DG3Ch6F0i.jpg DG3Ch6F0j.jpg DG3Ch6F0k.jpg
AgingIcon.png Aging lends pictures a certain "look" resembling that of old photos. The process first produces a grayscale picture from the original and then reduces the intensity of the blue and green color values, so that the final picture appears darker and redder. In the middle example, the aging degree was set to 0%, at right it was 15%.
DG3Ch6F0i.jpg DG3Ch6F0l.jpg DG3Ch6F0m.jpg
PosterizeIcon.png Posterize reduces the number of colors in the picture. The fewer colors, the more flat the picture appears. In the right picture below the number of colors was reduced to 8. The results of this filter are not always good.
DG3Ch6F0i.jpg DG3Ch6F0n.jpg
PopArtIcon.png The Pop-Art filter is supposed to change the colors of the picture to a pop-art format, but unfortunately it does not seem to function correctly at present.
DG3Ch6F0i.jpg DG3Ch6F0i.png
CharcoalSketchIcon.png| Charcoal sketch makes the picture appear as if it had been drawn with charcoal. The outlines are in black and the original colors are suppressed.
DG3Ch6F0i.jpg DG3Ch6F0o.jpg
ReliefIcon.png The Relief filter calculates the edges in relief of the picture and produces a picture as if illuminated by a light source, the position of the illuminating light being variable and producing shadows in different directions and magnitude.
DG3Ch6F0i.jpg DG3Ch6F0p.jpg
MosaicIcon.png Mosaic takes groups of pixels and converts them into a single color rectangular tile. The whole picture appears to be a mosaic. The center and right pictures below had an element resolution of 5 pixels. The picture on the right also had the Enhance edges option selected; with the greater contrast at the edges, it appears to be a little sharper.
DG3Ch6F0i.jpg DG3Ch6F0j.png DG3Ch6F0k.png
Documentation caution.png If your picture is linked, filters are applied only to the current view. The stored picture is not changed. When you close the document, all filtering is lost. You should ensure that you export the picture to create a copy with all the filters applied (File > Export).

If you have embedded the graphic in the document, all filters are applied directly on the embedded graphic and cannot be undone in a subsequent session. If you do not want to retain a filter, you must use Edit > Undo to return to an earlier state of editing. After you save and close the document, the filter effects are permanent.

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