mtpaint 3.49.12- April 2016

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#271 Post by don570 »

Note to disallowed :

There is two ways to run a script

1) internally in mtpaint --> look for 'Script' menu item

Examples to convert to RGB

-image/rgb

-image/'Convert to RGB'


2) a script file --> it must have its permissions set to 'execute'
Instructions: CD to folder containing script and in terminal type ./script_name


Here's an example to change a folder of greyscale jpegs made in gimp
to RGB greyscale images. Your script can be located anywhere.
Your images are located in /root/my_images/

Code: Select all

for ZAD in /root/my_images/*.jpg ;do
  SUFFIX=_mod
  echo ZAD= $ZAD
  mtpaint --cmd -file/open="$ZAD" -image/rgb  -file/as="$ZAD"$SUFFIX
  mv -f  "$ZAD"$SUFFIX.jpg   "${ZAD%.jpg}"$SUFFIX.jpg
done

I've noticed that if there is a jpeg image in the folder that is already RGB
then there will be an error written to screen
'-image/rgb' matches a disabled item
This isn't a serious error but I thought I'd mention it to you.
The original file is left alone.

_________________________________________________

User avatar
disallowed
Posts: 279
Joined: Sun 22 Mar 2015, 17:18

#272 Post by disallowed »

1) mtpaint --> Image --> Script

It opens a window:

Code: Select all

# Resharpen image after rescaling
-effect/unsharp r=1 am=0.4 -effect/unsharp r=30 am=0.1
Click OK and opens an error window:

Code: Select all

'-effect/unsharp' matches a disabled item
2) The script file worked and I successfully changed a folder of grayscale jpegs to RGB. Thanks a lot.

But still haven't found how to use the individual command. For example:

Code: Select all

sh-4.3# cd /root
sh-4.3# a.jpg -image/rgb
sh: a.jpg: command not found
sh-4.3# -image/rgb
sh: -image/rgb: No such file or directory

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

#273 Post by don570 »

Click OK and opens an error window:

Code:
'-effect/unsharp' matches a disabled item
There is nothing unusual about this message. The programmer is just
warning you that the operation isn't available. This is because images with
256 colors (or greyscale values) don't allow some effects.
Conversion to RGB fixes that.

Try typing

Code: Select all

-image/'Convert to RGB'
Another important feature of mtpaint --> each layer of an image is
independent and can be stored independently to disk.
The composite of all the layers can be stored to disk as well.

The benefit is the small amount of memory that mtpaint requires.
The smear paint brush is especially fast.

___________________________________

User avatar
disallowed
Posts: 279
Joined: Sun 22 Mar 2015, 17:18

#274 Post by disallowed »

Code: Select all

sh-4.3# -image/'Convert to RGB'
sh: -image/Convert to RGB: No such file or directory

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#275 Post by Semme »

Run that from within mtPaint >> Image >> Script, not your terminal.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
disallowed
Posts: 279
Joined: Sun 22 Mar 2015, 17:18

#276 Post by disallowed »

Ok, I open the grayscale jpeg with mtpaint

>> Image >> Script

Run

Code: Select all

-image/'Convert to RGB'
-palette/'Load Default'
and that was it. Well, nice.

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

[SOLVED]

#277 Post by charlie6 »

Hi,
*********************************
last edited: having slept on it... :D
[SOLVED]: the answer is in /etc/mtpaint/palette.txt and palette.gpl
I remembered one day having saved a palette file (for some forgotten reason... :roll: ) from within mtpaint as the «default palette», which is now loaded at each new mtpaint run.
/root/.mtpaint wrote:defaultPalette = /etc/mtpaint/palette.gpl
/etc/mtpaint/palette.gpl's line 5 gives the RGB value for color Nr.0
in my case it is:
/etc/mtpaint/palette.gpl line 5 wrote: 36 36 36 Untitled
which is Black color hex#242424
Just editing line 5 to "0 0 0" will fix my question.
*********************************

running mtPaint 3.44.93:
I believe my color editor being somewhat messed up about black... :?:
how to get it reconfigured as expected?

I could fix this by deleting the current /root/.mtpaint (in fact renaming it another name).

On the current installation (and using the existing /root/.mtpaint file):
I have black Nr.0 being hex #242424 whereas it should be #000000 as for the first-install-black-background (black color #000000 which here is in position Nr 255 on the main windows left vertical border)

Using the palette editor Ctrl-W allows to get black Nr. = #000000 by choosing the upper-left black and dragging it to the black square numbered on the left scale + click on preview+ click on create +OK;

Then the black Nr.0 is set to #000000.
After exiting mtpaint does not keep the previous setting.


How could I get Nr0 to be #000000 ? which .mtpaints settings does determine this?

Thanks for any advice.

Charlie

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

#278 Post by don570 »

to Charlie...

I checked the setting of A,B colors and there does seem to be something
wrong with the setting of A,B colors.

The usual way I do this is with the right and left buttons and clicking on the
desired color on the left side of document window. This works fine.

But when I set A,B colors with the color palette editor by clicking on the
default color box ----> the palette is changed.

I am using recent version 3.44.93

When I checked with old Windows version 3.40 , the changing of
A,B colors doesn't change the palette of colors offered in main window.

__________________________________________________
Last edited by don570 on Mon 10 Aug 2015, 18:23, edited 1 time in total.

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

#279 Post by don570 »

I've been testing the setting of the color in the color editor.

I think I know how Dimitry has set it up now.

The GIF format has 256 colors but they may be chosen from millions
of colors. mtpaint has 256 colors in its default palette. Both Color 0 and Color 255
are black.

By using the color editor the B color (which is by default black)
can be quickly set to a non-default value like pink. When I return to the
main document window the color 0 is pink, so I can paint with pink paint.
I can make pink the transparent color by choosing color 0 as transparent
in the save document dialog.

If I want to paint with black paint then I choose color 255.

_______________________________________________________


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

#281 Post by don570 »

Note to oui...

Have you tried psnapshot. There is a right click menu on the folder that
contains the images. Then when you save the image that you have selected
and edited , the save dialog will have a user selected folder as default.

http://www.murga-linux.com/puppy/viewto ... =771581837

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

#282 Post by don570 »

Right clicking on a folder isn't implemented. I'll work on that.

__________________________________________________

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

#283 Post by don570 »

I wrote a script to open a folder of images with mtpaint.
The folder can't be a link.

http://www.murga-linux.com/puppy/viewto ... 555#860555
_______________________________________

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#284 Post by MochiMoppel »

don570 wrote:I wrote a script to open a folder of images with mtpaint.
I experienced a couple of problems with this script, some of them serious. In the worst case the user ends up with editing the wrong file. Most problems relate to your approach of creating a temporary folder with links to the images. Unless you have a compelling reason for creating all these temporary links I suggest that you simply use the output of the find command as input for mtpaint. This would make your script much, much shorter and more reliable.

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

#285 Post by don570 »

I put in 'L' option for find command and it opened a folder that is a link

./script /root/puppy-reference/backgrounds

Works great! I'll change script in first post.



________________________________________________________
I suggest that you simply use the output of the find command as input for mtpaint
Could you write that out as a line of code for me?

_________________________________________________________

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#286 Post by MochiMoppel »

don570 wrote:Could you write that out as a line of code for me?
Three lines. But that's the whole script. :wink:

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

#287 Post by don570 »

I made the change so that a right click on folder of images is possible
to edit them..

mtpaint-mod-3.44.93 and mtpaint-mod-april64-3.44.93
(warning mtpaint-april64-3.44.93 will only work for april64 64 bit)

Available here : mydrive.ch

Username: porteus@don570
Password: porteus

______________________________________________

The explanation of how I did this is here

________________________

oui

#288 Post by oui »

Hi Don

Thank you for your efforts for mTpaint! I use it daily! But I mis 2 details:

a/ no short cut for "print that image"
b/ idem for "time delayed screen shot"

c/ the main windows opens on top left and covers almost completely the Puppy icones :oops: and the satellite window for it's tools covers the main commando bar from mTpaint including the important icones "copy" and "insert" :idea: ....

Kind regards

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

#289 Post by don570 »

I just make the pet and debian packages.


I assume that the windows open in the top left
so that mtpaint can be used in multiple operating systems
ie XORG isn't needed. By opening in the top left with small windows
a netbook could use mtpaint.

_______________________________________________

Several scripts delay the snapshot. Here's the simplest.

http://www.murga-linux.com/puppy/viewto ... 53927f0d09

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

#290 Post by wjaguar »

oui wrote:a/ no short cut for "print that image"
b/ idem for "time delayed screen shot"
Help->Keyboard shortcuts
c/ the main windows opens on top left and covers almost completely the Puppy icones :oops: and the satellite window for it's tools covers the main commando bar from mTpaint including the important icones "copy" and "insert"
Move/resize the windows to suit your taste. mtPaint will remember it for the next time.

Post Reply