mtpaint 3.49.12- April 2016

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#141 Post by greengeek »

wjaguar wrote:I'm seeing talk about this "resize a selection" again and again over the years, but not once have I seen anyone even suggest an interface for the thing. Seriously, people, I am sick and tired of the parasitic attitude. :-(
Hi wjaguar. Sorry for the offense my question has caused. Is there anything I can do to help with the interface you have mentioned? If there is anything I can do to help I will be happy to assist.

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

#142 Post by don570 »

Does mtpaint have the ability to resize a selection?
Actually it does!!

When you create a new layer, one of the options is 'Clipboard',
so just transfer your selection to another layer and do a scaling of that
layer. Change the hue as well.
Edit the selection channel if you don't need the entire original selection .
It's easy to do the transfer back to original layer using your clipboard.

Here's a summary of instructions...

Code: Select all

copy the clipboard (Ctrl-C)
Make a new layer by going to the menu...

Layers > New Layer (from Clipboard)

Scale the image to be bigger by going to the menu...
Image > Scale

To edit the selection region...
Channels > Edit Selection

To remove jagged edges do a gaussian blur of one or two

Return back to editing the image...
Channels > Edit Image

Select all  ( Ctrl-A )
Copy to clipboard   (  Ctrl-C )

Paste in original layer
 
_______________________________________________________

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

#143 Post by wjaguar »

greengeek wrote:Sorry for the offense my question has caused.
Not offense, exasperation. :-) It is truly beyond my understanding why people are so much more willing to talk about what they would like to have, than to tell what, specifically, they do want. Experience should have taught everyone, very early on, that other people in general do not mindread. ;-)
Is there anything I can do to help with the interface you have mentioned?
Yes, naturally. :-) Just explain to me how you would like this feature to work. By what keys, clicks, drags, menus, dialogs, or whatever.
Preferably, it should also avoid interfering with existing mtPaint features - otherwise, we'll have to find some way to resolve such interference in a least-annoying fashion. :-)
If some other program implements this in such a nice way that you think it can be taken as example - either as is, or with some corrections - then name it, and tell in which way it could be improved if it needs improvement.

Of the new features in mtPaint lately, those not invented by myself, all have originated in this way - by someone who wanted it enough to take the time to explain to me what it is that he wants, and help me find an useful way to integrate it into mtPaint.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#144 Post by technosaurus »

draggable edges to resize (or even click outside it the same way selection works), I don't know if anyone wants rotate or skew (I've haven't had a need for it yet), but possibly with a modifier key while dragging (Alt for rotate, Ctrl for skew, etc...)
something like this maybe? ...

Code: Select all

##                                   ##
##-----------------#-----------------##
 |                                   |
 |                                   |
 |                                   |
##                                   ##
 |                                   |
 |                                   |
 |                                   |
 |                                   |
##-----------------#-----------------##
##                                   ##
or a right click context menu, that basically has (a subset of) the same options for the selection that you would have for the image in the regular menus
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

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

#145 Post by charlie6 »

Hi don570,
don570 wrote:
Does mtpaint have the ability to resize a selection?
Here's a summary of instructions...
Also helpfull: Menu>View>Show Dock (F12) to display the works map in an explicit way, as also other tools (opacity among others).

@Technosaurus: using don570's how2 , doing Menu>Image>Free rotate applied to a selecion, and moved to an (...apart) other layer, and aftrwds paste to the original image, allows to get a «rotated selection».
More, opacity setting is also available provided beforehand conversion of images to RVB.

@wjaguar: thanks keeping updated this awesome mtPaint ! :)
Have plenty of fun ...! 8)
Greetings,
Charlie

ps: @don570: THANKS giving us nice howto's ! :) one could easily figure out how much of your precious time it needs.

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

#146 Post by wjaguar »

technosaurus wrote:draggable edges to resize (or even click outside it the same way selection works),
Myself, I feel a click-to-resize is a little too extreme :-) and it is incompatible with drag-to-resize. But it isn't complicated to implement both, and a toggle in prefs to switch between them - then we can see what works best in practice.

Keyboard control, then, will be the same as for selection - Ctrl+arrows will move right bottom corner only, but that will be enough as the resized paste area can then be moved around by arrows.

