Draw Guide

6

Chapter
Editing Pictures(Raster Graphics)

This PDF is designed to be read onscreen, two pages at atime. If you want to print a copy, your PDF viewer shouldhave an option for printing two pages on one sheet ofpaper, but you may need to start with page 2 to get it toprint facing pages correctly. (Print this cover page
separately.)CopyrightThis document is Copyright © 2005–2010 by its contributors as listed
in the section titled Authors. You may distribute it and/or modify it
under the terms of either the GNU General Public License, version 3 orlater, or the Creative Commons Attribution License, version 3.0 or
later.
All trademarks within this guide belong to their legitimate owners.

Authors
Agnes Belzunce
Regina HenschelWolfgang Uhlig
Jean Hollis Weber
Linda Worthington

Daniel Carrera
Bernd Schukat
Martin Fox
Claire Wood
Hazel Russman

Feedback
Please direct any comments or suggestions about this document to:authors@documentation.openoffice.org

Acknowledgments
This chapter is based on an original French document written for
OpenOffice.org 1.x by Michel Pinquier (translated to English by Alex
Thurgood) and previous content revised by Jim Taylor. The chapter was
revised for OpenOffice 2.0 by Linda Worthington, Daniel Carrera, Jean
Hollis Weber and Agnes Belzunce, and later translated into German by
Bernd Schukat, Wolfgang Uhlig and Regina Henschel. The Germantranslators also added a large amount of new material. The German
version of this chapter was then translated into English by Martin Fox
and updated for OpenOffice 3.2.

Publication date and software version
Published 28 July 2010. Based on OpenOffice.org 3.2.

You can download
an editable version of this document fromhttp://oooauthors.org/english/userguide3/published/

Contents
Copyright.................................................................................................2
Introduction.............................................................................................4
Importing raster and vector graphics.....................................................4
To link or to embed?.............................................................................5
Scanning...............................................................................................6
Pasting from the clipboard...................................................................6
Dragging and dropping........................................................................7
Inserting from a file..............................................................................7
Exporting graphics..................................................................................8
Exporting the entire file.......................................................................8
Exporting single objects.......................................................................9
Exporting as a vector graphic..............................................................9
Exporting as a raster graphic...............................................................9
Modifying raster object properties........................................................11
The picture (editing) toolbar.................................................................11
Cropping................................................................................................14
The graphic filter toolbar.......................................................................15
Eyedropper............................................................................................19
Practical example: Changing wrong colors to transparency.............19
Effect of the tolerance parameter......................................................21
Color depth.........................................................................................21
Reducing color depth......................................................................22
Conversion.............................................................................................23
Convert to a contoured image............................................................23
Convert to a polygon..........................................................................24
Number of colors.............................................................................24
Point reduction................................................................................25
Fill holes..........................................................................................25
Convert to bitmap...............................................................................28
Print options with raster graphics.........................................................28

Editing Pictures (Raster Graphics)

3

Introduction
Earlier chapters of the Draw Guide have dealt only with vector
graphics. However, Draw also contains a number of functions forhandling raster graphics (bitmaps) such as photographs and scanned
pictures, including import, export, and conversion from one format toanother.
Draw can read all the usual graphics file formats. It has a subset of thesame 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 Fileon the main menu bar or click on theicon on the Draw toolbar.
Draw possesses import filters for many different vector and rastergraphics formats; a filter for *.svg (scaleable vector graphics) files isavailable as an extension,
http://extensions.services.openoffice.org/en/project/svgimport. If yourfile has a nonstandard extension, you must choose the format explicitly
when importing it.
If you select the Preview option in the Insert picture dialog (Figure 1),
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.

Figure 1: Inserting a picture4

Editing Pictures (Raster Graphics)

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 in
the Edit Links dialog (see Figure 2) as an absolute link. If you store thedocument 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 thegraphic in the document and not the graphic itself. In particular, theformat of a linked graphic remains unchanged. In contrast, when araster 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 oldone, 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 notpossible on a linked graphic (for example using the Eyedropper toexchange colors).
Links can easily be removed. The linked picture will then be embeddedin the document. To break a link, choose Edit > Links from the main
menu bar. In the Edit Links dialog (see Figure 2), choose the link to bebroken and then click on the Break Link button.

Figure 2: Editing links to documents

Importing raster and vector graphics

5ScanningWith most scanners you can directly insert a scanned picture into adocument. Choose Insert > Picture > Scan and then either SelectSource 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 fromwithin this window. See Figure 3.

