mtPaint - Simple paint tutorial

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

Black and white graphic

#41 Post by don570 »

Here's how to make a black and white graphic image out of color jpeg.

Open a jpeg picture of person's head. Convert to grey and make the
document 'indexed'
Go to menu...

Effects > Greyscale (Gamma corrected)

Image > Convert to Indexed
_________________________________________________


Reduce the number of colors to just 3 indexed colors. Go to menu...

Image > Convert to Indexed

Recommended options for best quality-->
Wu Quantize(Diameter based weighting)
dithered

Image

If you wish you can use black paintbrush to blacken the background
behind the head.

For more editing you must return image back to RGB i.e. 24 bit color
Image > Convert to RGB

_____________________________________________________
Tip : to continue to edit with a paint brush the go to menu...
Pallette > Load Default
You will now have access to more colors in your pallette.
You will be able to modify the image with any color imaginable!
_____________________________________________


To reduce the dithered look a gaussian blur is needed.
For a Gaussian blur of 1 go to menu...
Effects > Gaussian Blur

Image

_______________________________________________________

To give more contrast go to menu and adjust contrast and gamma
Effects > Transform Color...

Here is final image suitable for book cover :lol:

Image
_______________________________________________

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

color graphic

#42 Post by don570 »

To make a color graphic of head shot is only slightly harder than previous
example.

Start with the same jpeg image of person's head.

Go to menu...
Image > Convert to Indexed

The same settings as in previous example--->
3 indexed colors
Wu Quantize(Diameter based weighting)
dithered

Three colors are now used, however not black or white.

Image

To change the overall color of image from brown to pink , go to menu...
Pallette > Palette Editor ...

Color 0 remains same i.e. a dark color
Color 1 is changed to #FFECFD
Color 2 is changed to #AC7F67

Pressing the preview button once (or sometimes twice) shows the result.

Image

For further editing go to menu...
Image > Convert to RGB

A gaussian blur of 1 will reduce dithered look.

For further editing with colors you MUST load the default color pallette
Pallette > Load Default

To select just the head
Channels > Edit Selection (cleared)

Carefully use a paint brush to select the head .
DO NOT select any background. Yellow indicates a selected region.
Note that the previous gaussian blur has removed most of dithering effect.

Image

Right click on paintbucket to set tolerance high
Finish selection with paintbucket fill.
Gaussian blur of 2

Now you must go back to editing the image by going to menu....
Channels > Edit Image

To give more contrast to final picture
go to menu and adjust contrast and gamma...
Effects > Transform Color...

Select all and copy to clipboard

Here is the final head pasted into another image

Image
________________________________________________
Last edited by don570 on Mon 28 Jul 2014, 23:47, edited 1 time in total.

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

#43 Post by don570 »

If you want the shadow behind the head to be a lighter color than black
here is how I would do it. ----> use low alpha value

EDIT: I found a simpler method so I have modified this post.

for shadow of head --> low alpha black is used
Put your finished head in the clipboard.
Paste it in a new layer.

Crop head region since that is all you need.

________________________________
Now we will create an alpha channel with low alpha.
That is all we need. It's very easy with mtpaint.

Channels > Edit Alpha
to show the head
If you don't see the head then you must choose the following command...
Channels > View Alpha as an overlay

Set alpha to a low value (30 to 60) in settings toolbar window

Now go back to editing the image...


Channels > Edit Image

You now have an image with an alpha channel so it is tinted blue.
Note that your image is starting blank (i.e. alpha = 0) despite the
fact that you can see a faint head in window. The faint head is
strictly to act as an aid.

Paint the head black with a paintbrush not the paintbucket.
The black paint will be the shadow.
Note: I couldn't get paintbucket to work well enough.
The unpainted region will have alpha = 0

Here I have started the painting process. I will finish it by painting over entire head.

Image

Do a gaussian blur of 10 to give a shadow a more realistic feel.

