Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Tuesday, March 17, 2015 at 19:25

Do you expect an internal image editor in LibreOffice such as Microsoft Office's one? Do you want to crop, annotate, adding text, and so on to images in your document? Unfortunately, it is currently impossible. But I found a single trick to do advanced image editing easily from the outside of LibreOffice. The main tool to do this is LibreOffice right-click menu, Edit with External Tool. Then you just need Gwenview and Shutter to complete that. Currently I am writing a book about Linux and this trick helps me so much.  I use it almost in every page in my book. For certain people, maybe this tutorial looks like a mess at the first glance. But trust me, if you use it for long term usage (like me, writing a book), you will find no other way easier than this. Of course until LibreOffice finally has internal advanced image editor someday.

Shutter as External Image Editor for LibreOffice

Install The Tools


You just need Gwenview and Shutter. Why? It is because Gwenview has right-click option, Open With External Tool. Actually for cropping only, you can choose F-Spot or Shotwell or GNOME Image Viewer. But they don't have Open With menu.

In Ubuntu


sudo apt-get install gwenview libgoo-canvas-perl shutter

This command will search, download, and install two applications (Gwenview and Shutter) at the same time. It will also install libgoo-canvas-perl to enable Edit feature in Shutter. Make sure your internet connection turned on when performing installation. This command is compatible with any official Ubuntu flavor, Debian, Linux Mint, Blankon, and any other Debian derivative. If you dislike the command line way, you can use Ubuntu Software Center (or such) for installation.

Ubuntu Software Center Installing Shutter

In Fedora


sudo yum install gwenview libgoo-canvas-perl shutter

This command is compatible with CentOS, IGOS Nusantara, or any other yum-based Red Hat derivative. If you already have both on your system, yum will download nothing.

In Another Distro

Just follow your Linux distro package management system to find and install gwenview. If you are lucky, you will have one or both on your system preinstalled. In example, Kubuntu and Slackware use KDE by default so they also included Gwenview by default.

Configuration

Firstly, you must set the Gwenview to be your default image viewer. If you are using KDE, you probably don't have to do that (Gwenview is the default). If you are using GNOME or Unity, do the following.

Image Viewer System Association

1. Open Nautilus.
2. right-click on any image > Properties > Open With.
3. Select Gwenview.
4. Click Set As Default button.
5. Repeat for all the formats you always use for the LibreOffice documents.

In my own example, I use only PNG. So I associate Gwenview to open PNG only. If you use JPEG, then make Gwenview as default for JPEG.

Image Editing

Now we will do the trick.

  1. Open LibreOffice.
  2. Write anything. Include one or more pictures. You can just press Ctrl+C Ctrl+V from the file manager into LibreOffice.
  3. Right-click image > Edit with external tool.
  4. For cropping only: Gwenview will open the image chosen. Press Shift+C to view the crop frame. Resize it by your cursor and press Crop button. Then press Ctrl+S to save the image. Then your image inside LibreOffice will be cropped.
  5. For advanced editing: when Gwenview appears, right-click image > Open With > Shutter. Then Shutter window will appear. Click Edit button then new window will appear. You can edit, annotate, adding text, cropping, censoring, and so on with it. When your editing is done, press Save button. Then your image inside LibreOffice will be edited.
Cropping
Edit Button in Shutter
Image Editing

Note: actually, LibreOffice saves your images temporarily on /tmp directory. If you do Edit with External Tool, then it is only a call for default image viewer to open certain image in /tmp. That's all.

Tips

  1. Use Ctrl+Z (Undo) if you do wrong image editing. Then just edit it again.
  2. Sometimes maybe you will find “Read Error” in LibreOffice after you edit the image in Shutter. Then just Ctrl+Z and repeat the editing. I don't know, but my LibreOffice 3.5 has this error sometimes. 
  3. You can use GIMP or another image editor instead of Shutter if you like. Just select GIMP in Gwenview when opening it. 

If you have any difficulty, let us know.