Figure 3: Select source ..... Scanner
Click on Create Preview to carry out a preview scan. The results areshown 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 scanpreview output, click OK and then insert the scan into the documentwith 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 thesource and the operating system, figures may be in different formats.
You can obtain an overview by choosing Edit > Paste Special fromthe menu bar or by clicking on the Paste icon's drop-down menu on
the main toolbar.

6

Editing Pictures (Raster Graphics)

Dragging and dropping
Drag and drop also functions in many situations. The exact way dragand drop works is determined not by whether the graphic is to beembedded or linked but by the operating system in use and the sourceof the graphic. The behavior can be controlled by the use of theControl 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 Chapter
10 (Advanced Draw Techniques).

Inserting from a file
With this option, you can insert complete pages or single objects fromexisting Draw or Impress documents into your Draw document. In
addition you can insert text in Rich Text Format (RTF), HTML format orplain 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 isa Draw or Impress document, a special import dialog opens.

Figure 4: Inserting complete pages or objects on a pageTo access single pages or slides of the document, click on the
expansion symbol (usually a + or a small triangle, depending on youroperating system) to the left of the file name in the selection area. The
same method is used to display single objects within slides. Rastergraphics (for example, photos) and Metafiles are marked with asymbol, drawing objects with aImporting raster and vector graphics

symbol.
7

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 inthe current document. In that case you must give the object a newname before it is inserted. To rename an inserted object, right-click
and choose Name from the pop-up menu. Renaming has the advantagethat 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 iteasier 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 (seeFigure 5).

Figure 5: 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 (see Figure 6). With this type of export, only thecurrently active page is exported.

8

Editing Pictures (Raster Graphics)

Figure 6: Lower part of the Export dialog

Exporting single objects
In order to export individual drawing objects, you need to first selectthem. A selection can include more than one object. Take care tochoose 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 areexported as paths and 3D objects only as preview images. Bestsupported are the Metafile formats and exporting to one of these isusually 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 fileformat, you may be able to set options for the exported image—compression, color format, version of Metafile—depending on theformat chosen. Some examples of the various option dialogs are shownin Figure 7.
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 thedimensions to be used in displaying the image. This means that, among
other things, missing raster points can be interpolated when thegraphic is opened in the other program.
Exporting graphics

9

Figure 7: 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 alimitation of the current user interface; it is possible to set other
resolutions using macros.
Embedded raster graphics, or objects that have been converted to abitmap 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 Drawspecific additions such as text elements, borders, or shadows andwithout the possibility of setting any of the options available whenexporting.
Draw objects can easily be imported into Writer, Calc, or Impress
documents. For objects used often, this is most simply done by storingthem 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 notpossible, but you can incorporate Draw documents in the othermodules as linked OLE objects.

10

Editing Pictures (Raster Graphics)

Tip

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” on page 24.

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 thecontext 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 thebackground 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 Chapter
10 (Advanced Draw Techniques).
You can change the position and size of graphics, or rotate them, using
the methods described in Chapter 3 (Working with Objects and Object
Points). Raster graphics can be flipped (Modify > Flip), but note thatsome 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 fromanother file.

The picture (editing) toolbar
If you have enabled the Picture toolbar (in View > Toolbars), it willautomatically appear on the screen whenever you select a (bitmap)
picture (see Figure 8). It appears either directly under the menu bar inplace of the formatting toolbar or as a floating toolbar elsewhere on
the screen.

Figure 8: The Picture toolbar
The picture (editing) toolbar

11

The following table explains the individual functions on the Picture
toolbar and illustrates their use with examples.
FilterOpens the Filter toolbar, which is described in “Thegraphic filter toolbar” on page 15.

Graphics Mode Use the Graphics mode menu to change the displayof 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).

Color

Use the Color tool to adjust the values of the three
RGB colors, the brightness, contrast and the Gammavalue. These adjustments do not affect the original
picture but the values are stored in Draw as aseparate formatting set.
You can select values from between –100% (nocolor) to +100% (full intensity); 0% irepresents theoriginal value of the property.

The brightness can be adjusted between –100%(totally black) and +100% (totally white).
The contrast can be adjusted between –100%(minimum) and +100% (maximum).

12

Editing Pictures (Raster Graphics)

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.
Transparency

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

Line

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

Area

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

Shadow

Use this tool to set a shadow effect around thegraphic.

Crop

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

Figure 9: Interactive crop marks on an image
The picture (editing) toolbar

13

Cropping