Note : Gaussian blur isn't shown very realistically in this window.
It simply expands the heads size.
Select all and copy to clipboard.
You can now paste the clipboard into another document
with a white background to check the result. Gaussian blur can now be checked.
Image

For a final image you paste the head and other elements on top
of shadow ....

Image

__________________________________________

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

Create circles,spheres, and ellipses

#44 Post by don570 »

Here is a practise exercise for beginners.


There are numerous methods to create circles,spheres, and ellipses.
Start with a mtpaint window .
Settings tool window should be showing.
Set the image type to RGB

Image > Convert to RGB

Explanation: The turning of the Gradient mode ON and OFF is done
with a simple click of the oblong icon in the Settings tools window.
The placement line is shown with a dashed line when Gradient mode is ON.
The length of line is the radius of circle. It is made with the gradient placement tool.

Instructions: make a rectangular selection
With gradient mode OFF
and Rectangular selection icon ON
go to menu ...

Selection > Fill Ellipse
This method has the benefit that an ellipse is
possible as well as circle. The circle is made with color A.
Gradients are possible but tricky.
Right click Gradient placement icon and set Type = Radial
The gradient placement line must be adjusted so that
center of circle is where desired. A selection rectangle is
drawn around this circle center.
With gradient mode ON
and Rectangular selection icon ON
go to menu ...

Selection > Fill Selection
The radius of circle will depend on length of placement line
if length of gradient is left at default setting.

Here is the results that are possible...

Image
__________________________________________________________

Also it is possible to draw only part of a circle.
In this example Color A is Green and Color A is White
With gradient mode ON
and Rectangular selection icon ON
go to menu ...

Selection > Fill Selection

Alternatively you can use the cut command (Ctrl-X) rather than
Fill Selection. The effect will be similar.

Image
____________________________________________________________

Here's another method that has the benefit that the center of
the circle is known precisely. Also gradients are
possible. However ellipses aren't possible.
Again the type of gradient must be Radial.
With the gradient mode ON
Use your paint bucket with one click in the window region.
You can click the other mouse button to pour in opposite direction.

If your paint bucket is not pouring paint then
right click the paintbucket icon to obtain the fill settings
and set tolerance to a high number = 200

or perhaps you don't have the default color palette.

Image
Last edited by don570 on Tue 29 Jul 2014, 21:57, edited 1 time in total.

User avatar
mister_electronico
Posts: 969
Joined: Sun 20 Jan 2008, 20:20
Location: Asturias_ España
Contact:

Hi don570

#45 Post by mister_electronico »

Very good post, like other you did it .Mtpaint is good program I use along with nconvert command nconvert a small command with endless possibilities.

Good luck see you.

http://www.murga-linux.com/puppy/viewto ... 473#664473

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

#46 Post by don570 »

I was able to translate your page from Spanish to English by a useful trick
using Firefox.

I pasted the link into a google search box. Then I had to click
'repeat the search with the omitted results included. '

Then I saw a search result that had a translation.

Image

or alternatively go to https://translate.google.com/ and paste address
______________________________________________

User avatar
mister_electronico
Posts: 969
Joined: Sun 20 Jan 2008, 20:20
Location: Asturias_ España
Contact:

lol

#47 Post by mister_electronico »

lol .... What is interesting is not the text but the images and what can be done with the command nconvert.

Just a command line become a picture as you want.

See pictures nconvert only can make endless combinations.

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

#48 Post by don570 »

Using mtpaint 3.44.89 or better it is possible to add some text
such as copyright notice to the top of a bunch of images stored in a folder.
The text is pasted at (0,0). This can be changed in script.
Modify the script if you wish. You can change the suffix and you can hange the image format for example png.

Instructions:
1) Put all images (jpegs in this example) in a folder my_images in /root.
2) Make color A a bright color such as yellow
3) Make and then save some yellow text to hard disk clipboard so it is available.
Menu > Edit > Save Clipboard > 1
4) Run script ...

