Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 21 Nov 2018, 14:17
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
mtPaint - Simple paint tutorial
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 7 of 8 [112 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Sat 30 Jul 2016, 14:56    Post subject: mtpaint lines  

Here are some examples using the line command...
Vertical or horizontal lines are simple and there is no jaggedness

Code:


-e/brush=3 -e/tool line (10,10 10,100) -s/all (30,10 38,100) -e/cut



Note that the line tool makes the line have rounded ends no matter the brush
size setting. Conclusion the cut method is better and simple to code.



_________________________________________________________


...But there is a problem when the line is at an angle. Jaggedness appears in both methods, but it appears worse in the cut method,
and the cut method is difficult (there's no simple rule to derive the coordinates)

Code:
-e/brush=3   -e/tool line (25,25 50,85)  -s/all (40,26 45,23 96,80 90,86)  -e/cut





_____________________________________________________

It is tempting to use the Free Rotate command to rotate a cut area.

Code:
-layer/new  -s/all (30,10 38,100) -e/cut  -e/col a=0  -image/rotate=45


The result looks nice, because there is a slight antialiasing applied by mtpaint.
However this antialiasing causes problems when using the lasso tool
and pasting the line into another document.
I'll explain in next post.


________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Sat 30 Jul 2016, 15:35    Post subject: alpha blend command in mtpaint  

If the background is white the rotate command still gives good results.
(See image below)

Code:
-layer/new -e/col a=7   -s/all  -s/fill   -e/col a=1  -s/all (30,10 38,100) -e/cut  -e/col a=7  -image/rotate=45




However in a more practical example the line must be lassoed and transfered to another document.

Here is the result magnified several times. See the black fringe affect.



So here is the code that will avoid this fringe affect. It uses alpha blend,
one of the features of mtpaint.
gaussian=1 is fine to get rid of jagged edges.

Code:
-layer/new -s/all (30,10 38,100) -e/cut  -e/col a=0  -image/rotate=45 -s/all  -s/"Lasso Selection"   -layer/new =24  -e/paste (10,10) -effect/gaussian=1 -s/all  -s/"Lasso Selection" -layer/new =24 -e/col a=7  -s/all  -s/"Fill Selection"  -e/col  a=1  b=0 -s/'Alpha Blend'    -e/paste   -f/as=/root/image.png


Code explanation:
- a gaussian blur can only be done with 24 bits of color so start with the
correct document
-Red horizontal line is created with cut command (or fill command if you prefer)
- a=0 ( i.e. black) is needed before rotation to fill triangle edges of rotated document.

- entire document is selected and then lassoed to clipboard.

-pasted to new layer (i.e. a new document) and jaggedness is removed with
the gaussian effect (gaussian=1 )

-red line lassoed again . It is in the clipboard again.

I made a final document (a white image)
Note I filled the document with the color white (a=7).

- -e/col a=1 b=0 was needed for the correct alpha blend procedure in this example
---> Because it was a red line with some black fringing.

- the alpha blend command is applied then finally the paste command.


____________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Tue 02 Aug 2016, 20:20    Post subject:  

Tip to make stars and other objects in mtpaint

The vertices are needed when using a script, so here is what I suggest.

Brush size ---> 1 pixel
Make a square selection with selection tool
Make a circle --->

Selection -> Outline Ellipse

Paint marks an equal space apart along circle circumference(see image)



Use line tool to connect points (See image)



Open text editor and note the vertices
as you hover your mouse over mtpaint window
Coordinates can be read from bottom left of mtpaint window.
Here is the results:

498 239
478 176
526 139
465 141
447 83
425 139
366 144
413 178
392 239
443 201

Now you construct the script commands

Code:
-layer/new -s/all (498,239 478,176 526,139 465,141 447,83 425,139 366,144 413,178 392,239 443,201) -s/fill




For best results you should be using 24 bit color and then doing a gaussian blur
after constructing the star

Code:
-layer/new =24 -s/all (498,239 478,176 526,139 465,141 447,83 425,139 366,144 413,178 392,239 443,201) -s/fill -effect/gaussian=1


Scale document if you want a different size. Then lasso and copy to a final document.
_______________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Wed 03 Aug 2016, 13:51    Post subject: Scaling and tiling in mtpaint  

Scaling and tiling in mtpaint

There are two useful commands that should be noted.
The following command will scale the image by 2. Actually height h
is scaled by 2 . The width w is assumed to be scaled by 2 as well.
Code:
-layer/new -image/scale h=x2


To make the object smaller
Code:
-layer/new -image/scale h=x.25

_________________________________________________________

To resize the document i.e. the layer and tile it at the same time
In this example both height and width are expanded with tiles.
There will be 3x3=9 tiles in total.
Code:
-i/resize =tile h=x3


Now for the final example...

The star is created in 24 bit layer and then made smaller and slightly blurred.
It is lassoed and pasted (using alpha blend method to avoid a black outline)
into the centre of a small white document which is then tiled so
that 3x3 stars are the result.
Code:
-layer/new =24 -s/all (498,239 478,176 526,139 465,141 447,83 425,139 366,144 413,178 392,239 443,201) -s/fill -effect/gaussian=1  -image/scale h=x.25  -s/all  -s/"Lasso Selection" -layer/new     w=50 h=50    =24  -e/col a=7  -s/all  -s/"Fill Selection" -e/col  a=1  b=0 -s/'Alpha Blend' -e/"Paste to Centre" -i/resize =tile h=x3



________________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 21 Dec 2017, 19:30    Post subject: a selection from GIMP  

When pasting a selection from GIMP into mtpaint....

The best way is to go to the top menu
Layer > New layer

and from the options choose 'Clipboard'.

This will create a new layer above your old layer.

___________________________________________
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1063
Location: Oslo, Norway

PostPosted: Thu 21 Dec 2017, 20:49    Post subject:  

Pity that such a well illustrated thread is almost totally uninteresting to browse without the pics. Sad
_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 22 Mar 2018, 18:58    Post subject: Seamless pattern for tiling using scripting  

Seamless pattern for tiling using scripting
Self made - No photo used


An alternate method that uses a photo is here....
http://murga-linux.com/puppy/viewtopic.php?p=912022#912022

___________________________________________________

Here is a quick method of making your own seamless pattern.
No photo is used.

First step: make a 400x400 pixel image document.
Second step: Paint randomly with brush while gradient is 'ON'
(see image)
Third step(optional): Use smear brush to put a twirl to pattern .

See next post.....
first.gif
 Description   
 Filesize   102.56 KB
 Viewed   360 Time(s)

first.gif


Last edited by don570 on Thu 22 Mar 2018, 19:56; edited 2 times in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 22 Mar 2018, 19:07    Post subject: continued from above  

...continued from above.

Fourth step: Resize to 800x800 pixels (see image)
Image > Resize with tile option 'ON'


Fifth step: A seam will be visible in middle of image. Use your smear brush
to obscure the seam in middle of image.

Sixth step: Run script command to reduce the size of image back to 400x400. The center portion is selected.

image > Script

Code:
-s/all  (200,200 600,600) -image/crop

Press 'Execute' button

The result is a tile-able pattern that is random and seamless. It is 401x401 pixels.

The fact that it is 401x401 pixels rather than 400x400 pixels makes no difference

If you do want 400x400 ---> try

Code:
-s/all  (200,200 599,599) -image/crop
first-expanded.gif
 Description   
 Filesize   111.55 KB
 Viewed   358 Time(s)

first-expanded.gif

final.gif
 Description   
 Filesize   84.38 KB
 Viewed   360 Time(s)

final.gif


Last edited by don570 on Thu 22 Mar 2018, 19:59; edited 4 times in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 22 Mar 2018, 19:09    Post subject: continued from above  

Gimp and G'mic plug-ins can then add some interesting effects. i.e. 3D and bumping

Here Gimp uses a photo....
https://www.youtube.com/watch?v=TKhs7F0hAik

__________________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Sat 24 Mar 2018, 13:45    Post subject:  

Dmitry suggests to solve 401x401 image size problem
a different command....

Quote:

For a corner&size format, there is the syntax "(200,200,600,600)" or
the explicit "x=200 y=200 w=400 h=400".


This script gives a 400x400 image....
Code:

-s/all  x=200 y=200 w=400 h=400   -image/crop


________________________________________


When using GIMP

1) to convert GIF format to 24 bit color --->

Image > Mode > RGB

2) to make a 3D effect