Figure 10: The Crop dialog
More control and accuracy over cropping functions are available via
the Format menu. Click Format > Crop Picture and the dialog box in
Figure 10 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 thegraphic by changing the percentage scaling values. The new
dimensions of the graphic are shown in the Image Size width andheight boxes, which can also be directly adjusted.
In Figure 10 you can see that 2 cm from the left side and 1 cm from thetop, 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 insize accordingly.
• If you choose Keep image size, the graphic will be cropped andthen enlarged to the original image size.
Take care with these operations: in the Crop dialog the width andheight 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
14

Editing Pictures (Raster Graphics)

changing one of the two dimensions.) Changing values in one area
(Scale or Image Size) will show up correspondingly in the other area.
CautionAny changes made in the Crop dialog change only the view ofthe picture. The original picture is not changed. If you want toexport a cropped graphic, you must do it through File >Export. If you use the option Save as Picture from thecontext menu, the changes are not exported.

The graphic filter toolbar
Click the Filter icon (icon) to open the Filter toolbar. Draw offers
eleven filter effects. Filters work on the current view of an object andthey 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.
Invert reverses (inverts) the colors of an image so that it
appears as a color negative of the image.

Smooth reduces the contrast between neighboring pixels andproduces a slight lack of sharpness. If you use the filter
several times in a row, the effect will be strengthened.

The graphic filter toolbar

15

Sharpen increases the contrast between neighboring pixels,
emphasizing the brightness difference. This will accentuate
the outlines. The effect will be strengthened if you apply thefilter several times in a row.