Code: Select all

#!/bin/sh
 for ZAD in /root/my_images/*.jpg ;do
  SUFFIX=_mod
  mtpaint --cmd -file/open="$ZAD" -e/'Load Clipboard'/1 -e/paste x=0 y=0   -selection/'Select None' -file/as="$ZAD"$SUFFIX
  mv -f  "$ZAD"$SUFFIX.jpg   "${ZAD%.jpg}"$SUFFIX.jpg
done 


Here's an example of some yellow text added to a jpeg image.

Image
Last edited by don570 on Mon 06 Oct 2014, 16:57, edited 2 times in total.

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

#49 Post by don570 »

minimum requirements mtpaint 3.44.89

Using inkscape(lite) you can make a border pattern (see below)

Image

Launch mtpaint and open the svg image

Got to menu , open script window and modify script line

Menu > Image > Script

Code: Select all

 -image/free=45  -image/resize=mirror w=x2 
or if you wish to use the terminal to execute a simple command...

Code: Select all

mtpaint --cmd -file/open=border.svg -image/free=45  -image/resize=mirror w=x2 -file/as=zad

The result shows tranparency

Image

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

#50 Post by don570 »

Here's another example using an image ...
(Note that the image was saved from mtpaint
with black as the transparent color)

Image

Got to menu , open script window and modify script line

Menu > Image > Script

Code: Select all

-p/edit=a colour=black  -image/free=45  -image/resize=mirror w=x2
The final result..

Image

Pelo

mtPaint tuto video .avi loaded.

#51 Post by Pelo »

mtPaint tuto video .avi loaded. everething looks less complicated, however you speak english, and ... loud.
But i understand Quite everything thanks to images.
It will be my first lesson.

highway_man
Posts: 21
Joined: Thu 07 Feb 2013, 03:22

#52 Post by highway_man »

Following the "Hello World" example...
Start with a simple 24bit RGB drawing in black and white
(see my snowman drawing).


Is there any chance that this single step can be broken out into an even simpler tutorial? I have managed three circles and two squares to make a snowman with a square hat. No arms and all lines have minimal width (no thickness).

Can mtPaint crop, re-size, move selection, create collage, etc? It was actually the collage that started me on mtpaint until I found that PeasyGlue can stictch together pictures. I still prefer to be able to arrange pictures graphically, that blindly. Thus my attempted quest into mtPaint.

****************
***...UPDATE...***
****************
The answer to my question can be found in the SourceForge documentation.
http://mtpaint.sourceforge.net/handbook ... ap_00.html

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

#53 Post by don570 »

Here's a new way of making a text heading using emboss.
I'll go through the steps quickly.

Start with new document (RGB not indexed)

Channels > Edit Alpha (cleared)

Place size 72 text in document
(invert box ticked)

Image

Apply a mtpaint script
Script window --->

Code: Select all

 -effect/gaussian=17 -effect/emboss -effect/unsharp r=70 am=10.0  -effect/greyscale
Result of script....

Image

Channels > Edit Image
Selection > Select all
Edit > Copy

Create a new RGB document.
Fill with a color that you desire for your text (in this example red).
Paste the clipboard into this new document
Effects > Transform color
Set contrast to very high . Slightly increase brightness and saturation.
Apply any other effects you wish.

Result of pasting into a red document.....

Image
________________________________________________________

To make a cleaner outline of text characters

To make a cleaner outline of text characters use the 'paste swap' feature.
Make a text character (untick background) ,
then paste the text character into red document.


Use 'Paste swap' which is explained in sec 4.9 in mtpaint manual)
Press shift - <Enter> key

This transfers the red character to the moveable selection. The selection
can be save to your hard disk.

Edit > Save selection > 1

In my example I pasted the red character into a white document.(see image below)

___________________________________________


Black shadow feature

Edit: Just paste on blury black for a shadow

Effects > Erode is also useful

Image
_______________________________________________
Last edited by don570 on Tue 28 Oct 2014, 00:43, edited 1 time in total.

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#54 Post by wjaguar »

don570 wrote:-effect/gaussian=17 -effect/emboss -effect/unsharp r=70 am=10.0 -effect/greyscale
An interesting way to simulate bumpmapping. :-)

However, it can be done nicer, using the same principle. Paste white text into black background, and then:

Code: Select all

-effect/gaussian=17 -i/cl -i/cl -effect/emboss -effect/unsharp r=70 am=10.0 -i/cl -i/cl
Then copy the result, and paste it into destination using the "Grain merge" blend mode. See the example below.
(Also "Hard light" mode can be used. And colored text instead of white.)
However there will likely be unwanted white pixels.
There shouldn't be, if you preserve the original clipboard with text cutout (say, save it, and reload when needed), instead of pasting it onto white background and then re-copying back.
Attachments
grain.png
(14.66 KiB) Downloaded 754 times

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

#55 Post by don570 »

Here is the Gimp example that I wanted to duplicate.
Note that it uses the 'Grain merge mode'
http://gimpchat.com/viewtopic.php?f=23&t=6268
_______________________________________________

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#56 Post by dejan555 »

Had a little fun doodling.
The thing you did before with mirroring can be done in a slightly different way.
If it's a square canvas (say 600x600) and you draw something in top-left quarter of image you can just duplicate layer and go to Image->Rotate clockwise
Repeat two more times till you have it in all quarters of image.
That's what I did for lines in corners outside the circle here.
Attachments
Cat.png
(48.19 KiB) Downloaded 708 times
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#57 Post by dejan555 »

Here's another quick one
The big circle is made on first layer but everything else is added on new layers then copied and rotated.
With a little effort you can make interesting decorative images.
In gimp, after this step, I used to create a box out of this with map object function.

Hint for using Settings / Layers windows:
I usually make them top level windows then shade them when needed to get them out of the way so you only see a titlebar and expand when needed (a simple scroll up or down on titlebar in jwm or double-click in fluxbox - I guess this can be customized in window manager).

Separate windows were also the most hated feature in gimp but I see them as feature and don't use a single window mode even if introduced: this way I can maximize the image window and shade/unshade the toolbox window.
Attachments
red-loop.png
(40.02 KiB) Downloaded 569 times
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#58 Post by dejan555 »

Where can I read more about scripting abilities and what can I do with both image edited in mtpaint and what through commandline only?
EDIT: Found some info in other thread about cmd commands matching menu items, that's great, but how do you copy a layer for example or set transparent colour? This is only available from Layers window but not from menu.
Great job on scripting though, this will be very usefull.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#59 Post by wjaguar »

dejan555 wrote:but how do you copy a layer for example or set transparent colour? This is only available from Layers window but not from menu.
Which is precisely the problem. ;-)

How to integrate layers window, settings toolbar window, and tools toolbar, into the system, still is an open question.
They are controlled through "View" submenu, and technically could be made addressable through it... but wouldn't that be a little bit illogical? To be calling all the functions of these windows through "-view/..." paths, that is?

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

#60 Post by don570 »

Here is the answer to an email I received --> How to put a business logo
into an image. It's a good question so I made this tutorial ...

Goal : to make a company logo

1) make a screenshot of interesting face.

2) make rectangle beside the face in the color of desired text

Image

3) The next step is to select some region
Channels > Edit Selection

4) Magnify to 300%
Use brush to select the logo.
Don't paint outside of logo .
(The selected region has a yellow tint.)

5) Gaussian blur of 2 or 3 --> this give slight blurring to edge of face

6) Place text in rectangle (invert must be ticked)

Image

7) Channels > Edit Image

8 ) Selection > Select All

9) Click lasso tool (This puts selection automatically in clipboard)

10) Edit > Save Clipboard > 1
Now logo and text can be used in another document (see image for final result)

Image
_________________________________________________________

Post Reply