Tuesday, 10 December 2019

Using GIMP to Increase Business Productivity


Using GIMP to Increase Business Productivity
Dr. Amartya Kumar Bhattacharya
BCE (Hons.) ( Jadavpur ), MTech ( Civil ) ( IIT Kharagpur ), PhD ( Civil ) ( IIT Kharagpur ), Cert.MTERM ( AIT Bangkok ), CEng(I), FIE, FACCE(I), FISH, FIWRS, FIPHE, FIAH, FAE, MIGS, MIGS – Kolkata Chapter, MIGS – Chennai Chapter, MISTE, MAHI, MISCA, MIAHS, MISTAM, MNSFMFP, MIIBE, MICI, MIEES, MCITP, MISRS, MISRMTT, MAGGS, MCSI, MIAENG, MMBSI, MBMSM
Chairman and Managing Director,
MultiSpectra Consultants,
23, Biplabi Ambika Chakraborty Sarani,
Kolkata – 700029, West Bengal, INDIA.


Businesses that restrict themselves to proprietary software like Microsoft Office and Adobe Photoshop get a raw deal. Not only do they have to pay for the software but they have to factor in the cost incurred every time the software becomes corrupt. This includes the fee to be paid to the computer technician to re-install the software. All this creates a vicious cycle, where costs and delays keep mounting. It should be the primary aim of every business to develop a system that automates maintenance to the maximum possible extent.

This is where open source software like LibreOffce, Apache OpenOffce, Scribus, GIMP, Inkscape, Firefox, Thunderbird,WordPress, VLC media player, etc, come in. My company, MultiSpectra Consultants, uses open source software to the maximum possible extent, thereby streamlining business processes. It makes updating the software and its maintenance very easy. The required software can be freely downloaded from the Internet and updates can also be applied by simply downloading the latest version of the relevant software. With free and open source software (FOSS) anyone is freely licensed to use, copy, study and change the software in any way, and the source code is openly shared so that people are encouraged to voluntarily improve the design of the software. This is in contrast to proprietary software, for which the software is under restrictive copyright and the source code is usually hidden from the users. The benefits of using FOSS include lower software costs, higher security and stability (especially with regard to malware), better privacy protection and more control over the hardware.

So, let us take a brief look at a key open source software, GIMP. The GNU Image Manipulation Program (GIMP) is a free and open source raster graphics editor used for image retouching and editing, free-form drawing, resizing, cropping, photo-montages, conversion to different image formats and more specialised tasks. It is the open source equivalent of Adobe Photoshop.

GIMP is primarily developed by volunteers as a free and open source software project associated with both the GNU and GNOME projects. Development takes place in a public git source code repository, on public mailing lists and in public chat channels on the GIMPNET IRC network. New features are held in public separate source code branches and merged into the main (or development) branch when the GIMP team is sure they won't damage existing functions. Sometimes this means that features that appear complete do not get merged or take months or years before they become available in GIMP. The version number used in GIMP is expressed in a major -minor-micro format, with each number carrying a specifc meaning. The first (major) number is incremented only for major developments (and is currently 2). The second (minor) number is incremented with each release of new features, with odd numbers reserved for in-progress development versions and even numbers assigned to stable releases. The third (micro) number is incremented before and after each release (resulting in even numbers for releases and odd numbers for development snapshots), with any bug fixes subsequently applied and released for a stable version. The user interface of GIMP is designed by a dedicated design and usability team. GIMP itself is released as source code. After a source code release installers and packages are made for different operating systems by parties who might not be in contact with the maintainers of GIMP.

The current version of GIMP works with various operating systems including Microsoft Windows, Linux and Mac OS. Many Linux distributions have GIMP as a part of their desktop operating systems, including Fedora and Debian.

Features of GIMP

Animation Showing Brushes, Patterns, Gradients Created in GIMP
Tools used to perform image editing can be accessed via the toolbox, through menus and dialogueue windows. They include filters and brushes, as well as transformation, selection, layer and masking tools.