Another question is, what to do with resized clipboard when paste is cancelled (by pressing "Escape", or otherwise) - leave it resized, or return to the original one? (Considering that if it's left resized, then there will be no easy way to undo the resize and restore the original clipboard.)
I don't know if anyone wants rotate or skew (I've haven't had a need for it yet), but possibly with a modifier key while dragging (Alt for rotate, Ctrl for skew, etc...)
Ctrl+click is already bound to picking color from canvas. Alt+click is reportedly intercepted by GNOME and nontrivial to disable there.
And Shift and Ctrl+Shift serve for coordinate fixation. Which will be a necessity for resizing in a single direction, when the selection area is small, or if a click-to-resize approach is used.
or a right click context menu
Right click is already "Commit paste".
Now you see what my "integrate it into mtPaint" meant? ;-) Most kinds of control inputs are already bound to something or other, and finding an opening where to add something new is not a trivial thing.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#147 Post by greengeek »

The way I would like to be able to use it is:

1) Add a new menu entry (in 'selection' menu) labelled "scale" - put this entry below the entries that already exist in the 'selection' menu as follows:
Flip Vertically
Flip Horizontally
Rotate Clockwise
Rotate Anti-Clockwise
Scale

2) When the user clicks 'Scale' the program should display the same (or very similar) dialog window used by 'Image, Scale Canvas' function.

3) The users chosen 'scale' parameters would be applied only to the item that has currently been selected by using 'ctrl c' to capture the area defined by the selection tool.
MTpaint would use scaling steps similar to those described Don570 above, but maybe it could be done without visibly opening a new layer - the user does not need to see the actual transformation window as they have already selected the area to transform, and have selected the scale parameters.

Dons method is very helpful to allow a much broader range of transformations than just 'scale' (thanks for the tutorial Don!) but the proposed addition would be limited to 'scale' only.

4) As soon as mtpaint had acted on the 'scale' request, it would load the scaled result back into the clipboard and the user would repaste it with 'ctrl v'.
.

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

mtpaint version 3.44.83 available

#148 Post by don570 »

version 3.44.83 available in first post
_________________________________________

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#149 Post by technosaurus »

You are totally right of course... The selection method in mtpaint is quite different than most other tools, but after getting used to it, its nice ... especially on laptops where a click + large drag can become a 2 handed operation, but probably 90% of selection resizes would be tweaks small enough to be 1 hande.
The only issue with a dialogue based approach is the case where one is trying to get a particularly exact fit such that it would require the preview to be visible in place and it could control the offset.

While we are on features, how hard would it be to add a Paste from File entry?
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

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

#150 Post by wjaguar »

technosaurus wrote:The only issue with a dialogue based approach is the case where one is trying to get a particularly exact fit such that it would require the preview to be visible in place and it could control the offset.
Yes. And this is why it is better to have both methods. :-)
The cost of having a dialog in addition to interactive resize will be trivial - the extra computational part (for the rare case of masked RGBA clipboard) will be for the most part the same code for both, and the dialog itself already exists for scaling the image.
While we are on features, how hard would it be to add a Paste from File entry?
What for? Load/Copy/Undo/Paste = the same.
The undoable loading has been there since version 3.20 to solve this use case, among others.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#151 Post by technosaurus »

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.
Attachments
pastefromfile.png
(5.2 KiB) Downloaded 431 times
filedialog.png
(2.71 KiB) Downloaded 651 times
result.png
(877 Bytes) Downloaded 428 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Pelo

MTpaint take some days and learn how to use it.

#152 Post by Pelo »

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 ?

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

#153 Post by wjaguar »

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?
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.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#154 Post by technosaurus »

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 :)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

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

#155 Post by wjaguar »

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 :-)
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).

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#156 Post by technosaurus »

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.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

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

#157 Post by wjaguar »

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.

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

#158 Post by don570 »

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

_________________________________________

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

#159 Post by don570 »

version 3.44.84 available at first post

_________________________________________

Lazpaint 6.2 newest!!! available

http://sourceforge.net/projects/asriedu ... recise5xx/

__________________________________________

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

#160 Post by wjaguar »

don570 wrote:Lazpaint 6.2 newest!!! available
So I hope now I can drop the mtPaint project? ;-)

BTW: version 3.44.85 has commandline scripting. Like this:

Code: Select all

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


Post Reply