LodePaint User Manual

Back to main page

Image Operations

This document describes the operations under the Image menu of LodePaint.

The image menu and the filter menu both are pretty similar: they contain operations done on the image. The operations in the image menu are more related to color correction, transformations, the mask and the selection of the image. The operations in the filters menu are all other effects.

Colors Submenu

Negate RGB

Inverts the RGB color of the image. For example white becomes black and vice-versa, red becomes cyan and vice-versa, etc...

Negate Lightness

Inverts the lightness of the image but leaves hue and saturation intact.

Negate

This is a negate operation that shows a GUI first. The GUI allows selecting which channels to negate. This filter allows negating R, G, B and/or A independently. It also allows negating in other color models. "Lightness" does the same as the quick "Negate Lightness" filter. "Saturation" negates the saturation instead, so that greyish parts become colored while colored areas become more greyish. It's also possible to negate channels of the CIE Lab color model: L negates the CIE Lab lightness component (which has a different effect than the regular "negate lightness"), and a/b allow negating the a and b color components of Lab, giving the image a different overall color without affecting lightness.

Solarize

This applies a sort of upside down V curve to the colors. For example, black becomes black. 25% grey becomes 50% gray. 50% gray becomes white. 75% grey becomes 50% grey. White becomes black.

Grayscale

Converts the image to grey, taking the average of the R, G and B channels of each pixel.

Colorize

This is somewhat similar to greyscale, but while greyscale gives the image colors between white and black, colorize gives colors between the current foreground and background color (the global colors chosen in the Color window). It's also possible to use the alpha channel of the chosen colors on the image.

Normalize

Tries to use the full possible range of colors in the image. If the image contains a black and a white pixel, then this operation will have no effect on the image. If the image contains only very dark pixels, then the result will be an image that uses the full range from dark to bright. And if the image contains only very bright pixels, then the darker ones will become very dark after this operation.

In other words, if the image doesn't use the full availabe gamut, this operation will make it do so. If the image already uses the full gamut, this operation has no effect.

The options in the dialog have the following effect:

-Link Channels: R, G, B (and possibly A) all get multiplied by the same value, this limits the possible amount of normalization but keeps the color information intact.
-Affect Alpha: whether or not to also normalize the alpha channel.

Posterize

Posterize reduces the amount of possible colors. Typically with RGB color, there are 256 possible values per color channel, for a total of 16 million colors. Using posterize gives a result with less possible values per color channel. E.g. when choosing amount "12", there are only 12*12*12 = 1728 possible colors in the resulting image. If the alpha channel is used and contains actual data, then this amount would actually be 12*12*12*12.

Brightness/Contrast

Allows adjusting the brightness and contrast of the image. A negative value in the brightness slider makes the image darker, a positive value makes it brighter. A negative value in the contrast slider makes the image greyer, a positive value makes it more colorful but also reduces the amount of possible colors.

Color Arithmetic

Allows adding, subtracting, etc.... a fixed color with every pixel of the image. The fixed color is chosen by clicking on the small colored square next to "Color". The "Affect Alpha" checkbox determines wheter or not you want the alpha values of the image to change too.

Color Models Submenu

These operations are similar to those in the Colors submenu, but all have to do something with one or more color models. These operations were placed in a new submenu because the Colors submenu was getting too populated.

Adjust HSLA

This allows tweaking the color values of the pixels as if they were in the "HSLA" or "Hue, Saturation, Lightness, Alpha" color model. The alpha isn't really part of the color model, it's just the same alpha channel as "RGBA" has.

With the hue slider, the hue of the image is rotated so that the color of everything changes.

With the saturation slider, negative values make the image more grey-ish, positive values make it more colorful (saturated).

The lightness slider makes the image brighter or darker.

The alpha slider changes the alpha channel of the image, negative values make the image more translucent, positive values remove translucency from the image. Only use this slider if you aren't working on an image that is supposed to be completely opaque.

Adjust HSVA

This is very similar to "Adjust HSVA", except that it uses the HSV instead of the HSL color model. These two color models are only very subtly different, so there is almost no difference between these two operations. A difference however is that in the HSV color model, the maximum brightness (Value) can contain a color, while in HSL color model the maximul brightness (Lightness) is always white, so with "Adjust HSVA", setting the "Value Adjust" slider to the maximum, doesn't remove all color information.

Multiply SLA

This operation is also somewhat similar to Adjust HSVA and Adjust HSLA. But while the former add/subtract values to the color, multiply uses multiplication. Since hue is an angle, hue isn't included in this operation.

The inverted checkbox inverts the multiplication, that is, multiplying with zero gives the maximum instead of the minimul value as a result.

Channel Switcher

