[Tutorial] mtPaint - change hue and rescale clipboard

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

[Tutorial] mtPaint - change hue and rescale clipboard

#1 Post by don570 »

Mtpaint works with two types of images ---> indexed and RGB.
Read the beginning of the mtpaint manual for a good
explanation of these image types.

The GIF file format was designed for indexed images
(and grey scale photos as well)

The PNG file format is good for both indexed and RGB.

Here's an example of a quick rescaling of part of an image

In this example the green square is made bigger.
Note that this is an indexed image and it will remain indexed
in this first example.

Image

The green square is cut and then transferred
to a new layer using the menu item
Edit > Paste to New Layer

Now do a rescaling
To see your transparency settings make sure you choose
View > Show Dock

Make the layer transparent (transparency color=0)
i.e. black is transparent

Image

Use one of the numbered clipboards to move it back to
the original layer. Move the selection to where you want it
and delete the top layer to finish off the job.


...and the final result

Image

_______________________________________________

However to change the hue (color) of the clipboard i.e. a portion of
your image, is more difficult and requires the change
of the image from indexed colors to RGB colors somewhere along
the process.

Here's the simplest method I found
using the 'Save composite layer'
Start with a red circle and a green rectangle like in example 1.

Image

We want the rectangle to be blue and bigger.
Let us assume that the paintbucket is unavailable
so the hue change will have be done to the clipboard.

Method : Start with a red ellipse and and a green rectangle.
Repeat the steps in the previous example but
after scaling do a hue change ( by clicking on sunshine icon)
to turn the green to blue.

Image

Make sure that the layer is transparent (transparency color=0).
Position the rectangle by changing the settings in the dock
as desired.


Image

choose the menu item
Layers > Save composite image...

Image

Unfortunately this turns the indexed image to a RGB image,
but this shouldn't matter to most people.
mtpaint can do a conversion back if desired.

If you start with a RGB image, the steps are simpler, i.e.
more like method 1.
The user gets a choice of scaling methods this time.
I recommend that the scaling be done with
the settings...
Nearest neighbor or
Bilinear/ Area Mapping
to avoid odd transparency effects


Image


+++++++++++++++++++++++++++++++++++++++++++

The above examples used rectangular selections.
Lassoed selections can have their hue changed
as well when you have a RGB image.
The color black remains solid inside the lassoed part.
(Apparently the alpha bit has been set.)
In this example I changed the color red to blue using
the upper layer as a temporary workspace,
then pasted back(using a numbered clipboard or the regular clipboard)
to the original image in the background layer.

Image

The original image is red. I lasso it and copy to clipboard and then to
a layer. Then back to original.

Image


_______________________________________________________

Here's a more practical example of a RGB image with many colors.

Image

Lasso the red circle and transfer it to a new layer,
Make a hue change ( to make it bluish)
Then transfer back to original image. The black inside the
blue circle has the alpha bit set obviously.

Image

Note if you then save the image to disk with the transparency color
= 0 i.e. black is transparent, all the black including inside the blue circle will
be transparent. Here's the result...

Image
_______________________________________
Last edited by don570 on Sat 24 Dec 2011, 16:33, edited 6 times in total.

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#2 Post by darkcity »

thanks this is useful 8)

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

RGB clipboard

#3 Post by don570 »

While making this tutorial I discovered that the clipboard wouldn't work sometimes.

Reading the mtpaint manual has provided the answer

Code: Select all

It is possible to paste an RGB clipboard onto an RGB image and an 
Indexed Palette clipboard onto an Indexed Palette or RGB image. 
As the clipboard files are standard PNG files, the user can also open 
them in another mtPaint process and edit them.
I think I was trying to paste a RGB clipboard into an indexed image.
This is not allowed.

___________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#4 Post by don570 »

I discovered that it is possible to easily remove the black paint
inside lassoed objects. The following example shows how.

On the left side of picture you see a typical paste of a lassoed object.
There is clearly black paint inside. To remove this black paint is easy.

See the right hand side of picture...

Method: First paste the lassoed object in the document.
Then choose color A = black and color B = black
Then choose from menu
Selection > Mask Colour A,B

Image

______________________________________________

Post Reply