Colour
There are several ways of selecting colours, including palettes, colour choosers and using an eyedropper tool to select a colour on the canvas. The built-in colour choosers include RGB/HSV selector or scales, water-colour selector, CMYK selector and a colour-wheel selector. Colours can also be selected using hexadecimal colour codes as used in HTML colour selection. GIMP has native support for indexed colour and RGB colour spaces; other colour spaces are supported using decomposition where each channel of the new colour space becomes a black-and-white image. CMYK, LAB and HSV (hue, saturation, value) are supported this way. Colour blending can be achieved using the Blend tool, by applying a gradient to the surface of an image and using GIMP's colour modes. Gradients are also integrated into tools such as the brush tool, when the user paints this way the output colour slowly changes. There are a number of default gradients included with GIMP; a user can also create custom gradients with tools provided. Gradient plug-ins are also available.

Selections and paths
GIMP selection tools include a rectangular and circular selection tool, free select tool, and fuzzy select tool (also known as magic wand). More advanced selection tools include the select by colour tool for selecting contiguous regions of colour—and the scissors select tool, which creates selections semi-automatically between areas of highly contrasting colours. GIMP also supports a quick mask mode where a user can use a brush to paint the area of a selection. Visibly this looks like a red coloured overlay being added or removed. The foreground select tool is an implementation of Simple Interactive Object Extraction (SIOX) a method used to perform the extraction of foreground elements, such as a person or a tree in focus. The Paths Tool allows a user to create vectors (also known as Bézier curves). Users can use paths to create complex selections, including around natural curves. They can paint (or "stroke") the paths with brushes, patterns, or various line styles. Users can name and save paths for reuse.

Image editing
There are many tools that can be used for editing images in GIMP. The more common tools include a paint brush, pencil, airbrush, eraser and ink tools used to create new or blended pixels. The Bucket Fill tool can be used to fill a selection with a colour or pattern. The Blend tool can be used to fill a selection with a colour gradient. These colour transitions can be applied to large regions or smaller custom path selections.

GIMP also provides "smart" tools that use a more complex algorithm to do things that otherwise would be time consuming or impossible. These include:
Clone tool, which copies pixels using a brush
Healing brush, which copies pixels from an area and corrects tone and colour
Perspective clone tool, which works like the clone tool but corrects for distance changes
Blur and sharpen tool blurs and sharpens using a brush
Smudge tool can be used to subtly smear a selection where it stands.
Dodge and burn tool is a brush that makes target pixels lighter (dodges) or darker (burns)

Layers, layer masks and channels
An image being edited in GIMP can consist of many layers in a stack. The user manual suggests that "A good way to visualize a GIMP image is as a stack of transparencies," where in GIMP terminology, each level (analogous to a transparency) is called a layer. Each layer in an image is made up of several channels. In an RGB image, there are normally 3 or 4 channels, each consisting of a red, green and blue channel. Colour sublayers look like slightly different grey images but when put together they make a complete image. The fourth channel that may be part of a layer is the alpha channel (or layer mask). This channel measures opacity where a whole or part of an image can be completely visible, partially visible or invisible. Each layer has a layer mode that can be set to change the colours in the image.

There is support for several methods of sharpening and blurring images, including the blur and sharpen tool. The unsharp mask tool is used to sharpen an image selectively — it sharpens only those areas of an image that are sufficiently detailed. The Unsharp Mask tool is considered to give more targeted results for photographs than a normal sharpening filter. The Selective Gaussian Blur tool works in a similar way, except it blurs areas of an image with little detail.

The latest version of GIMP is GIMP 2.10. GIMP 2.10 is the result of six years of work that originally focused on porting the program to a new image processing engine, GEGL. However the new version ships with far more new features, including new and improved tools, better file formats support, various usability improvements, revamped colour management support, a plethora of improvements targeted at digital painters and photographers, metadata editing and much more including an updated user interface and initial HiDPI support

One thing immediately noticeable about GIMP 2.10 is the new dark theme and symbolic icons enabled by default. This is meant to somewhat dim the environment and shift the focus towards content.

There there are now 4 user interface themes available in GIMP: Dark (default), Grey, Light, and System. Icons are now separate from themes and both colour and symbolic icons are present, so GIMP can be configured to have the System theme with coloured icons if the old look is preferred.