Remove noise compares every pixel with its neighbors andreplaces the extreme values (those that deviate in color by alarge 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 canbetter recognize the resulting graphic. This filter tends tomake the picture also a little more smooth.

Solarization was originally a photochemical effect. If thelocation of a photograph is extremely highly lit, you canexperience a reversal of color and brightness. Similarly, entryof 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 theresulting picture is inverted in color (right picture).

16

Editing Pictures (Raster Graphics)

Aging lends pictures a certain “look” resembling that of old
photos. The process first produces a grayscale picture fromthe original and then reduces the intensity of the blue andgreen 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%.

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.

The Pop-Art filter is supposed to change the colors of thepicture to a pop-art format, but unfortunately it does not seemto function correctly at present.

The graphic filter toolbar

17Charcoal sketch makes the picture appear as if it had beendrawn with charcoal. The outlines are in black and theoriginal colors are suppressed.

The Relief filter calculates the edges in relief of the picture
and produces a picture as if illuminated by a light source, theposition of the illuminating light being variable and producing
shadows in different directions and magnitude.

Mosaic takes groups of pixels and converts them into a single
color rectangular tile. The whole picture appears to be amosaic. The center and right pictures below had an element
resolution of 5 pixels. The picture on the right also had theEnhance edges option selected; with the greater contrast at
the edges, it appears to be a little sharper.

18

Editing Pictures (Raster Graphics)

Caution

If your picture is linked, filters are applied only to the current
view. The stored picture is not changed. When you close thedocument, 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 afilter, you must use Edit > Undo to return to an earlier stateof editing. After you save and close the document, the filter
effects are permanent.

Eyedropper
Use the eyedropper to change one color in a picture for another or set
the color as transparent. The tool always works on the entire picture;
you cannot select only a region for editing.
The changes are carried out on the graphic itself and therefore require
it to be embedded. Attempts to use the eyedropper tool on a linked
graphic result in the following message: This graphic is linked to a
document. Do you want to unlink the graphic is order to edit it?
The tool can be used on all raster graphic formats and with many
Metafile formats.
Note

The eyedropper might not work on some Metafile formats.

Practical example: Changing wrong colors totransparency
Some applications, which cannot correctly handle transparency, showtransparent areas with the color Magenta and then store the graphic
with this color and without the correct transparency information.
Bitmap graphic with area in magenta, which actuallyshould be shown transparent. On the left is theoriginal picture, right is the picture after saving it withMS Paint.
If you receive such a picture, you can recreate the transparency withthe eyedropper tool.

Eyedropper

19

Open the Eyedropper dialog withTools > Eyedropper and click on
the picture to be edited.

Now click on the icon , to change
to the color selection mode. Outside
the dialog the cursor changes to ahand. The field next to the icon
shows the color immediately under
the hand cursor.

Click on the color to be changed.
The first Source Color box is now
marked and the color selected
appears in the left box. In the
Replace with selection list, theoption Transparent is alreadyselected. Click on the Replacebutton at the top right of the box tocarry out the changes to the picture.
There is no preview of the effect. If
the result is not what you wanted,
choose Edit > Undo.
The dialog does not close automatically, so you can carry out further
color replacements. Mark first the field for the Source color andchoose again the color with the eyedropper. Close the dialog with
Ctrl+F4 or the Close icon on the window border. Draw uses an Alphachannel for transparency so that pixels of different colors can be madetransparent.
It is also possible to carry out the operation in reverse to change atransparent area to a color. Select nothing in the graphic but choose
the Transparency option at the lower left of the dialog and thereplacement color at the lower right.

20

Editing Pictures (Raster Graphics)

The selection list for replacement colors shows all the available colors
in the current color palette of the document. You cannot define any
new colors here but you can add colors to the available palette before
using the eyedropper tool. For more on this topic, see Chapter 8 (Tips
and Tricks).

Effect of the tolerance parameter
The tolerance parameter describes how closely a color value in the
picture must agree with the source color in order to be replaced. In the
figure below, the red color tone at the left edge of the rectangularcolor palette is used as the source color and a pure blue as thereplacement color with several different tolerances. The original is arectangle with color palette from red to green. Because the eyedropper
is not usable on drawings, the rectangle on the left side was converted
into a raster graphic (Convert > Bitmap). The picture was thenexported in a Enhanced Metafile format and inserted on the right.
Original
0% smallest value
20%
40%
80%
99% largest value

Note

The application of transparency and color replacement effects on
raster graphics and Metafiles leads to quite different results. Thisis a known problem, which will be corrected in a future version.

Color depth
It is possible to reduce the color depth in OOo. The tools are available
but you must create a separate menu and add the tools to the menu if
you wish to have them available (refer to OOo help if you are not sure
how to do this). To find the tools, click on Tools > Customize,
Toolbars, and Add (Command). The commands are in the category
Modify, at the top of the list.

Eyedropper

21

Reducing color depth
Original with a 24 bit pixel depth (=8 bits
per channel)

1 bit dithered

The impression of grayscale is produced
by a raster. In reality there are only twocolors.
1 bit threshold

The threshold determines which pixels
are black and which are white. You
cannot set it directly but you can
influence which part of the image is set
to black by varying color settings on the
picture toolbar—red, green, blue level,brightness, contrast, and/or gamma value—to see what works best for your image.
You must export and save the modified
image with File > Export and thenreopen it, before you finally change thecolor depth.
4 bit color paletteWith 4 bits a total of 16 colors can beproduced. The color steps are quite fine,because the process does not use the 16
RGB basic colors, but selects from thepalette those that best match the colors
in the image.

22

Editing Pictures (Raster Graphics)

4 bit grayscale palette

8 bit color paletteWith 8 bits a total of 256 colors can beproduced. The image at left is at firstglance very difficult to distinguish fromthe original. A big difference is that the
picture file is only one third of the size ofthe 24 bit version.
8 bit grayscale paletteConversion
Convert to a contoured image
Select the picture so you see the green handles. From the context
menu or from the Modify menu choose Convert > to Contour. This
command creates from the original image a polygon or group ofpolygons, with four corner points and the image set as a backgroundgraphic. In this state you are not able to further edit the graphic. All
your modifications must be completed before this point.
The polygon is in fact a vector graphic but the picture remains as a
bitmap image. Using a polygon offers possibilities for further change;for example, you can modify the shape or define a transparency
gradient.
Conversion

23

Convert to a polygon
Select the picture so you see the green handles. From the context
menu or from the Modify menu, choose Convert > to Polygon. This
command converts areas of the same color into small filled polygons.
The total image becomes a vector graphic and can be resized with noloss of image quality or distortion of text. The resulting format will be a
Metafile.
The Convert to Polygon dialog has a number of settings which can betested using the Preview button. Because graphics conversion can takesome time, depending on the picture and the computer, a progress bar
is included at the bottom of the dialog (see Figure 11).

Figure 11: Conversion of a picture to polygons

Number of colors
Draw considers between 8 and 32 colors in the conversion. The picture
can, however, contain fewer colors than 8. For every color occurring in
the picture, Draw creates a polygon, which may consist of several
disconnected parts. These polygons are then filled with the relevant
color.
The algorithm used to reduce the number of colors in the picture to thenumber specified is not yet optimal. For this reason you may prefer to
try reducing the number of colors by changing the color depth or with
the Posterize filter from the Graphic Filter toolbar (page 15).
24

Editing Pictures (Raster Graphics)

Point reduction
Polygons will only be created if they have a size greater than the value
given in this setting. The section of the picture below, highly
magnified, shows that with a larger point count small flecks of color—typical of irregular color patterns—simply disappear.

2 Pixel3 PixelFill holes
Point reduction can result in small areas or “holes” which are notcovered by a polygon. If the Fill holes option is marked, additionalsquare, tiled areas are created with a background color the same as
the hole. The Tile size option allows the width in pixels of the width ofthese square areas to be preset.

Original picture

Original picture with 16 colors
and 0 Pixel point reduction
vectorized

Original picture transformed with
the Poster filter and 64 colors …

… and then with 16 colors and0 pixel point reduction vectorized.

Conversion

25Here the picture is transformed
with the Poster filter, but this timewith a point reduction of 4 pixels
and a tile size of 16 pixels.

The effect below was generated
from the picture to the left
(posterized and vectorized); thepolygons were split with Modify> Break, and a number (in thiscase 6) of the (foreground)polygons were deleted until the
resulting background wasachieved.

Note: To select polygons fordeletion, click on a curved coloredarea (the text in the status bar
shows “Polygon nnn corners
selected”, where nnn is thenumber of corners of the polygon)
and a frame with green handles
encloses the area of the polygons
selected. Press Delete to delete
the polygons. Repeat until you
have achieved the desired effect,(which here is to have only the
background showing).
If you next 'split' the existing Metafile (Modify > Split), access isgained to individual polygons. To be able to operate on these together
you should immediately group them after splitting.
With this vectorized form of the image, you can carry out operations
familiar from classic drawing programs, for example a curved warping
operation. For such transformations, it is much less effort to use aconversion with background tiles so that the edges of the picture arestraight.

26

Editing Pictures (Raster Graphics)

Using the graphic generated in the posterize and vectorize process
above, Break and Split it, and then try out some operations using thetools on the Effects toolbar.
To use this tool to vectorize the first letter of a chapter in a special
font, convert the graphic to a polygon, using no point reduction or
background tiling. Use Modify > Break to generate two polyons. An
example is shown below.
Original polygon, converted from a
Metafile. Break the graphic into twopolygons.

After the conversion there are twopolygons, one with the visible letter andanother polygon, not visible because thelines and area filling are all in white. You
can select this “invisible” polygon bypressing the Tab button (click on the visible
letter first, then press Tab; this moves thecurrent selection to the next object). In theexample at left, the invisible polygon has
been moved to the side. If you have Display
Grid active and the grid points set todisplay behind objects, you can see where
this invisible polygon is since it obscuresthe grid points behind it.
This invisible polygon encloses the letter.
After changing lines and/or area to adifferent color, the polygon becomesvisible.

Conversion

27

Convert to bitmap
All drawing objects are vector graphics. Use the command Convert >To Bitmap from the context menu to convert a vector graphic to araster graphic. Draw creates the raster graphic in PNG format with acolor depth of 24 bits. Unfortunately any transparency effects whichwere created in the vector graphic are lost in this conversion, although
the PNG format used in Draw does support transparency. Only if you
use the eyedropper tool to set transparency will an Alpha channel also
be produced.
To determine the height and width of the converted graphic (number ofpixels), Draw considers the dpi setting of the operating system for thescreen and the percentage scaling factor set under Tools > Options >OpenOffice.org > View in the section User Interface.
Example:Width of vector graphic: 1.5 inch
Monitor setting of operating system: 96 dpi ( = 96 dots per inch)
Scaling 130 %Calculation: 1.5 inch x 96 dpi *130% = 187 pixels
The actual number of pixels will vary somewhat from this value due torounding. When the format permits, Draw uses a dpi value (in this case
125 dpi) which permits the calculation to be reversed and the picturewith this pixel value reproduced with the correct width of 1.5 inch.

Print options with raster graphics
If you have a black and white printer or are experiencing problems
with printing, you should have a look at the following settings.
You can set up printing so that all text and all graphics are printed ingrayscale or black and white. The general settings are in Tools >Options > OpenOffice.org Draw > Print in the section Quality (seeFigure 12). To set these for the current document only, use Options in
the Print dialog (File > Print). With both Black/white printing andGrayscale printing, no background is printed.

28

Editing Pictures (Raster Graphics)

Figure 12: Options - OpenOffice.org Draw - Print
Other options are in Tools > Options > OpenOffice.org > Print (seeFigure 13). They relate to page options (scaling) and other printing
variables. They affect the size of the print file and the time taken to
print the document. With most modern systems you can simply accept
the defaults. As different operating systems and printers have theirown requirements, you need to tailor the settings to your particularsite conditions. Refer to the Help file for more information.

Figure 13: Options - OpenOffice.org - Print dialog

Print options with raster graphics

29