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

#181 Post by don570 »

Pressing the letter L can be useful sometimes if
you are working with layers

______________________________

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

Re: Version 3.44.86

#182 Post by wjaguar »

don570 wrote:To sum up: Only Ubuntu versions that have gtk+3 have the problem with the script text window.
The specific cause of the problem is now determined. It is here:
/usr/lib/i386-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so
It comes from this package: http://packages.ubuntu.com/trusty/libs/ ... llbar-gtk2 and is known as source of numerous, never fixed, bugs.
The simplest way to deal with it, is to disable it using an env variable:
LIBOVERLAY_SCROLLBAR=0 ./mtpaint
And if some other simple, and easy to find, workaround doesn't present itself, I'll add this to mtPaint's init code.
gjuhasz wrote:It seems that mtpaint still cannot be started with the dock visible.
Not implemented yet. The idea of adding code to save one keypress per session still strikes me as exceedingly weird.

BTW, which would be preferable: restoring the dock state from the previous session, or a separate pref toggle for choosing the initial state?

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

#183 Post by don570 »

Ubuntu site wrote: "overlay-scrollbar" versions published in Ubuntu

Utopic (0.2.16+r359+14.10.20140625-0ubuntu1): main/libs
Trusty (0.2.16+r359+14.04.20131129-0ubuntu1): main/libs
Precise-updates (0.2.16-0ubuntu1.1): main/libs
Precise (0.2.16-0ubuntu1): main/libs
Ubuntu hasn't given up "overlay-scrollbar" .
It started in Precise and it's still in Utopic

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Re: Version 3.44.86

#184 Post by gjuhasz »

wjaguar wrote:Not implemented yet. The idea of adding code to save one keypress per session still strikes me as exceedingly weird.
This is not one keystroke, because the dock can be enabled only thru the menu (F12 does not work becaus ROX catches it, see the discussion above). Then resize the window to arrange its child items.
wjaguar wrote:BTW, which would be preferable: restoring the dock state from the previous session, or a separate pref toggle for choosing the initial state?
I assume that such an option should appear anyway in a config file among the others. I would be happy to see the last status (visibility, size, position, etc.,) of ALL child windows, including dock, in a config file based on which mtPaint opens next time. I think this is better than a pref toggle.

Thanks in advance.

Regards,

gjuhasz

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

#185 Post by don570 »

New version 3.44.86 available on first post.


__________________________________

I booted up Ubuntu Trusty tahr ISO and tried
Dmitry's suggestion and it worked!!

Code: Select all

LIBOVERLAY_SCROLLBAR=0 ./mtpaint 
but I needed to cd to /usr/bin first.

To avoid the extra step I successfully tried

Code: Select all

LIBOVERLAY_SCROLLBAR=0 mtpaint 
Ubuntu advice wrote:
Bash's quick assignment and inheritance trick

The bash shell has a trick to allow us to set one or more environment variables and run a child process with single command. For example, in order to set the "LANGUAGE" and "FOO" environment variables and then run "gedit", we would use the following command:

LANGUAGE=he FOO=bar gedit

Note: When using this command, the new values are only assigned to the environment variables of the child process (in this case gedit). The variables of the shell retain their original values. For instance, in the example above, the value of "LANGUAGE" will not change from its original value, as far as subsequent commands to the shell are concerned.

A similar behaviour can be achieved with other shells by using the env command.
______________________________________

I noticed the following error warning when trying a script effect on an
indexed color image. I suggest more of an explanation. I added some
text in red.

Image

___________________

As an experiment I tried putting the following two lines in ~/.profile

Code: Select all

LIBOVERLAY_SCROLLBAR=0
export LIBOVERLAY_SCROLLBAR
..and to my surprise it worked. I tried a couple of other apps and they
worked as well , but I imagine some apps won't like this???

_____________________________________________

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

#186 Post by wjaguar »