Moreover, icons are available in four sizes now, so that GIMP would look better on HiDPI displays. GIMP will do its best to detect which size to use but one can manually override that selection in Edit > Preferences > Interface > Icon Themes.

The ultimate goal for v2.10 was completing the port to GEGL image processing library started with v2.6 when the optional use of GEGL for colour tools and an experimental GEGL tool was introduced, and continued with v2.8 where GEGL-based projection of layers was added.

Now, GIMP uses GEGL for all tile management and builds an acyclic graph for every project. This is a prerequisite for adding non-destructive editing planned for v3.2.

There are many benefits from using GEGL and some of them can already be enjoyed in GIMP 2.10.

High bit depth support allows processing images with up to 32-bit per colour channel precision and open/export PSD, TIFF, PNG, EXR, and RGBE files in their native fidelity. Additionally, FITS images can be opened with up to 64-bit per channel precision.

Multi-threading allows making use of multiple cores for processing. Not all features in GIMP make use of that. A point of interest is that multi-threading happens through GEGL processing, but also in core GIMP itself, for instance to separate painting from display code.

GPU-side processing is still optional but available for systems with stable OpenCL drivers. One can find configuration options for multi-threading and hardware acceleration in Edit > Preferences > System Resources.

Another benefit of using GEGL is being able to work on images in a linear RGB colour space as opposed to gamma-corrected (perceptual) RGB colour space.



Here is what it boils down to: one now have both linear and perceptual versions of most blending modes. There is now a linear version of the Colour Invert command. One can freely switch between the two at any time via Image > Precision submenu. One can choose which mode is displayed in the Histogram docker. One can apply Levels and Curves filters in either perceptual or linear mode. When higher than 8-bit per channel precision is used, all channels data is linear. One can choose whether the gradient tool should work in perceptual RGB, linear RGB, or CIE LAB colour space.

Colour management is now a core feature of GIMP rather than a plug-in. This made it possible, in particular, to introduce colour management to all custom widgets: image previews, colour and pattern previews, etc.

GIMP now uses LittleCMS v2 which allows it to use ICC v4 colour profiles. It also partially relies on the babl library for handling colour transforms since babl is simply up to 10 times faster than LCMS2. Eventually, babl could replace LittleCMS in GIMP. GIMP now ships with two groups of blending modes: legacy (perceptual, mostly to make old XCF files look exactly as before) and default (mostly linear).

New blend modes are:
LCH layer modes: Hue, Chroma, Colour, and Lightness;
Pass-Through mode for layer groups;
Linear Burn, Vivid Light, Linear Light, Pin Light, Hard Mix, Exclusion, Merge, and Split.

Layers, paths and channels can also be tagged with colour labels to improve project organisation. Compositing options for layers are exposed to users now and all layer-related settings are finally available in the Layer Attributes dialogue.

Moreover, if one always needs alpha in one’s layers, one can enable automatic generation of the alpha channel in imported images upon opening them. See Edit > Preferences > Image Import and Export page for this and more policies. Layer groups can finally have masks on:

Colour dialogues now have an LCH colour selector one can use instead of HSV. The LCH selector also displays out-of-gamut warning. A new Hue-Chroma filter in the Colours menu works much like Hue-Saturation but operates in CIE LCH colour space. The Fuzzy Select and the Bucket Fill tools can now select colours by their values in CIE L, C, and H channels. Both the Colour Picker and the Sample Points dialogue now display pixel values in CIE LAB and CIE LCH at oner preference.

New Unified Transform tool simplifies making multiple transforms, such as scaling, rotating, and correcting perspective in one go.

The new Warp Transform tool allows doing localised transforms like growing or shifting pixels with a soft brush and undo support. As such, the new tool retires the old iWarp filter that was innovative at the time of its inception (and pre-dated Photoshop’s Liquify filter), but was ultimately cumbersome to use. The Warp Transform tool also features an Eraser mode to selectively remove changes, previously unavailable in the iWarp filter.

The new Handle Transform tool provides an interesting approach at applying scaling, rotating and perspective correction using handles placed on the canvas. People who are used to editing on touch surfaces might find this tool strangely easy to grasp.

