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

#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
_________________________________________________________

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

#61 Post by dejan555 »

don570 wrote:

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 
I think suffix replacement could be done nicer and without mv:

Code: Select all

#!/bin/sh
 for ZAD in /root/my_images/*.jpg ;do
  SZAD=${ZAD/%.jpg/_mod.jpg}
  mtpaint --cmd -file/open="$ZAD" -e/'Load Clipboard'/1 -e/paste x=0 y=0   -selection/'Select None' -file/as="$SZAD"
done
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

#62 Post by wjaguar »

dejan555 wrote:SZAD=${ZAD/%.jpg/_mod.jpg}
This is a bashism, not portable to other shells.
To do the same in a standard way:
SZAD="${ZAD%.jpg}_mod.jpg"

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

#63 Post by dejan555 »

Hmm, yeah I've been reading more on using bash variable manipulations so I can use the builtins instead calling external programs when possible.
If anyone knows a good tutorial on this using standard "sh" (posix?) language link me.
And is there really a standard way that is applicable to all shells?
I know most of them have a switch to emulate standard shell or if called through #!/bin/sh symlink
Googling mostly gives results based on bash specifically.
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

#64 Post by wjaguar »

dejan555 wrote:And is there really a standard way that is applicable to all shells?
Yes. It is what POSIX standard is for. The Open Group Base Specifications, Chapter 2 - Shell Command Language
I know most of them have a switch to emulate standard shell or if called through #!/bin/sh symlink
Bash's "POSIX mode" does a lot of tweaks, but does NOT disable its syntax extensions.
Googling mostly gives results based on bash specifically.
It also gives lists of things not to do, if script is to work on Debian/Ubuntu's dash. Like this one, and another linked from it.

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

#65 Post by dejan555 »

Thanks, seems like they're all usefull links, however on the Bashism link where there's example similar to what I proposed says that this kind of parameter expansion is not defined by posix and offers alternative of calling printf/sed
${name/foo/bar} -- you can use $(printf '%s\n' "$name" | sed 's/foo/bar/'), after changing shell patterns to regular expressions. This originated in ksh93 and is also present in mksh, and zsh, but ksh93's substitution expansion differs from Bash's.
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]

Post Reply