Filters > Map > Bump Map

3) to rid image of strange repeating paterns

Filters > Map > Make Seamless

See image for final result. It looks like moss growing on copper.
It will look totally random if 'Make Seamless' command is used
_____________________________________
second.gif
 Description   
 Filesize   96.99 KB
 Viewed   316 Time(s)

second.gif

Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Tue 10 Apr 2018, 19:50    Post subject: use mtpaint with blender for raised text  

It is possible to use mtpaint with Blender 2.79 app.

First use mtpaint to make an image with white text on a black background (RGB) then make a gausian difference fuzz so that the result
is like photo below. Save image to disk.

You then launch blender and you can put the raised text to a sphere
(as shown)

Continued in next post.....
mtpaint.png
 Description   make this text in mtpaint
 Filesize   8.3 KB
 Viewed   265 Time(s)

mtpaint.png

finished-noncolor.png
 Description   
 Filesize   44.07 KB
 Viewed   268 Time(s)

finished-noncolor.png


Last edited by don570 on Tue 10 Apr 2018, 20:17; edited 1 time in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Tue 10 Apr 2018, 19:57    Post subject:  

Here is the node layout for blender using cycles render.

You make a uv layout for a sphere and use the image you made with mtpaint.

The color ramp allows the color white to be controlled. (Move the tab inwards)