don570 wrote:Bash's quick assignment and inheritance trick
LANGUAGE=he FOO=bar gedit
This technique is VERY useful in a variety of problem cases. One example is when you want to make a program load a specific build of some libs, or a different version of them (including when the program was linked with a version having a different soname, so doesn't even run if launched in the usual way). You can put both the libs and the program into a directory, and run it from there in this way:
LD_LIBRARY_PATH=. ./theprogram
I noticed the following error warning when trying a script effect on an indexed color image. I suggest more of an explanation. I added some
text in red.
Reasonable, but something like "Need an RGB image" would be more appropriate: not every reason for disabled menuitem merits a suggested action. Say, "-edit/undo" can tell "Need an undo frame", but can hardly suggest anything beyond that.
As an experiment I tried putting the following two lines in ~/.profile
LIBOVERLAY_SCROLLBAR=0
export LIBOVERLAY_SCROLLBAR
..and to my surprise it worked. I tried a couple of other apps and they
worked as well , but I imagine some apps won't like this???
Exactly the reverse - I expect most apps to work better when less of nondefault trickery is done to their GTK+. People who write software, in general do not use Ubuntu, and vice versa - so, most things get only superficial prerelease testing on it, or none at all. Just like mtPaint. :-) And the bugs introduced by Ubuntu-specific gimmicks, get discovered by nonprogrammer users, reported (if at all) into Ubuntu-specific channels, and languish there till the end of time.
gjuhasz wrote:This is not one keystroke, because the dock can be enabled only thru the menu (F12 does not work becaus ROX catches it, see the discussion above).
Fixing the keymap in one's WM is one's own responsibility.
I would be happy to see the last status (visibility, size, position, etc.,) of ALL child windows, including dock, in a config file based on which mtPaint opens next time. I think this is better than a pref toggle.
OK. Then I will make mtPaint remember to re-show the dock if it was shown by user action (as opposed to automatically, by passing a list of files on commandline; this duality was why the setting got removed in the first place).

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

#187 Post by don570 »

It's quite common for the people who make the packages for
launchpad.com to make modifications to the source code for Ubuntu.

They have the modified source available at the site
such as tiff_4.0.3-7ubuntu0.1.debian.tar.gz

_________________________________________________

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

#188 Post by wjaguar »

don570 wrote:It's quite common for the people who make the packages for launchpad.com to make modifications to the source code for Ubuntu.
What is common for them, is import modifications from Debian. Which is not into eyecandy, and definitely does not install UI-tweaking plugins by dozen.
To see something patched specifically for Ubuntu, is quite rare.

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

#189 Post by don570 »

The bizarre file manager they use kept on working. That was the
surprise. I expected a crash.
_____________________________________________

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#190 Post by jamesbond »

wjaguar, 3.44.86 has a bug. Exporting to system clipboard causes a crash.

Steps to reproduce:
1. Create a drawing (anything - new image, loading, etc)
2. Selection --> Select All
3. Edit --> Copy
4. Edit --> Export to System Clipboard

Open other programs that can accept graphics program (seamonkey email, abiword, another mtpaint will do, too), then do paste (if using mtpaint, choose "import from system clipboard).

Note that the source mtpaint will crash with a segfault.

I've bisected the problem to commit 3.44.82, versions up to 3.44.81 works well. I haven't isolated the offending code, though, I thought you could see it faster than I :D

PS: is it best to report bugs here? Or in github?
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

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

#191 Post by wjaguar »

jamesbond wrote:wjaguar, 3.44.86 has a bug. Exporting to system clipboard causes a crash.
Thanks for detecting this insidious problem. Fix will be in version 3.44.87.
I've bisected the problem to commit 3.44.82, versions up to 3.44.81 works well. I haven't isolated the offending code, though, I thought you could see it faster than I :D
Indeed. :-)
The cause was that scripting came to rely on an invariant which clipboard's event-control slot happened to violate (along with drag-drop's, so it was crashing too). Now I changed the layout of event-control slots to a better one, while making sure the invariant is upheld.
PS: is it best to report bugs here? Or in github?
Best is to report them by email; that way, I can have all such discussions neatly archived in one place - easy to find them later if need arises.
And the forum is next best thing - because I dislike the interface of "issue tracker" on Github. :-)

P.S.: And for now, attached is a simple patch.
Attachments
ev34486.patch.gz
(492 Bytes) Downloaded 195 times

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

New version 3.44.87 available

#192 Post by don570 »

New version 3.44.87 available in first post

Checked system clipboard copy back and forth to Gimp and it works.

I will make new debian versions in next few days to check them out as well.

_________________________________________________

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#193 Post by Dingo »

Dear wjaguar

mtpaint for jpeg-2000, supports libjasper and libopenjpeg both. I compiled in past with these two libs alternatively, But I noticed not any difference

what library do you recommend for jpeg-2000 support?
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

mtPaint remembers Dock status

#194 Post by gjuhasz »

wjaguar wrote:OK. Then I will make mtPaint remember to re-show the dock if it was shown by user action.
Thank you.

Regards,

gjuhasz

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#195 Post by SFR »

Hey Dmitry

