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 Mon 20 Oct 2014, 07:25
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
mtpaint 3.44.89- October 2014
Post new topic   Reply to topic View previous topic :: View next topic
Page 11 of 15 [214 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, 14, 15 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sat 02 Aug 2014, 22:15    Post subject:  

Really that is not that necessary, the layers work fine, its the getting to the other files that can be cumbersome, a better solution would be to allow files to be loaded to the dock file tab ... as it is now you can open *.png and the files get loaded in the dock, so you can toggle between them, but if you open a new file, and then click one of the files in the dock, the new one vanishes (it does prompt for unsaved changes) so to get back to it you have to re-open it or undo until you get back to it. The expected behavior would be to add newly opened files to the file tab.








Below was the original (abandoned?) idea.
pastefromfile.png
 Description   
 Filesize   5.2 KB
 Viewed   268 Time(s)

pastefromfile.png

filedialog.png
 Description   
 Filesize   2.71 KB
 Viewed   334 Time(s)

filedialog.png

result.png
 Description   
 Filesize   877 Bytes
 Viewed   271 Time(s)

result.png


_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Pelo


Joined: 10 Sep 2011
Posts: 3220
Location: Mer méditerrannée (1 kms°)

PostPosted: Sun 03 Aug 2014, 00:33    Post subject: MTpaint take some days and learn how to use it.  

MTpaint take some days learning how to use it.. I promised to learn how MTpaint works and then using any of its features.
This forum does not resume at the installation. it's to be noticed.
Thanks for your useful step to users.

I would like so much use transparency....
Resize a selection : Puppy has tools for that, no ? Be care full about an application which should do everything. I need and appli to edit the image. Diaporamas and managing image files is an other business, no ?

_________________
Puppy, il ne lui manque que la parole !
Back to top
View user's profile Send private message Yahoo Messenger 
wjaguar

Joined: 21 Jun 2006
Posts: 279

PostPosted: Sun 03 Aug 2014, 05:17    Post subject:  

technosaurus wrote:
its the getting to the other files that can be cumbersome,

Seems there is something in your use case that I don't understand.
A hypothetical "Paste from file":
- select "Edit->Paste from file" from menu
- select the file from file selector
- get the whole of it as paste area waiting to be placed
The existing undoable loading:
- press Ctrl+O ("File->Open")
- select the file from file selector
- press Ctrl+A ("Selection->Select All")
- press Ctrl+C ("Edit->Copy")
- press Ctrl+Z ("Edit->Undo")
- press Ctrl+V ("Edit->Paste to Centre")
- get the whole of it as paste area waiting to be placed
The difference is four keypresses. And the common part is the operating of file selector. It feels to me that compared to selecting a file, four keypresses are trivial.

Myself, I do not do paste from files in massive quantities - it is one or two, or three, in one session. And very rarely do I need to paste a file whole and entire into another; usually I first copy just the needed part. For this, undoable loading is perfect.
So what is the situation where the four more keypresses make a sizable difference?

Quote:
a better solution would be to allow files to be loaded to the dock file tab

Again, what for, when there is the recent files list under "File"? Last 10 opened files are displayed in there - and even have keyboard shortcuts bound to them, Ctrl-Shift-F1..F10.
And there is even a pref for increasing that to 20 files - just, the other 10 aren't getting shortcuts.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Sun 03 Aug 2014, 12:52    Post subject:  

Game programmers and web programmers often use sprite sheets containing up to hundreds of different small images. (it makes the game more responsive and web pages load faster) I wrote spritify as a quick and dirty way to somewhat simplify the process, but it still needed other tools to fix palettes and remove artifacts. Mtpaint was really handy for that part - I got the tango icon theme reduced something like 30-1 using an indexed palette, looking back I probably could have just added a new Layers menu entry in mtpaint instead of writing a whole new command line tool, but I wasn't sure about mixed indexed and rgb images and how to fix the palettes - I chose to use rgb in spritify (then use mtpaint to index it), but the mtpaint way would be to give more elegant options like combining the indexed palettes or using one images palette.

Since I mention sprites here is a basic howto:
If you have a sprite sheet with an indexed palette and you want to add an image to it, here is my basic workflow:
1. Prepare the new image(s) for your sprite sheet
Open your sprite sheet.
Palette->save as (keep it with your sprites for later use)
Image->Resize Canvas (increase to fit your new image)
(Fill the extended area with your transparent color if needed)

2. open the file you want to add
Palette->Load
(If the image has an indexed Palette: Image->Convert to RGB)
Image->Convert to Indexed :: Use Current Palette :: OK
Do any other tweaks that you need/want
"Make Selection" and Edit->Copy it
Ctrl+Z back to your sprite sheet.
Edit->Paste it to the new space
(don't forget to right click to _actually_ paste it)
Save, Rinse and repeat

Note: this is much easier if you open all the files you will be working with from a single command line (such as: mtpaint sprite.png 16x16*.png), since they will be in the file tab of the Dock and you can just toggle between them rather than history-navigating them one at a time.

Note2: if you don't already have a sprite sheet, guess what, yes you do. Your first image is your sprite Smile

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 279

PostPosted: Mon 04 Aug 2014, 08:30    Post subject:  

technosaurus wrote:
Note: this is much easier if you open all the files you will be working with from a single command line (such as: mtpaint sprite.png 16x16*.png), since they will be in the file tab of the Dock and you can just toggle between them rather than history-navigating them one at a time.

Understandable. But for now, mtPaint doesn't have any means to do globbing from within the GUI, and I see no neat way to add one.
Drag-drop can serve as a workaround for this limitation - except that dropped files get loaded into layers, and not added to dock.
Maybe it would be possible to add a drop target to dock itself - so that files dropped onto it would go into dock pane - but that needs to be tested: it depends on GTK's good behaviour Smile
Another possibility is to add a tool to Layers menu specifically for compositing layers into a grid (specifying number of rows, columns, and - as override to the autodetected ones - vertical and horizontal spacing).
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Mon 04 Aug 2014, 09:27    Post subject:  

I dont think globbing or even drag and drop are necessary, just having each newly opened file go to the dock as they do when opened from the command line would be sufficient.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 279

PostPosted: Mon 04 Aug 2014, 09:53    Post subject:  

technosaurus wrote:
I dont think globbing or even drag and drop are necessary, just having each newly opened file go to the dock as they do when opened from the command line would be sufficient.

I don't see how that could help.
Either there are only a few files - then "Recent files" will hold them all just like the dock is doing. Or there are dozens - and then selecting them one by one, to put into dock, will be just as tedious as opening them directly.

Basically you're proposing to use the dock pane to replace the "recent files" part of File menu - and I still don't understand in which way the one is preferable to the other.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3331
Location: Ontario

PostPosted: Wed 06 Aug 2014, 20:41    Post subject:  

I modified the handbook warning message when installing on tahrpup or
Slacko. These distros don't allow the re-installing of a pet package,
so I suggest an un-install if package was improperly installed.

available first post

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


Joined: 10 Mar 2010
Posts: 3331
Location: Ontario

PostPosted: Mon 11 Aug 2014, 14:01    Post subject:  

version 3.44.84 available at first post

_________________________________________

Lazpaint 6.2 newest!!! available

http://sourceforge.net/projects/asriedu/files/asriedu_packages/asriedu_packages_31x_base_puppyprecise5xx/

__________________________________________
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 279

PostPosted: Mon 11 Aug 2014, 17:10    Post subject:  

don570 wrote:
Lazpaint 6.2 newest!!! available

So I hope now I can drop the mtPaint project? Wink

BTW: version 3.44.85 has commandline scripting. Like this:
Code:

mtpaint --cmd -file/open=test.png -effect/unsharp r=1 am=0.4 -effect/unsharp r=30 am=0.1 -file/as format=pmm

mtpaint --cmd -file/open=test.png -effect/gauss=100 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=x0.5 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=50% -file/save

mtpaint --cmd -file/open=test.png -image/scale=nearest w=200% -file/as format=tga

mtpaint --cmd -file/open=test.png -image/resize=mirror w=x3 -file/as=zad

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

Joined: 26 Feb 2007
Posts: 2221
Location: The Blue Marble

PostPosted: Wed 13 Aug 2014, 12:33    Post subject:  

wjaguar wrote:
don570 wrote:
Lazpaint 6.2 newest!!! available

So I hope now I can drop the mtPaint project? Wink
Oh no ... please don't! We appreciate your maintenance of mtPaint, wjaguar Very Happy Please keep it alive!

Quote:

BTW: version 3.44.85 has commandline scripting. Like this:
Very interesting, this could potentially replace a lot of tools . How stable is the "interface", are you still in test/play phase, or is the commands are more or less fixed?
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 279

PostPosted: Thu 14 Aug 2014, 01:51    Post subject:  

jamesbond wrote:
How stable is the "interface", are you still in test/play phase, or is the commands are more or less fixed?

The commands are every bit as stable as menu structure and dialog items' naming is. Because the "commands" are the very same names - or, any prefix of any word in them that does still match uniquely.
This self-naming and self-documenting is part of the reason why scripting is implemented through the V-code.

The script is commands with their parameters. Commands are prefixed with "-" and match to menu items; parameters are followed by "=" and a value, and match to dialog items. If a command itself is followed by "=" and value, that matches the unnamed item in the dialog. But such an unnamed option can just stand alone: "-file/as=zad" is fully equivalent to "-file/as =zad".

The entire name of a menu option, including spaces, is the canonical name of its matching command - with shell quoting used to protect the spaces. Like this:
mtpaint --cmd -file/'save as ...'=zad
It is safe to shorten the "save as ..." to just "as", because no word in other items' names in the same submenu starts with "as". And so it is done in the examples.
But "save" on its own is a match for another item in the same submenu: "File->Save", which stands before "File->Save as".

Parts separated by "/" are matched to corresponding menu levels in order. So to call up "Effects->Isometric transformation->Top side right", you can write a command "-eff/iso/top". Or more verbosely, "-effect/isometric/top".

Same thing about parameters. I can write:
mtpaint --cmd -file/'save as' =zad 'file format'=png 'transparency index'=0 'png compression'=9
But it is just as unambiguous in this case to write this instead:
mtpaint --cmd -file/as=zad f=png t=0 p=9
Still, for the sake of understandability it's better to use some more chars per option. Say, like this:
mtpaint --cmd -file/as=zad format=png trans=0 png=9
But it is not unambiguous to use "c=9", "comp=9" or even "compression=9", because there also exist "JPEG2000 compression" and "TGA RLE compression" in this same dialog (visible to user for different filetypes, but V-code sees them all at once).

So "-effect/unsharp r=1 am=0.4" in the example means the same as "-effects/'unsharp mask' radius=1 amount=0.4" would.

The unnamed parameter matches to the unnamed control in a dialog - usually it is the top one, but not always. For fileselector, it is filename; for most filters, it is value spinbutton; but for image scale, you can see it is filter name - everything above their list has names; for image resize - tiling mode, for the same reason. So you see "-image/scale=nearest" and "-image/resize=mirror" in the examples.

To select options from lists, such as filter names or file formats, values are matched to option names just the same way as parameters are matched to dialog items, and commands to menu items. So "image/scale=near" will select you the "Nearest neighbour" scaling method.

If you aren't sure whether a parameter would be present in the dialog at all (it is one such as might get disabled) but want to set it in case it's present, you prefix its name with "." Say, to scale an image of unknown type in a nearest neighbor mode, it's safe to write "-image/scale .=near", but "-image/scale=near" will fail to match in case the image turns out to be a GIF or other indexed format.

For ease of use, the "Width" and "Height" fields in "Scale canvas" and "Resize canvas" dialogs are made to understand a couple formats that a regular spinbutton wouldn't. Like this:
w=x1.5 - multiplies the original value by 1.5;
w=33% - 33% of the original value.
If "Fix aspect ratio" is toggled on ("fix=1" if you aren't sure it is) then setting the width will correspondingly modify the height, or vice versa. But only the first time; so you can write "w=200% h=x1" to make the image twice wider, and not bother with "Fix aspect ratio" setting.

This is how it works.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3331
Location: Ontario

PostPosted: Thu 14 Aug 2014, 20:08    Post subject:  

New version 3.44.85 available in first post
___________________________________________

Last edited by don570 on Thu 14 Aug 2014, 20:12; edited 1 time in total
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3331
Location: Ontario

PostPosted: Thu 14 Aug 2014, 20:10    Post subject:  

A suggestion to wjaguar:

Add the list of non-gui command lines to the terminal help



_____________________________________________
Quote:
mtpaint [option] [imagefile ... ]
mtPaint can accept one of the following options:

--help Output usage information
--version Output version information
-s Grab a screenshot
-v Start mtPaint in viewer mode
--cmd non-gui mode

Examples of non-gui-mode:

mtpaint --cmd -file/open=test.png -effect/unsharp r=1 am=0.4 -effect/unsharp r=30 am=0.1 -file/as format=pmm

mtpaint --cmd -file/open=test.png -effect/gauss=100 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=x0.5 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=50% -file/save

mtpaint --cmd -file/open=test.png -image/scale=nearest w=200% -file/as format=tga

mtpaint --cmd -file/open=test.png -image/resize=mirror w=x3 -file/as=zad
Back to top
View user's profile Send private message 
vicmz


Joined: 15 Jan 2012
Posts: 1117

PostPosted: Thu 14 Aug 2014, 20:18    Post subject:  

wjaguar wrote:
version 3.44.85 has commandline scripting. Like this:
Code:

mtpaint --cmd -file/open=test.png -effect/unsharp r=1 am=0.4 -effect/unsharp r=30 am=0.1 -file/as format=pmm

mtpaint --cmd -file/open=test.png -effect/gauss=100 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=x0.5 -file/save

mtpaint --cmd -file/open=test.png -image/scale w=50% -file/save

mtpaint --cmd -file/open=test.png -image/scale=nearest w=200% -file/as format=tga

mtpaint --cmd -file/open=test.png -image/resize=mirror w=x3 -file/as=zad



Interesting. Is it possible to extend these for a series of picture files, or even better, for a folder of picture files?

_________________
OB Precise 14.07.26 Woof-CE|Puppy Linux en español

Last edited by vicmz on Thu 14 Aug 2014, 21:05; edited 2 times in total
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 11 of 15 [214 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, 14, 15 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Graphics
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.1210s ][ Queries: 13 (0.0082s) ][ GZIP on ]