mtPaint - Simple paint tutorial

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#31 Post by RSH »

Output from "ldd mtpaint" will show whether this is the case.
Entering ldd mtpaint (or ldd mtPaint) into the terminal gives message (in Precise):

Code: Select all

# ldd mtpaint
ldd: ./mtpaint: Datei oder Verzeichnis nicht gefunden
# 
Datei oder Verzeichnis nicht gefunden means: no such file or directory found

Entering ldd /usr/bin/mtpaint will give result (in Precise):

Code: Select all

# ldd /usr/bin/mtpaint
	linux-gate.so.1 =>  (0xffffe000)
	libgif.so.4 => /usr/lib/libgif.so.4 (0xb7776000)
	libjasper.so.1 => /usr/lib/libjasper.so.1 (0xb7721000)
	libtiff.so.4 => /usr/lib/libtiff.so.4 (0xb76bd000)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0xb7666000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb75cc000)
	libz.so.1 => /lib/libz.so.1 (0xb75b6000)
	liblcms.so.1 => /usr/lib/liblcms.so.1 (0xb757d000)
	libpng12.so.0 => /lib/libpng12.so.0 (0xb7553000)
	libm.so.6 => /lib/libm.so.6 (0xb7526000)
	libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb70be000)
	libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb700f000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb6fee000)
	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb6fa4000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb6f54000)
	libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb6f51000)
	libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb6e58000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0xb6d24000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb6d09000)
	libc.so.6 => /lib/libc.so.6 (0xb6b60000)
	/lib/ld-linux.so.2 (0xb7782000)
	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb6b52000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb6b4c000)
	libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb6b2c000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb6a87000)
	libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb6930000)
	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb6903000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb68cf000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0xb68bd000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb68b3000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb68af000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0xb689e000)
	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb6895000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb688a000)
	libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb6886000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb6882000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb687c000)
	libffi.so.6 => /usr/lib/libffi.so.6 (0xb6875000)
	libpcre.so.3 => /lib/libpcre.so.3 (0xb6839000)
	librt.so.1 => /lib/librt.so.1 (0xb6830000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb680f000)
	libdl.so.2 => /lib/libdl.so.2 (0xb6809000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb6771000)
	libselinux.so.1 => /lib/libselinux.so.1 (0xb6752000)
	libresolv.so.2 => /lib/libresolv.so.2 (0xb673a000)
	libexpat.so.1 => /lib/libexpat.so.1 (0xb6710000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0xb670b000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6704000)
# 
So ldd /usr/bin/mtpaint should do it.

Or just entering the directory first by: cd /usr/bin
and after this ldd mtpaint will work also.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#32 Post by jamesbond »

wjaguar wrote:
jamesbond wrote:how do I get these subsequent screenshots?
File->New->Grab screenshot
How can I miss that :oops: ... It working now :D Thank you wjaguar.

@don570 your tutorial is excellent, thank you for that. I think you should convert them into a more portable format than just forum posts.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

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

#33 Post by wjaguar »

RSH wrote:libpng12.so.0 => /lib/libpng12.so.0 (0xb7553000)
So libpng is in the clear.
Then another possibility is an invalid clipboard save path. That is Preferences->Paths->Clipboard files, and on Puppy it should be something like "/root/.clipboard".

bill
Posts: 490
Joined: Wed 28 May 2008, 15:32

mtPaint - Simple paint tutorial

#34 Post by bill »

@ wjaguar :Just in passing ,I have looked in /root/.clipboard and don't see .clipboard ? in any of the distros I have booted ie Lazy Puppy,Slacko 5.6,puppy 5.2.8 and several others.I thought at first my old AMD64 was knackered but after trying mtPaint in an intel box,I continue to get the dreaded "can't load clipboard".Unless there are commands other than ctrl +F1 and Shift+ F1 etc. I reckon I will call this a lost cause and slink away :lol: If someone can post the exact distro with a functional clipboard (proven to be functional) or an exact command sequence,I will give that a try.Thanks to ALL for your patience and counsel.Cheers

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#35 Post by RSH »

In L.A.S.S.I.E. and/or Precise Puppy under mtPaint 3.44.13 saving a clipboard and loading it into another image loaded seems to work.

File .clipboard1 remains existing in /root after exiting mtPaint and can be loaded again after restarting mtPaint.

Maybe mtPaint in LazY Puppy is just too old (wasn't it 3.44.03?)?
Attachments
image-7.jpg
(44.88 KiB) Downloaded 706 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

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

#36 Post by don570 »

@don570 your tutorial is excellent, thank you for that. I think you should convert them into a more portable format than just forum posts.
I have a limited knowledge of HTML so maybe I could modify
the mtpaint handbook with my examples and post the modified handbook??

BTW I have found that it is easy to post videos on Youtube.
A resolution of 800 x 600 is possible. The audio must be wav not mp3.
The format must be avi. Youtube warns that they don't recognize the format but they upload anyway.

_______________________________________________

It should be possible to upgrade Lazy puppy to the latest mtpaint version,
since LAZY is just a modified Lucid Puppy.

Posting the hidden config file (.mtpaint) might help Dmitri understand what is happening.


I would try following commands to see where my HOME variable was.

Code: Select all

CD ~ 
CD  $HOME

bill
Posts: 490
Joined: Wed 28 May 2008, 15:32

mtPaint - Simple paint tutorial

#37 Post by bill »

RSH said :Precise Puppy under mtPaint 3.44.13 saving a clipboard and loading it into another image loaded seems to work.
I may be in error but since I loaded Precise 5.7.1 I get the same results,no /root/.clipboard and nothing in /root so I am wondering if this is because I am running Frugal(memory stick) instead of Full Install ?.This is way past my pay grade but maybe one of you chaps might know.cheers

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Re: mtPaint - Simple paint tutorial

#38 Post by RSH »

bill wrote:
RSH said :Precise Puppy under mtPaint 3.44.13 saving a clipboard and loading it into another image loaded seems to work.
I may be in error but since I loaded Precise 5.7.1 I get the same results,no /root/.clipboard and nothing in /root so I am wondering if this is because I am running Frugal(memory stick) instead of Full Install ?.This is way past my pay grade but maybe one of you chaps might know.cheers
I'm running frugal only and generally.

I did copy the loaded (black, new) image into the clipboard by using "strg-a" and then "strg-c" and saved the clipboard after that by the menu entry - if this is of some help.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#39 Post by RSH »

Seems to work in LazY Puppy under mtpaint 3.44.03.
Attachments
image-2.jpg
(96.17 KiB) Downloaded 632 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

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

#40 Post by don570 »

There is a quick method of making an outline of the head.
open a jpeg picture of person. Go to the menu...

Effects > Edge Detect (Sobel)
Effects > Invert
Effects > Greyscale (Gamma corrected)

You can switch the white to a pale color.
The quickest way is to paint with the opacity in the
settings toolbar window turned low.
______________________________________

Image
Last edited by don570 on Thu 24 Jul 2014, 23:55, edited 1 time in total.

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

Post Reply