The Blend tool has been renamed to Gradient tool and its default shortcut changed to G. But this pales in comparison to what the tool can actually do now and it is a lot. The new tool pretty much obsoletes the old Gradient Editor dialogue. Now one can create and delete colour stops, select and shift them, assign colours to colour stops, change blending and colouring for segments between colour stops and create new colour stops from midpoints right on the canvas.

All gradients available by default are also “editable” now. What it means is that when one tries to change an existing gradient from a system folder, GIMP will create a copy of it, call it a Custom Gradient and preserve it across sessions. Unless, of course, one edits another ‘system’ gradient, in which case it will become the new custom gradient.

The Foreground Select tool can finally make subpixel selections in complex cases such as strays of hair on textured background. Two new masking methods are now available for that.

The Select by Colour and Fuzzy Select tools now both feature a Draw mask option to display future selection area with a magenta fill and the latter tool also got a Diagonal neighbours option to select diagonally neighboring pixels.

For the Free Select tool, closing a polygonal/free selection now does not confirm the selection automatically. Instead, one still can tweak positions of nodes (where applicable), then press Enter, double-click inside the selection or switch to another tool to confirm the selection.

The Intelligent Scissors tool finally allows to remove the last added segment with Backspace key, and GIMP now checks, whether the first and the last segments are distinct before closing the curve.

All colour tools have been refactored to become GEGL-based filters. Hence, the Colour submenu in the Tools menu has been removed and these filters are now mostly unavailable in the toolbox.

The Text tool now fully supports advanced input methods for CJK and other non-western languages. The pre-edit text is now displayed just as expected, depending on oner platform and Input Method Engine. Several input method-related bugs and crashes have also been fixed.

N-Point Deformation tool introduces the kind of smooth, as little rigid as possible, warping one would expect physical objects to have.

Seamless Clone tool is aimed to simplify making layered compositions. Typically, when one pastes one image into another, there are all sorts of mismatches: colour temperature, brightness etc. This new experimental tool tries to adapt various properties of a pasted image with regards to its backdrop.

To enable these tools, one needs to first enable the Playground page of the Preferences dialogue. It is done by running GIMP with a ‘—show-playground.’ switch (for Windows, one might want tweaking the path to GIMP in the shortcut properties accordingly). Then one needs to go to Edit -> Preferences -> Playground and enable the respective options so that the tools would show up in the toolbox.

GIMP 2.10 ships with a number of improvements requested by digital painters. One of the most interesting new additions here is the MyPaint Brush tool that first appeared in the GIMP-Painter fork.

The Smudge tool got updates specifically targeted at painting use case. The new No erase effect option prevents the tools from changing alpha of pixels and the foreground colour can now be blended into smudged pixels controlled by a new Flow slider, where 0 means no blending.

All painting tools now have explicit Hardness and Force sliders except for the MyPaint Brush tool that only has the Hardness slider. GIMP now supports canvas rotation and flipping to help illustrators checking proportions and perspective.

A new Brush lock to view option gives one a choice whether one wants a brush locked to a certain zoom level and rotation angle of the canvas. The option is available for all painting tools that use a brush except for the MyPaint Brush tool.

New Symmetry Painting dockable dialogue, enabled on per-image basis, allows one to use all painting tools with various symmetries (mirror, mandala, tiling…). This new version of GIMP also ships with more new brushes available by default. Some of the new GEGL-based filters are specifically targeted at photographers: Exposure, Shadows-Highlights, High-pass, Wavelet Decompose, Panorama Projection and others.

On top of that, the new Extract Component filter simplifies extracting a channel of an arbitrary colour model (LAB, LCH, CMYK etc.) from the currently selected layer. If one is used to decomposing and recomposing images just for this, his work will be easier now. Moreover, one can now use either darktable or RawTherapee as GIMP plug-ins for opening raw files. Any recent version of either application will do. A new Clip Warning display filter will visualise underexposed and overexposed areas of a photo for one, with customisable colours. For now, it is mostly geared towards images where colours are stored with floating point precision. one will mostly benefit from this if one work on 16/32 bit per channel float images such as EXR and TIFF.

