Tutorial - Liquid Rescale GIMP plugin

Wikidot.com
.wikidot.com
Share on
Join this site Explore »

# Liquid Rescale GIMP plugin

## content-aware resizing for the GIMP

Create account or Sign in

### Main

- Welcome page

- Download
- Examples

### Docs

- Tutorial
- Manual
- Translations

### Forum

- General
- Get help
- Report a bug
- Request a feature

### Page tags

arch debian documentation download fedora foresight gentoo gimpportable git gnuffy images install instructions linux osx packages seven slackware sources translate ubuntu video vista windows xp zenwalk

### About

- Contributors

- Join this site
- Site members

- List all pages
- Page Tags

### Links

- GIMP
- The GIMP Plugin Registry
- LqR library

### Add a new page

Tutorial

# Videos

In this section there are some tutorial videos. They should be watched in high definition (at least 480p, but 720p and full screen are recommended). There's no audio, but there are captions explaining what's going on, so make sure to have them activated. In some cases the captions are quite fast-paced, so be prepared to use the pause button a lot.

All the videos were made using version 0.7.0 of the plugin and GIMP 2.6.8 running under Ubuntu Linux 10.4. They are not accelerated nor edited in any other way.

## Simple enlargement example

In the following video a simple enlargement example is demonstrated, and it is shown how to create a preservation mask.

The image of the video was taken from this link and is distributed under Creative Commons Attribution/Non-Commercial/Share-Alike.

## Inspecting what the plugin did

In the following video the same operations of the previous one are performed, but it shows how to inspect what the plug-in did after each step by taking advantage of a couple of useful extra options.

## Quick element removal example

The following video demonstrates how to quickly remove simple objects from an image with few clicks. The image is the same as for the first two videos.

## More complex element removal example and interactive mode

This video is longer and more complex, and shows how a non-trivial object removal can be accomplished by Liquid Rescaling. It also demonstrates how the interactive mode is used.

The image of the video was taken from this link and is distributed under Creative Commons Attribution/Non-Commercial.

# Step-by-step tutorial

In this section there are some step-by-step instructions, but they are relative to version 0.5 of the plugin and have not been updated, so some of the details are different when the same operations are performed with the latest versions of the plugin. Also, there's no coverage of the interactive mode, because that was introduced in version 0.6.

## Basic

To start using the plugin, open a not-too-large image in Gimp, better if it has a single layer (a jpg image, for example), and closely follow the steps in the following how-to's.
After each section, undo the changes (Edit->Undo in the Gimp menu, or press Ctrl+Z) in order to recover the starting image, or everything will quickly become a mess.
Note that the initial results will probably not be very good (it depends a lot on the image), but they can get much better when learning how to use the more advanced options.

### Basic shrinking

1. in the Gimp menu, choose Layer and then Liquid Rescale
2. in the Select new width and height section on the left, change the selection from pixel to percent
3. set the value of the Width to 80%
4. click Ok

The image will be shrunk horizontally.
For comparison, undo the change and repeat the above steps, this time letting the Width at 100% and changing the Height to 80%.

### Check what it's doing

In order to understand what the plugin does exactly, we have to check a couple of additional options. The above steps become:

1. in the Gimp menu, choose Layer and then Liquid Rescale
2. in the Select new width and height section on the left, change the selection from pixel to percent
3. set the value of the Width to 80%
4. go to the Output tab
5. check the Output on a new layer and Output the seams options
6. uncheck the Resize image canvas option
7. click Ok

In this way, when the plugin will finish, the original layer will be kept, and there will be two additional layers in your image: the rescaled layer and the “Seam map”.
If you make the rescaled layer invisible (click on the eye icon on the left of the thumbnail in the Layers window), the seam map will be displayed over the original image: this will show you which pixels were removed from the image to shrink it, and in which order (brighter pixels in the map correspond to the ones which were removed first).
Then undo, do the same thing, this time changing the Height value, and check the difference in the seam map.

### Basic enlarging

Enlarging is just as easy as shrinking:

1. in the menu, choose Layer and then Liquid Rescale
2. in the Select new width and height section on the left, change the selection from pixel to percent
3. set the value of the Width to 120%
4. go to the Output tab
5. check the Output on a new layer, Output the seams and Resize image canvas options
6. click Ok

As you can see, the only difference here is that we checked the option Resize image canvas checked, so that the rescaled image will be fully visible.
Now note that the seam map is exactly identical to the one which was obtained from shrinking to 80%. In this case, however, the seams show where new pixels were inserted.
This explains why it is not possible to enlarge an image more than twice in a single run, and why in general enlarging too much in a single run doesn't give good results: the more you approach 200%, the more the result will look like a normal scaling, in which every pixel will have a new one inserted at its side. It is normally much better to split big enlargements into several steps.

### Avoiding distortions with a preservation mask

On most images, the above procedures will lead to distortions in parts of the image which you would like to keep as they are.
The easiest way to try to avoid this is to use preservation masks, like this:

1. in the menu, choose Layer and then Liquid Rescale
2. in the Select new width and height section on the left, change the selection from pixel to percent
3. set the value of the Width to 80%
4. click on the New button in the Preserve features section on the right: a new layer will be created
5. put the plugin window on one side of the screen without closing it, and go back to work on the gimp main windows
6. choose the paint tool and paint over the area(s) you wish to preserve
7. go back to the plugin window
8. click the Refresh button at the bottom: you should see your preservation mask appear in the preview
9. go to the Output tab
10. check the Output on a new layer, Output the seams and Resize image canvas options
11. uncheck the Resize auxiliary layers option
12. click Ok

If you look at the seam map, and keep the preservation mask visible on the top, you will notice that the seams do not cross the areas which were marked for preservation (unless they are too big).
This, of course, implies that the seams have to cross some other areas, and it is therefore possible that these will be affected by excessive distortion.

### Quick element removal

The easiest way to remove an element from an image is the following:

1. in the menu, choose Layer and then Liquid Rescale
2. click on the New button in the Discard features section on the right: a new layer will be created
3. put the plugin window on one side of the screen without closing it, and go back to work on the gimp main windows
4. choose the paint tool and paint over the area you wish to remove
5. go back to the plugin window
6. click the Refresh button at the bottom: you should see your discard mask appear in the preview
7. optionally, in the Mode box on the left choose Lqr + scale back or Lqr + Lqr back
8. click the Auto size button at the bottom of the Discard features section (optionally choose the scaling direction in the box at the side of the button before clicking it).
9. click OK

This procedure will only give good results with simple images and very simple discard masks.
If you use the options to see the seam map like described above, you will notice that the seams this time will tend to cross the areas which you marked for removal, therefore deleting them.
Step 7 tells the plugin to go back to the original size, and how to do it. What the best choice is depends largely on the image at hand.
Of course, you can add a preservation mask before clicking Ok in order to try to get better results, just follow steps from 4 to 8 of the previous section.

## Advanced

//…to be continued… //

See the Manual page for a full description of all the features

documentation video
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
See pages that link to and include this page.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.