I find the new '--cmd' feature extremely useful, especially for batch processing etc., however I've encountered two problems.

1. In case of some larger images:

Code: Select all

# ls -lh photo.jpg 
-rwx------ 1 root root 3.3M Sep 26  2009 photo.jpg
# 
# mtpaint --cmd -file/open=photo.jpg -image/rotate=45 -file/as=out
Loading JPEG image - Please Wait ...
********************
You have not allocated enough memory in the Preferences window for this operation.
[ OK ]
# 
From what I see, options in 'Image->Preferences' are inaccessible through CLI:

Code: Select all

# mtpaint --cmd -image/preferences
'-image/preferences' matches a non-scriptable item
[ OK ]
# 
So, the only workaround I have found so far is:

Code: Select all

# echo 'undoMBlimit=128' >> ~/.mtpaint 
# 
# mtpaint --cmd -file/open=photo.jpg -image/rotate=45 -file/as=out
Loading JPEG image - Please Wait ...
********************
Free Rotation - Please Wait ...
********************
Saving JPEG image - Please Wait ...
********************
# 
# sed -i '$d' ~/.mtpaint 
# 
2. I can't save an image as JPEG (if source image was of a different type), because for some reason JPEG2000 takes precedence over it:

Code: Select all

# mtpaint --cmd -file/open=image.png -file/as=out format=jpeg
Loading PNG image - Please Wait ...
********************
Saving JPEG2000 image - Please Wait ...
********************
#
Btw, any chance for exit code other than 0 in case if an error occured?

Slacko-5.7.0 + mtPaint-3.44.87 (compiled by don570).

Thanks &
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

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

#196 Post by wjaguar »

SFR wrote:From what I see, options in 'Image->Preferences' are inaccessible through CLI:
OK, I'll open it for scripting.
However:
echo 'undoMBlimit=128' >> ~/.mtpaint
is a perfectly legitimate solution.
And anyway, the idea was that user's own copy of mtPaint is already configured to his satisfaction. :-)
2. I can't save an image as JPEG (if source image was of a different type), because for some reason JPEG2000 takes precedence over it:
Thanks for noticing this mistake. Now, among matches from the beginning, the shortest will be preferred, instead of the first. Patch is attached.
Btw, any chance for exit code other than 0 in case if an error occured?
Done in the same patch (exit code 1 if error in scripting mode).
Attachments
fix34487.patch.gz
(598 Bytes) Downloaded 293 times

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

#197 Post by wjaguar »

Dingo wrote:what library do you recommend for jpeg-2000 support?
Neither. :-) Both are extremely ugly and wasteful.
Jasper is more widespread, and stable (because unmaintained). OpenJPEG has had version 2.0 released in December 2012 but I haven't even tested compiling with it - maybe it had improved, but I've lost all hope already. :-(

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

#198 Post by don570 »

I've made new debian packages for Ubuntu lucid, precise and Trusty tahr.

They work well with scripts 8)

I could use the system clipboard to transfer an image back and forth
between mtpaint and libreOffice writer.

I tested wacom tablet with Ubuntu trusty tahr and it worked well.
The locales worked as well.

Image

_______________________________________________

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#199 Post by SFR »

Thanks a lot for the patch, Dmitry - both things are working fine now:

Code: Select all

# ./mtpaint --cmd -file/open=photo.jpg -image/rotate=45; echo $?
Loading JPEG image - Please Wait ...
********************
You have not allocated enough memory in the Preferences window for this operation.
[ OK ]
1
# 
# ./mtpaint --cmd -file/open=image.png -file/as format=jpeg; echo $?
Loading PNG image - Please Wait ...
********************
Saving JPEG image - Please Wait ...
********************
0
# 
wjaguar wrote:OK, I'll open it for scripting.
However:
echo 'undoMBlimit=128' >> ~/.mtpaint
is a perfectly legitimate solution.
And anyway, the idea was that user's own copy of mtPaint is already configured to his satisfaction. :)
Oh, it's not so crucial - after all the end effect will be practically the same in both cases. :wink:

Thanks again &
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

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

#200 Post by don570 »

version 3.44.88 available on first post

tested with the following commands in terminal...

...To convert to tif

mtpaint --cmd -file/open=/root/Juncker.jpg -file/as format=tif

___________________________________________________


Here is output of a 45 degree rotation...

mtpaint --cmd -file/open=/root/Juncker.jpg -image/free=45 -file/as format=tif

Image
Last edited by don570 on Tue 21 Jul 2015, 00:00, edited 1 time in total.

Post Reply