The Channel Switcher allows to store channels from many color channels into the 4 channels of the RGBA image. For example, you can store the Y component of YPbPr in R, the Hue component of HSL in G, the K component of CMYK in B and the b component of Lab in A.

When the Greyscale checkbox is enabled, only one channel, instead of up to 4, are stored in the result. R, G and B all get the value of the channel chosen in the dropdown of R, A is left intact.

RGBA Matrix

This operation has a matrix of 16 values. Say the values are:

a00 a01 a02 a03
a10 a12 a13 a14
a20 a21 a22 a23
a30 a31 a32 a33

Then this operation does the following to the RGBA color of each pixel, where r, g, b and a represent the old color, R, G, B, A represent the new color, and "*" denotes multiplication:

R = a00 * r + a01 * g + a02 * b + a03 * a
G = a10 * r + a11 * g + a12 * b + a13 * a
B = a20 * r + a21 * g + a22 * b + a23 * a
A = a30 * r + a31 * g + a32 * b + a33 * a

Furthermore, the Mul, Div and Add sliders will also multiply the result with a value, divide it through a value and/or add a value to it. The Affect Alpha checkbox can be disabled if you don't want to affect the alpha channel while using Mul, Div or Add.

This operation allows emulating certain color models, for example the XYZ color model also uses a matrix with various predefined values to convert to/from RGB. Normally the alpha channel isn't included in such a matrix and it'd be a 3x3 matrix, but since alpha channel is included here it's a 4x4 matrix.

HDR

This contains effects related to HDR (High Dynamic Range) images. Some of these operations work on non-HDR images too.

HDR images in LodePaint are images with color mode RGBA32F or Grey32F.

Color Arithmetic II (HDR)

This is a pretty complex operation. It might be useful on images with floating point color to emulate various tone mapping formulas.

There are 4 different formula templates available. A dropdown allows choosing one of the formulas. The valus a, b, c, d and e used in the formulas can be edited with the sliders, spinners or text input boxes. You can also choose independently if you want to affect the R, G, B and/or A channel.

In the formulas, the symbols have the following meanings:
-a, b, c, d, e: the parameters you can edit
-"^": this symbol denotes power
-"*": this symbol denotes multiplication
-log_e: the logarithm with e as base. e is a value you can edit, this is NOT necessarily the euler number.

Tone Map (Histogram Adjustment)

This tone maps the HDR image, so that all colors fall in non-HDR range. This makes everything visible on a regular computer screen, and for regular image file formats.

The method used (histogram adjustment) can sometimes cause oversaturated colors. If that is the case, try the "Desaturate" checkbox to see if the result is then better.

Absolute Value

HDR images can have colors with negative red, green or blue values. Using the Absolute Value filter makes these values positive.

When using this filter on non-HDR images, the color grey is treated as zero, darker colors as negative, brighter colors as positive.

Color Mode Submenu

This menu allows choosing between different color modes. WARNING: currently only "RGBA 8" is well supported. "RGBA 32F" is somewhat supported. It is recommended to leave the mode at "RGBA 8", unless you want to edit a high dynamic range image.

Do not confuse this menu with the Color Models submenu! A color mode is a byte representation of the image in the memory of the computer. A color model is a mathematical represenation of colors. The Color Models submenu contains filters with effects that use color models in their calculations. The Color Mode submenu contains commands to switch the internal byte representation of the image.

RGBA 8 is the most color model for most images for the internet with alpha channel, computer game textures, etc... Unlike most painting programs, LodePaint always includes an alpha channel in images, it never has to be enabled and can't be excluded or disabled. Only when saving to a file format that doesn't support an alpha channel, it'd be removed (but PNG, BMP and TGA all support one).

RGBA 32F is a high precision modes, that can be used for high dynamic range images, or simply for having much less precision loss when doing many operations on an image. This color mode is still in development in LodePaint. Most tools and many filters don't work yet on these images. There's also no proper file format to save this images to yet, except the very unefficient sample format "example128". Note that these images can be saved to "RGBE" format, but that the "RGBE" file format actually has a MUCH lower precision than RGBA 32F and thus most information will be lost. The "example128" file format doesn't suffer from that problem, but is not an existing file format, no other program than LodePaint can open it, and has no compression.

Grey 8 and Grey 32 F are greyscale modes. These are still in development in LodePaint. Most tools and filters don't work yet on these images (and silently do nothing). These color modes will have a purpose, they're just not ready yet at this time.
NOTE: converting the color mode of an image can cause information loss when converting to a lower mode! When converting from an RGBA mode to a Grey mode and back, the color information will not come back. When converting from 128 bits per pixel to 32 bits per pixel and back, the high dynamic range colors will also not come back.

Transform Submenu

Flip X

Mirrors the image horizontally

Flip Y

Mirrors the image vertically

Rotate 90 CW

Rotates the image 90 degrees in clockwise direction.

