mtPaint - Simple paint tutorial

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#106 Post by rufwoof »

Whilst all the Puppy 'bloat' i.e. jwmdesktop manager is nice, I find that actually conflicts with a good setup IMO. jwm tray doesn't cater for dragging files to icons in the jwm tray, whereas rox panel does. With all the startup command and jwm/windows configuration in a single .jwmrc file its relatively easy when you have a copy of the associated jwm versions configuration file/document (and a bit of XML skill) to admin/configure things exactly as you'd like.

The way Puppy is structured however with jwm split out and auto-regenerating etc. that can screw up (overwrite) a good manually configured setup. So you have to de-bloat Puppy :)

jwm doesn't support drag/drop across desktops/pinboards either. Personally multiple desktops IMO are only useful if you have multiple monitors, otherwise multiple pinboards can work just as well and you can arrange things to drag/drop across pinboards.

Reducing down the width of the jwm panel and putting that on top of a rox panel is a good combination, as you can drag programs to the rox panel to create a icon, move them around using the middle mouse click/drag and once in place drag/drop files onto them to open up the file using that program. Whilst still having the jwm panel also as per normal (but just reduced width). Leave windows maximised and just flip between them by selecting them in the jwm panel, and that's like having desktop icons in the rox panel so visible even when a window is maximised. Also eliminates the buggy jwmdesktop type issues.

I like to have one desktop/pinboard specifically for 'computer' that contains desktop icons to documentation and to configuration files, so I can just flip to that pinboard in order to make system configuration changes. Another I typically use for bookmarks/web, i.e. switch to that and click a desktop icon as a web link (showdesktop and click another to open another link). Another pinboard for documents/office files/programs, another for music/multimedia ... and that's pretty much it (I also like to have a empty pinboard that I use as a scratchpad/current work/general).

The downside is that the jwm menu isn't auto-updated as programs are installed/removed, however the pinboards in effect become the 'menu' so its relatively easy to add/remove things from those manually. The menu in effect is relegated and not used that often, so much so I don't have a menu button at all, I just set the clock to show the menus when the clock is clicked.

RISC (reduced instruction set computer) on X-Windows (ROX) is great for a mouse heavy style (drag and drop). Shame that its lapsed. Puppy goes some way to avoid it totally fading. jwm is still maintained/updated, but isn't the ideal partner (would be better if its panels supported drag/drop along with dragging/dropping across desktops/pinboards). Supplemented with golden oldies such as mtpaint and the new inroads into running a browser in a container/restricted user (EasyOS) whilst running non internet local things as root and that's a great collective set. The broader general standard Puppy layout/structure however detracts from that IMO. Yes jwmdesktop click to configure options are nice, but tend to lock you into a particular general desktop layout - that isn't the best layout choice IMO.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#107 Post by musher0 »

Hello all.

I finally found the new way to use mtpaint as a viewer, after a couple of
fruitless days trying to make the officially documented ways work.

The answer was in the README in the latest version of mtpaint:
(...)
After installation you can create a symlink to add a viewer command, e.g.

su -c "ln -s mtpaint /usr/local/bin/mtv"

Then you can open some graphics files with "mtv *.jpg". This is
a shortcut to writing "mtpaint -v *.jpg". mtPaint can only edit
one image at a time, but when you have more than one filename in
the command line a window will appear with all of the filenames
in a list. If you select one of the names, it will be loaded.
I find this is helpful for editing several icons or digital photos.
mtv *.<picture type>
is the new way to use mtpaint as a viewer.

The old ways
mtpaint -v *.jpg
OR
mtpaint *.jpg
do not work anymore.

In Puppy, the symbolic link "mtv" is achieved as follows from console:

Code: Select all

cd /usr/bin
ln -s mtpaint mtv
Then you simply drill down into your image
directory and type
mtv *.jpg
or whatever image type, and you have all the image files in the listing on
the right, ready for editing.

You can make yourself a wrapper for this, with its own *.desktop file,
if you hate typing in console.

IHTH
Attachments
mtpaint-as-viewer.jpg
(164.35 KiB) Downloaded 634 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

color code from image

#108 Post by Wognath »

don570, I have consulted this thread countless times. Belated thanks for doing it.

And a question: is there an easy way to grab a color code from a pixel of an image?

Ideally, I could click on a pixel and view the color code as in gimp (FG/BG Color window). A workaround I have found is to select a single pixel, Edit/Copy To Palette. The color code can then be obtained from Colour Editor, and Undo restores the default palette. If a region is selected, then up to 256 colors appear in the palette, which can be saved, if needed. Am I missing an easier way to copy a color? Thanks.

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

