Initiation GIMP and Inkscape

From BITS wiki
Jump to: navigation, search

Introduction

Topics in this introduction:
- Bitmap vs Vector images
- Image size and resolution
- Pixel density (PPI/DPI)
- File formats and compression
- VIB guidelines on image editing

Introduction slides: Introduction.pdf
VIB guidelines: VIB_guidelines.pdf

GIMP

GIMP is short for GNU Image Manipulation Program. It is a free and Open-source, cross-platform image editor available for GNU/Linux, MacOS and Windows operating systems. During this training we will use GIMP 2.10 on Windows. To download the most recent version for your OS, browse to the GIMP Download page.
GIMP has an online manual in multiple languages: GIMP Manual page. There are also extensions/plugins available for GIMP, one of them is the GIMP Extensions Pack for Windows. More information on the GIMP Plugin Registry page.
A video tutorial on all GIMP tools can be found on YouTube: https://www.youtube.com/watch?v=2EPIUyFJ4ag.

User Interface

GIMP has a 'Single-window' mode, this allows you to switch from multiple windows (for e.g. multiple monitors) to a single window. When the 'Single-window' mode is disabled, you have separate windows for toolboxes, view area and dockable dialogs. When enabled you have one window with all tools, options and dockable dialogs attached to the central view area. For beginners, we would advise the 'Single-window' enabled.
On the left panel you have the 'Toolbox' (if not present: Windows - Toolbox or press Ctrl + B) and underneath the 'Tool Options' dialog. Selecting a tool will result in a different Tool Option bar. Every tool has his own set of parameters and functions, best to keep them close to each other.
On the right-hand panel you can find other 'dockable dialogs'. These are easy to move, remove and re-introduce if necessary. To get a list of all 'dockable dialog' go to Windows – Dockable Dialogs - ... . If you want a full screen view of your image select Windows – Hide Docks.

Import data and image properties

To import an image: File – Open
When you select an image (any file type) in the import window, you get a preview and information on the right side. Click Open and the image(s) will be displayed in the middle box at zoom level 100% (1 pixel image = 1 pixel screen) or fitted to your windows. To zoom use Ctrl + mouse scroll up or down. Multiple images in GIMP are displayed in different tabs on top of the View Area.
Before you export your image, make sure it has the right resolution and pixel density. Image - Image Properties will give you all the information your image holds. This information can be very useful when you open an image from an unknown source.

Selection

Rectangular selection has several options and shortcut keys. The first icons in the tool options are the selection modes: add to selection (Shift), subtract from selection (Ctrl) and intersect with selection (Shift+Ctrl). More options are: feathering edges, rounding of the corners, expand from center, lock aspect ratio, size and position and if necessary to highlight the selection). The Ellipse selection tool has more or less the same options.
There are other selection tools available: Free Selection, Select by Color, Fuzzy Selection, Scissor Selection, Foreground Selection. Those tools have different tool options and are only used in special cases.

Transforming

There are several ways to transform your image or selection; rotating, scaling, shearing and flipping. You can transform a selection, a layer or the image. When using the rotation tool, you have several options in the dockable dialog below. An important option is “Clipping” this will change the aspect ratio of your image after rotating.
Another way of rotating an entire image is: Image – Transform – ... then you have the option to flip (horizontal/vertical) or rotate (90°/180°). The entire image will be rotated including the selection and image orientation.

Layers

Make sure you have the dockable dialog ‘Layers’ in your window. All options for layers can be found in the menu bar “Layer”. You can make a new blank layer or duplicate the current layer (e.g. copy of original image to compare or as back-up). In the dockable dialog you can hide or show a layer (eye button), rename them or move them up and down in the layer stack. If you want to link/connect two or more layers, you can use the chain button (next to the eye button).
To copy a selection to a new layer, perform a regular copy/past action of that selection (Ctrl+C and then Ctrl+V) and select Layer - To New Layer
If you want to merge all layers into one layer you can select Image – Merge Visible Layers.

Brightness and contrast

In the menu bar you can find Colors . This menu has multiple option to manipulate your image;
- Color Balance will change the cyan, magenta and yellow color levels of your image
- Brightness and Contrast will change brightness and contrast and you can save these settings as a favorite
- Threshold will reduce your image to two colors by using a threshold value
- Adjust color curve will change the gamma setting of your image
- Posterize will change the number of colors (2-256)