Plug-ins
GIMP now ships with over 80 GEGL-based filters. A lot of those are former GIMP effects. Here is why GEGL-based implementations are better:
One can apply them on images in 32-bit per colour channel precision mode.
One can preview them right on the canvas, and if an image is larger than the viewport, GIMP will render the viewport first for immediate feedback.
One can use split preview to compare original image with its processed version and swap before/after sides both horizontally and vertically.
In a future non-destructive GIMP, one will be able to adjust settings of those filters without undoing a ton of steps.

Some of the GEGL-based filters have OpenCL version for hardware acceleration. This will come in handy, if OpenCL drivers work well for one. Furthermore many operations can come multi-threaded to use oner processor at their full power.

While working with active users, quite a few usability issues were got rid of. Here are just some of these changes:
All transformation tools now automatically disable original layer view so that one can clearly see adjustments against the backdrop.
Masks can now easily be created with last values one used by just pressing Shift and clicking on respective layer’s preview.
All dialogues except the ones like Scale now remember last values one used across sessions.
All GEGL-based filters allow saving named presets and automatically make timestamped presets for the last time one used them.
One can now choose fill colour or pattern for empty spaces after resizing the canvas.

File formats support
GIMP is now capable of reading and writing TIFF, PNG, PSD, and FITS files with up to 32-bit per channel precision where applicable. The PSD plug-in additionally supports pass-through, hard mix, pin light, vivid light and linear light blending modes. GIMP now also ships with native WebP support, including features like animation, ICC profiles, and metadata. Both importing and exporting are supported. The JPEG 2000 plug-in was rewritten to use the OpenJPEG library rather than the somewhat obsolete Jasper library. Finally, the PDF plug-in now supports importing password-protected files (one need to know the password) and exporting multi-page PDF documents (each layer will be a page).

Metadata viewing, editing and preservation

GIMP now ships with plug-ins for viewing and editing Exif, XMP, IPTC, GPS, and DICOM metadata. They are available via the Image > Metadata submenu. GIMP will also preserve existing metadata in TIFF, PNG, JPEG, and WebP files. Each plug-in has respective options when exporting to enable or disable exporting the metadata. Additionally, users now can set defaults to preserving or not preserving metadata in all affected file format plug-ins at once depending on whether they want complete privacy or, instead, do a lot of micro-stock photography. The settings are available on the Image Import and Export page in Preferences.

On-canvas interaction
GIMP 2.10 ships with a new feature that allows some GEGL-based filters to render on-canvas controls. For now, this applies to just three filters: Spiral, Supernova, and Panorama Projection.

Search system
As GIMP keeps growing and getting more features, it becomes increasingly difficult to locate this or that command in the user interface. This is especially true when one is a new user who has yet to master image editing or an experienced user who is accustomed to a different application. GIMP 2.10 comes with a search system that allows easily locating a command available in GIMP’s menu. The slash key (/) has to be pressed, a keyword typed and the command that looks most applicable choosen.

The next big update will be v3.0 that will feature GTK+3 port and a lot of internal changes. For users, this will mostly mean: updated user interface, better support for graphic tablets, better support for HiDPI displays, better support for Wayland on Linux.

Image Formats Overview

Pros and cons of various images formats from a GIMP perspective

XCF

XCF is named after the eXperimental Computing Facility where GIMP was authored.

Pros
The Native GIMP image format. Everything is saved: layers, selections, channels, paths and more.

Cons

Not a “display” format, even if one can find codecs to display thumbnails of XCF image in file explorers.
Bulky.
Colour channels are coded in 8 bits (in GIMP 2.8).

Recommended uses

Saving all GIMP work.

JPG

Pros

Compresses the files quite efficiently.
Universally supported for display.

Cons

Compression is “lossy” and it slightly alters the image data. In case of global changes (colour, contrast…) repeated file editing will slowly degrade the image quality.
At good quality levels, compression is invisible in photography but can be seen (so called “artifacts”) in computer-generated graphics and text.
Does not support transparency.
Colour channels are coded on 8 bits.

Recommended uses

Display of photography.
Storage of photography.

PNG