#109 Post by don570 »

to grab a color code from a pixel of an image?
I avoid editing the palette instead I make a foreground color with the eye dropper.
Then I put my mouse in upper left hand part of window and click on foreground color
to display the info about the color.
I believe the eye dropper is used to make copying of a color.
See what the manual says.

_________________________________

Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

#110 Post by Wognath »

OK--easy as 123
Attachments
Screenshot-8.png
(42.97 KiB) Downloaded 486 times

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

#111 Post by don570 »

I highly recommend practising making seamless images.
This is a great feature of mtpaint that is little known.
http://murga-linux.com/puppy/viewtopic. ... 537#986537

Gimp also has the feature of making seamless images but it
smears the image and a repeating pattern appears. Limited use :cry:


_____________________________________________________________
Youtube has some videos on making seamless images with Blender program.

Here is how I first learned about seamless images
https://www.youtube.com/watch?v=I_b2I6toYvQ

________________________________________________

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#112 Post by tallboy »

Interesting reading! I use an old program, always located in my tray at the bottom of the screen, named PupSnap-2.5.1_Scrot-0.8_32Bit.pet, which as the name says, includes scrot if that is not installed. I think I used it in my old dpup. I have decomposed the program, and only uses it's separate functions. I rarely take a full screenshot, but almost always use it to take a limited size shot, which I can choose in the little dialog window shown. After choosing the 'Window only' command, I can either click in a window to take a shot of all of it - as I have done with the tiny bin and lib windows, or drag an outline with the mouse to limit the size. Either way, it then opens in mtpaint, ready for edit!
BTW: This tutorial is awesome! :D

The code from 'mtsnap' which I don't use , because I don't use the timelapse function:

Code: Select all

#!/bin/bash
DIALOG=Xdialog

$DIALOG --title "Shot 2.0" \
        --radiolist "Choose delay before capture" 0 0 0 \
        "Capture Now" 	 " "	ON \
        "5 Second Delay"    " " off \
        "10 Second Delay" "" off \
        "20 Second Delay"    "" off \
        "30 Second Delay"   "" off \
        "60 Second Delay"	"" off 2>/tmp/checklist.tmp.$$

retval=$?
choice=`cat /tmp/checklist.tmp.$$`
rm -f /tmp/checklist.tmp.$$

case $choice in
  Capture*)
           shot1;;
  5*)
           sleep 5
           exec mtpaint -s;;
  10*)
           sleep 10
           exec mtpaint -s;;
  20*)
           sleep 20
           exec mtpaint -s;;
  30*)
           sleep 30
           exec mtpaint -s;;
  60*)
           sleep 60
           exec mtpaint -s;;
esac
I have this part of the program, shot1, activated from my tray:

Code: Select all

#! /bin/bash

     export DIALOG='
   <window title="Shot v2.0" resizable="false" window_position="1">
     <vbox>
       <frame Select Screenshot Type>
		 <radiobutton active="false">
		  <label>Fullscreen.</label>
		  <variable>RADIOBUTTON1</variable>
		 </radiobutton> 
		 <radiobutton tooltip-text="Select window title bar or left-click drag section of screen." active="false">
		  <label>Window Only.</label>
		  <variable>RADIOBUTTON2</variable>
		 </radiobutton>
       </frame>
      
       <hbox>
         <button ok></button>
         
       </hbox>
     </vbox>
   </window>'
     
     I=$IFS; IFS=""
     for STATEMENTS in  $(gtkdialog3 --program DIALOG); do
       eval $STATEMENTS
     done
     IFS=$I

     if [ "$RADIOBUTTON1" = "true" ]; then
       mtpaint -s
     fi
     
     if [ "$RADIOBUTTON2" = "true" ]; then
       exec winshot
     fi
The code executed for 'winshot':

Code: Select all

#bin/bash
#Copyright 2009 G Pearson

scrot 'shot.png' -s -b -e 'mtpaint $f'
#Xdialog --title "Shot-1.2" \--infobox "Screen Shot Done" 5 30 3000
Attachments
dragshot.jpg
Sized with the mouse.
(42.69 KiB) Downloaded 454 times
binshot.jpg
(16.87 KiB) Downloaded 445 times
libshot.jpg
(23.14 KiB) Downloaded 445 times
shotshot.jpg
(8.21 KiB) Downloaded 448 times
True freedom is a live Puppy on a multisession CD/DVD.