Guides and cropping

You can split your image in different sub-images. This can be done by using 'Guides'. To create such a break-line, go to Image - Guides - New Guide... or (by Percent).... You can create a horizontal or vertical guide at the value/percentage you enter. A guide will be displayed as a blue dashed line. To chop your image in multiple parts, go to Image - Transform - Guillotine. The sub-images will be displayed in different tabs.
If you only want a selection of your image without all the rest you can crop by clicking Image – Crop to Selection or use the Crop tool from the Toolbox.

Scaling and print size

When you want to scale your image to a smaller resolution you can select Image – Scale Image. There you can scale in pixels (or another unit) and you can lock the aspect ratio (chain symbols).
If you want to change the print size to make your image suitable for publication you can select Image - Print Size.... There you can change the dimension/resolution and pixel density of your image.

Exporting

Select File – Export as…
If you click on the '+' next to Select File Type, you have a list of all possible extensions in which you can export your image. Each of those file formats has different compression options.

Exercises

Exercise 1
Source file: Image 1
Task: Split this image in 2 parts, one for each gel. Make sure the band are horizontal and export the 2 new images in the same file format as the original. You can adjust brightness and contrast to make all the band more visible.

Exercise 2
Source file: Image 2
Task: Rotate this image 45 degrees and cut an image of 500x500 pixels out of the original. Make sure the printing resolution is 300 ppi and export this image as a PNG file. Adjust brightness and contrast to make this image look better.

Exercise 3
Source file: Image 3
Task: Cut this image in 4 equal parts. Know that the printing width is 150 mm and the journal demands a minimum op 300 ppi for all 4 images. Also export them in 4 different file formats without losing image quality. Adjust brightness and contrast to your own opinion.

Exercise4:
Source file: Image 4
Task: Adjust brightness and contract of this images and export it in a way to make the file as small as possible. Use preferably lossless compression (try lossy compression to compare file size), there is no restriction on file formats. Be sure your image is exported with at least 300 ppi.

Extras
GIMP tutorial on YouTube: Nick Saporito GIMP Tutorials

Inkscape

Inkscape is a professional vector graphics editor for Windows, MacOS and Linux operating systems. It's free and open-source. During this training we will use Inkscape 0.92 on Windows. To download the most recent version, browse to the Inkscape Download page. For Windows 10 (S): the Inkscape app is also available in the Windows Store.
There is a series of tutorials for Inkscape: Online Inkscape tutorials. An overview of all Inkscape extensions can be found on this page.
A video tutorial can be found on YouTube: YouTube playlist on Inkscape

User Interface

Inkscape is a single-window program. Drawing tools are on the left hand side, option docks are on the right.
In the central window, you have the drawing area with default an A4 page as document layout. To select another format for e.g. posters, go to File - Document Properties. Next to the document size, you can adjust the background colour (default: transparant).

Import Images

You can import scalable vector graphic files (.svg) and also GraphPad Prism graphs (.emf or .pdf format).
Inkscape is not used for editing images like GIMP. If you import bitmap images, note that they are not scalable like vector objects!

Drawing lines and objects

You can draw a line with the Draw Bezier tool. You can make your own shape or just draw a line or path. On top of your drawing area you can select the Mode: Regular Bezier curves, Spiro paths, straight line segments and paraxial line segments. When selecting the straight line mode, you can hold the Ctrl button to make your line snap every 15 degrees around your first/previous point.
You can draw shapes by using the Rectangle tool, Ellipse tool and the Create Stars and Polygons tool. On top of the drawing area you can specify your polygon and star properties, size and lock aspect ration. Here is the Crtl key useful as well for creating squares, circles or specify the position of your object. When you have an object (polygon or others) you can select a color for the stroke and inside of the object. Selecting an object using the Selection tool will give you more options on top of the view area. You have the option to rotate, flip, change dimensions and XY position (in different units). You can change the position of the selected object compared to others (move up/down).

Paths