Pros

Lossless format, all pixels are kept.
Supports partial transparency.
Produces small files with most computer graphics.
Supported by all browsers.

Cons

Complex images (photos) are bulky.
Colour channels are coded in 8 bits.

Recommended uses

Web page widgets: banners, buttons, frames, etc.
Computer graphics.
Screenshots (unless this screenshot contains mostly a photo).

GIF

Pros

Universally supported for animation.

Cons

Only 256 colours per image, leads to blocky look (a modern variant supports 256 colours per frame, but GIMP does not use it).
Supports transparency but only as fully transparent/fully opaque.

Recommended uses

Small animated images (in all other still-image uses PNG is a better alternative, and for bigger animation modern HTML supports video).

TIFF

Pros

Lossless format, all pixels are kept.
Colour channels can be coded in 16 bits.
Can store several images (layers).
Supported by all image processing software.

Cons

Can be bulky on complex images.

Recommended uses

Storage and exchange of high quality images.

Raw images formats (NEF (Nikon), CR2 (Canon)…)

Pros

No loss of information from the camera sensor (in theory).
High-depth colour channels (12 or 14-bit).

Cons

Proprietary (except DNG).
Content format can change without notice (new camera models), this can impact support by one’s favorite software.
Bulky.
Not suitable for display.

Recommended uses

Storage of camera output but a secondary copy in some universal format could be a good idea.

There are of course many other image formats but the formats above cover most uses. One should use them unless one knows better, they can usually be converted easily to any other format should the need arise.

Selling GIMP

The terms and conditions for copying, distribution and modification of GIMP are clearly listed in the GNU General Public License. Redistribution for free or for profit is specifically allowed as long as the license is included and the source code is made available. Besides the rights and conditions given by the GPL, it would also be nice (but not required) to mention in any advertising that the product being sold is GIMP (or a bundle including GIMP) or is derived from it.

Recommendations for those who sell copies of GIMP

If you or your company intend to sell GIMP, it would be nice to follow these guidelines:

Be honest. Do not try to hide the fact that the product that you are selling is or contains GIMP (the GNU Image Manipulation Program). Mention it in any advertisement.

Add value. Try to provide more than what can be found in the default GIMP package. Include a nice installer, additional plug-ins, some nice artwork, some custom brushes and textures, your own tutorials and documentation, printed copies of the documentation, etc. There are many ways to add value to GIMP and to make your customers happy.

Respect the GPL. The GPL requires you to make the source code available. The best solution is to include the source code on the same medium as the GIMP installation package, but you can also include a written offer to supply the source code on request. Note that you cannot simply give a link to the GIMP ftp mirrors: it should be the exact source code that was used to compile the binary package that you are selling and you have to cover the costs of redistribution yourself. If you sell and distribute the binaries online, the GPL requires you to make the source code available “from the same place” so giving a link to the GIMP mirrors is not sufficient.

Support your users. If the version of GIMP that you are selling is modified in any way, you should inform your users and try to handle the support requests related to that version. Providing good support is another way to make your customers happy.

Finally, think about giving something back. If the software created by many volunteers helps your business, it would be nice to return the favour by helping the developers. You can contribute by sending some improvements to the code or by sponsoring some events such as the GIMP developer’s conference. This is not required but happy developers are more likely to create a better product that you can sell later.

While open source software can be obtained free, there are also some issues involved when using these. One is the frequency of updates, which depends solely on the developers. Frequent updates are preferred so that the software remains useful. Another issue is the stability of the software. Business critical software must be stable and bug-free. Compatibility with proprietary software used by business partners is another issue. A company must be able to open a document sent by a business partner who uses proprietary software.

My company has developed what it calls the MultiSpectra OS. This basically consists of Ubuntu Linux with LibreOffce, Scribus, GIMP, Inkscape, Firefox, Thunderbird and VLC media player.

© MultiSpectra Consultants, 2019.

No comments:

Post a Comment

Key Open Source Software for Boosting Business Productivity

Key Open Source Software for Boosting Business Productivity Dr. Amartya Kumar Bhattacharya BCE (Hons.) ( Jadavpur ), MTech ( Civi...