bh56
Posts: 55
Joined: Tue 07 Apr 2009, 08:04

Import from the system clipboard

#113 Post by bh56 »

Hi,
This thread is the only one I've found on using mtpaint.
I'm using Linuxmint 19. I'd like to cut and paste from Firefox directly into mtpaint. My understanding is that you select the image or image section and copy or ctrl-c. In mtpaint the command is Import Clipboard from System but nothing happens after I select with the cursor and enter.
If I save images as jpg or png they both open in mtpaint.
Any ideas how I could copy and paste the image into mtpaint?
I'm using version 3.40
Thanks in advance

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

Re: Import from the system clipboard

#114 Post by wjaguar »

bh56 wrote:I'd like to cut and paste from Firefox directly into mtpaint. My understanding is that you select the image or image section and copy or ctrl-c.
It is "Copy image" in context menu. Plain "Copy" is liable to put an URL on clipboard instead, which mtPaint would rightfully complain about.
In mtpaint the command is Import Clipboard from System but nothing happens after I select with the cursor and enter.
The "nothing happens" means the import succeeded - there would be an error popup otherwise. If no error but the new clipboard image fails to appear in the mtPaint window anyway, it means an image depth mismatch; you cannot paste an RGB clipboard onto an indexed canvas, need to do "Image->Convert to RGB" first.
I'm using version 3.40
And you really should upgrade from that ancient fossil. :) Current version on Github is 3.49.18.

bh56
Posts: 55
Joined: Tue 07 Apr 2009, 08:04

Import from the system clipboard

#115 Post by bh56 »

Thanks so much.
The problem was a mismatch in the image depth.

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

#116 Post by don570 »

I remember once having problems with pasting grey scale data into a color document
(or was it color data into a grey scale document??)

The solution was to change the type of document so there would be compatibility of color table.
______________________________________

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

#117 Post by don570 »

I came across this interesting video which shows a method to make seamless
textures which can be used in blender.
https://www.youtube.com/watch?v=hoSfkLOPCno

mtpaint can be used for seamless images but knowledge of the command
needs to be known.


____________________________________________

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

#118 Post by wjaguar »

don570 wrote:mtpaint can be used for seamless images but knowledge of the command needs to be known.
Given that in mtPaint, this simplistic technique can be done in at least 4 ways... :)
Namely: selection channel gradient, copy, paste; copy, mask channel gradient, paste; copy to layer, alpha channel gradient, composite - like in demo; duplicate layer, offset it, mask channel gradient, normal blend with the duplicate as source - new in 3.49.

But this technique really is too simplistic in general. Here is about other approaches:
https://computergraphics.stackexchange. ... tures/5348

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#119 Post by wiak »

rufwoof wrote:Reducing down the width of the jwm panel and putting that on top of a rox panel is a good combination, as you can drag programs to the rox panel to create a icon, move them around using the middle mouse click/drag and once in place drag/drop files onto them to open up the file using that program. Whilst still having the jwm panel also as per normal (but just reduced width).
Ah, that is a good idea. The lack of that feature to drag/drop to open file in jwm taskbar program icon is something I'm commented on before and absolutely why I tend to use openbox/tint2 combination in preference. I'll try using rox panel as suggested. Pity jwm couldn't have that functionality coded into it (I have never looked at jwm source code, can't imagine I will, and I presume the facility be difficult to implement or already would be?).

wiak

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

#120 Post by don570 »

Blender has a way of making an image seamless that reminds me of
the automatic technique described in
https://computergraphics.stackexchange. ... tures/5348

It is described in blender manual...
https://docs.blender.org/manual/en/late ... image.html

The technique is called 'Blend'
Projection
Projection to use for mapping the textures.

Flat
Uses the XY coordinates for mapping.
Box
Maps the image to the six sides of a virtual box, based on the normal, using XY, YZ and XYZ coordinates depending on the side.

Blend
For Box mapping, the amount to blend between sides of the box, to get rid of sharp transitions between the different sides. Blending is useful to map a procedural-like image texture pattern seamlessly on a model. 0.0 gives no blending; higher values give a smoother transition.
It is surprising effective especially if you have a random looking pattern.
________________________________________________________

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

#121 Post by don570 »

There is an example using the 'Blend' technique at 29:30 of the following video...
https://www.youtube.com/watch?v=brnaAL-QwhU

A random pattern having a seam is used on a cylinder.
The final result is excellent.
__________________________________________________

Post Reply