A path consist of lines and nodes. These lines can be straight or curved and you can make an object using paths (= closed path). When in Path mode you have several options; add or remove a node, joining or breaking nodes apart and changing the node properties. You can also change the segment (line between nodes) properties with the options on top of the screen. You can convert an object into a path to gain more flexibility by selecting the object and go to Path – Object to path. Afterwards you can use the object tool or the path tool to manipulate the object.

Fill and stroke

Paths, lines and objects can be given a plain color, patterns, gradient color or left blank/transparent. You can also configure the stroke style and color. Click Object – Fill and Stroke to see all the options. Paths/lines can be transformed into arrows using the Stroke style option Markers.

Text

At the left there is also a Text tool available. With this tool you can create and change text, it's colour, font, style and size. After entering text, you’re able to manipulate it like an object. You can also attach text into a frame by selecting both objects and click on Text – Flow into Frame.
You can also align text to a path. Select both text and path and click Text – Put on Path. Once the text in aligned to the path it stays adaptable and can be removed from the path; Text - Remove from Path.
Text is an object at first. When you select Path - Object to path you can modify your text like any other object that is converted into a path.

Grouping, aligning and arranging object/paths

To group several object you must select them all (hold Shift) and select Object – Group. To unite several paths you must select Path – Combine. Both options are the same and allow you to manipulate objects/paths as one. Both actions can be reversed (Ungroup / Break Apart).
Several object must be aligned before you group them, think of text inside a box. To display the options, go to Object - Align and Distribute. When multiple objects are selected, you can align the top, bottom, left and right edges of the objects. Aligning on the central axes is also possible, this in both horizontal as vertical direction. The aligned objects always need an anchor, this can be changed in the box on top of the toolbox (Relative to:). This anchor can be an object (first, last, smallest or biggest) or the page, a selection or the complete drawing. Distributing objects works in a similar way, but manages the space between objects. For paths you can only align the nodes.
Aligning or distributing objects allows you to manipulate the X and Y position of your objects. There is also a virtual Z axis. When you have multiple objects with different colours, you can move the one above the other. Every new object you draw will be on top of all the rest. To raise an object one step or to the top, you can use the buttons on top of your screen. The same can be done to lower an object one step or to the bottom.

Path Effects and operations

When you want to distribute/multiply an object along a guideline, there is a tool called Path Effects. First draw and select the object or group of objects and past it in the clipboard (Ctrl + C). Draw or select your path (guideline) and select Path – Path Effects. Click on the '+' sign and select the effect Pattern Along Path. In the new box on the right: select 'Repeated' on the option Pattern copies. Now click on 'Paste path' to paste the object you want to multiply. Note that only the shape is pasted, not the color. When adjusting the color, it will affect the entire path. To copy the colour, use Crtl+C again on your original, select your path of objects and go to Edit - Paste Style - Paste Style. There are also standard patterns to distribute along a path. When clicking on the '+' sign to add an effect, select ‘Gears’ or ‘Hatches (rough)’. Each of these effects have their own options to create an effect and to adjust the pattern.
When it comes to paths, you can do much more than combining them. When you want to cut one shape out of another shape, you can use the options in the Path menu; Union, Difference, Intersection, Exclusion, Division and Cut Path.

Diagrams

To make a diagram with objects (circles, rectangles, stars, etc.) connected by lines, there is the Diagram connector tool. First you must draw and align the objects to create your diagram. Then select the Diagram connector tool. Every object can be selected by clicking in the white box in the middle of the object. Once connected the lines will follow the object if you move it to another place. The lines can be used as a path, therefore you can also modify them to e.g. dashed lines, arrows, etc.

Exercises

Exercise 1
Image 1 PNG: Image 1
Image 1 SVG: Image 1 SVG Format
Task: Reproduce the top strand. Afterwards, reproduce the bottom strand using the first one.

Exercise 2
Image 2 PNG: Image 2
Image 2 SVG: Image 2 SVG Format
Task: Reproduce one of the sets of this image. Afterwards, reproduce the others using the first one.

Exercise 3
Image infographic 1: Image 1
Image infographic 2: Image 2
Image infographic 3: Image 3

Extras
Inkscape Beginner tutorials on YouTube: Nick Saporito Inkscape tutorial 1
Inkscape Intermediate/Advanced tutorials on YouTube: Nick Saporito Inkscape tutorial 2