Rotate 180

Rotates the image 180 degrees.

Rotate 90 CCW

Rotates the image 90 degrees in counterclockwise direction.

Wrapping Shift 50%

This brings the corners of the image to the center, and the center to the corners. This operation is created to be useful while editing tileable textures (such as grass), because this allows easily connecting the sides while they're in the center.

Repeat

This repeats the image a few times in the horizontal and/or vertical direction. The result is a bigger image with the old image repeated several times. This is useful to generate tileable textures or repeated patterns, repeat tiles, etc...

Rotate

This allows rotating the image with a custom angle. The "smooth" option gives antialiasing in the result. The "Lock Scale" option will not scale the image (normally when rotating the image is made bigger to make the rotated rectangle fit in the whole image). The "Wrapping" option will fill everything with pixels of the source image (in a wrapping way) instead of using the background color to fill empty parts.

Transform 2D

This allows applying an arbitrary 2x2 transformation matrix to the image. The Rotate, Flip, Shear/Skew, Rescale, etc... operations all are in fact 2D matrix operations. This filter allows entering an arbitrary one. This operation is also the one you can use to Skew or Shear the image. To do that, enter a matrix like this:

To shear in the horizontal direction:
1 -0.5
0 1
Make the value -0.5 positive to shear in the other direction. Make it larger or smaller to shear more or less.

To shear in the horizontal direction:
1 0
-0.5 1

The smooth option antialiases the result. The "Lock Scale" option will not scale the image (normally when transformed the image is made bigger to make the transformed rectangle fit in the whole image). The "Wrapping" option will fill everything with pixels of the source image (in a wrapping way) instead of using the background color to fill empty parts.

Selection Submenu

Delete selection

Deletes the selection.

The selection menu doesn't contain much other options for now, everything else is done with the mouse and the selection tool.

Select all

Selects the whole image.

Select none

Deselects everything. This can also be done with the CTRL+D shortcut.

Blend Selection

This is currently the only operation in LodePaint that allows mixing several images together. It blends the floating selection, with the image data behind the floating selection. To mix multiple images together, select all in one image, do copy (CTRL+C), then paste in another image to get the floating selection there, and use the blend operation.

Mask Submenu

These actions work on the mask, and can only be seen if the mask is toggled on. Please refer to the Mask manual for information about the mask actions.

Directly in the Image Menu

Clear

Clears the entire image to the background color.

Crop

Crops the image to the selected area. This operation only works if you have a rectangular selection in the image. To do a crop with high precision, do the following:

Choose the select rectangle tool. Zoom with the scrollwheel to the top left part of the area you want to crop, and start dragging the selection at that pixel. While keeping the mouse button down, use the scroll wheel to zoom out, then zoom in towards the area where the bottom right area of the part you want to crop is. Drag the selection to there and when it's perfectly around the pixels you want, release the mouse button. Now use the crop operation, either from the menu, or with the Crop icon in the toolbar.

Add/Remove borders

Allows removing parts of the image or adding extra pixels, to each of the 4 sides independently. New pixels are filled with the background color.

Rescale

Allows increasing or decreasing the size of the image, or choosing any arbitrary new width and height for the image.

You can choose between entering a fixed with and height, or using a percentage of the current image size, by using the "Use Percent" checkbox. Depending on the state of the checkbox, the "Width" and "Height", or "Width (%)" and "Height (%)" values are used and the others ignored.

There are multiple rescale algorithms available to choose from:
-Nearest: this is a pixely resize
-Bilinear: this uses bilinear smoothing when increasing size, antialiazing when decreasing size (note: a bicubic option is planned for later)
-Add/Remove Borders: this just crops the bottom right part of the image to decrease size, or adds new pixels with the background color to increase size, it doesn't actually scale the image
-Skewed (Ugly!): this algorithm can only be useful to fix image data that was read with a wrong width of pixel rows. In almost any other case, this can't give a useful result.

The "wrapping" checkbox can be enabled when resizing an image that is a tilable texture (such as grass). In that case, the bilinear algorithm will treat pixels on the other side of the image as neighbors, so that the resulting resized image is still tileable (without ugly visible edges).

Pixel Art Scaling

Pixel art scaling algorithms allow resizing pixel-art images with a fixed factor (x2, x3 or x4, depending on the algorithm). These algorithms are often used in emulators of old 2D game consoles, to display those old pixely computer games at a larger resolution without looking blocky. Currently 3 of those algorithms are available: Scale2x, Scale3x and hq2x.

Legal Stuff

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Copyright (c) 2009-2010 by Lode Vandevenne.

Note: No images? Get the full manual at http://sourceforge.net/projects/lodepaint/files/LodePaint_Manual_Full.zip/download/. The full manual with images is released separately because the images filesize is larger than that of the program!