Note that non-color data must be used. Very Important!!

Math node is set to 'Multiply' . Use a number from .5 to 22
The color green is fed to a mix shader node.
________________________________________

For a different effect...

Cut a noodle to get rid of white color and show just one color for sphere (as shown below in finished1 example)


__________________________________________________
node-layout-blender.png
 Description   node layout for blender
 Filesize   52.67 KB
 Viewed   255 Time(s)

node-layout-blender.png

finished1.png
 Description   no white color is used
 Filesize   37.17 KB
 Viewed   267 Time(s)

finished1.png

Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2791
Location: 500 seconds from Sol

PostPosted: Tue 08 May 2018, 13:09    Post subject: mtPaint as the snapshot app  

Hi don570 and All,

Being a tutorial on how to use mtPaint I thought this was the best place to post this. When it come to Graphics, I'm all thumbs. And while there are other snapshot apps available, I still prefer mtpaintsnapshot for that purpose. It's a built in feature of all implementations of mtpaint, and may have been assigned as the default application to take snapshots. If so, you can just press the "Print scrn" Key.

Some time ago 01micko developed a small script which added a GUI so that rather than immediately taking a snapshot you could choose to delay that for a few seconds while you made any necessary adjustments. See attached screenshot. I packed the script as a pet which added a menu/desktop entry. With that entry, mtpaintsnapshot could be assigned to a launcher on the Taskbar/panel or a desktop launcher/icon. I've attached a copy.

An advantage of using mtpaintshot as the snapshot is that immediately after the snapshot is taken it is automatically opened in mtpaint. You can, of course, immediately close that and precede to take another snapshot. But you can also immediately make quick edits or do all the things mtpaint is really good for, where the availability of "more options" on gimp or other graphic editors adds complexity and just gets in the way.

mikesLr
mtpaintsnapshot-GUI.png
 Description   mtpaintsnapshot GUI
 Filesize   15.92 KB
 Viewed   208 Time(s)

mtpaintsnapshot-GUI.png

mtpaintsnapshot-2.014.pet
Description  mtpaintsnapshot pet
pet

 Download 
Filename  mtpaintsnapshot-2.014.pet 
Filesize  5.51 KB 
Downloaded  91 Time(s) 
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2648

PostPosted: Tue 08 May 2018, 14:26    Post subject: Re: mtPaint as the snapshot app  

mikeslr wrote:
An advantage of using mtpaintshot as the snapshot is that immediately after the snapshot is taken it is automatically opened in mtpaint. You can, of course, immediately close that and precede to take another snapshot. But you can also immediately make quick edits or do all the things mtpaint is really good for, where the availability of "more options" on gimp or other graphic editors adds complexity and just gets in the way.

I love mtpaint for screen captures also, but I add a sleep 3 prefix in my jwm configuration before PrintScreen runs mtpaint -s to capture a screenshot, just so I have a little time to perhaps open a menu or whatever to show that also in the screen capture. My other favourite jwm snippets is to have ALT and up or down arrows as adjusting the volume up or down, and I also use jwm config StartupCommand ... to set the alsamixer Master, Headphones and PCM to their maximum levels. Extract of part of my jwm configuration ...
Code:
   <Key key="Print">exec:sleep 3;mtpaint -s</Key>
   <Key mask="A" key="Up">exec:amixer sset Master 1+,1+</Key>
   <Key mask="A" key="Down">exec:amixer sset Master 1-,1+</Key>
   <!-- run amixer sset Headphone 100 (or whatever) to see what the limits/ranges are -->
   <StartupCommand>amixer sset Master 31</StartupCommand>
   <StartupCommand>amixer sset Headphone 31</StartupCommand>
   <StartupCommand>amixer sset PCM 255</StartupCommand>
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5298
Location: Republic of Novo Zelande

PostPosted: Wed 09 May 2018, 05:00    Post subject: Re: mtPaint as the snapshot app  

rufwoof wrote:
I also use jwm config StartupCommand ... to set the alsamixer Master, Headphones and PCM to their maximum levels. Extract of part of my jwm configuration ...
Code:
   <Key key="Print">exec:sleep 3;mtpaint -s</Key>
   <Key mask="A" key="Up">exec:amixer sset Master 1+,1+</Key>
   <Key mask="A" key="Down">exec:amixer sset Master 1-,1+</Key>
   <!-- run amixer sset Headphone 100 (or whatever) to see what the limits/ranges are -->
   <StartupCommand>amixer sset Master 31</StartupCommand>
   <StartupCommand>amixer sset Headphone 31</StartupCommand>
   <StartupCommand>amixer sset PCM 255</StartupCommand>
Thanks rufwoof - I thought the only way to achieve this was to put a script in /root/Startup but this is a great alternative.
cheers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 7 of 8 [112 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1008s ][ Queries: 13 (0.0177s) ][ GZIP on ]