Cutting the bloat out of .GDYN files
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Cutting the bloat out of .GDYN files | Richard Gitschlag | 06 Apr 02:12 |
Cutting the bloat out of .GDYN files | Liam R E Quin | 06 Apr 02:51 |
Cutting the bloat out of .GDYN files | Richard Gitschlag | 06 Apr 03:08 |
Cutting the bloat out of .GDYN files | Christopher Curtis | 06 Apr 03:27 |
Setting up a win32 compiler [was: Cutting the bloat out of .GDYN files] | Richard Gitschlag | 07 Apr 15:47 |
Cutting the bloat out of .GDYN files | Andrew Shadura | 06 Apr 08:55 |
Cutting the bloat out of .GDYN files | Michael Schumacher | 06 Apr 09:10 |
Cutting the bloat out of .GDYN files | Michael Natterer | 06 Apr 09:34 |
Cutting the bloat out of .GDYN files
I just tried these steps in GIMP 2.8.4:
- On the Dynamics list, hit "New" and created a new dynamics file. - Gave it an expendable name ("Test"), did not adjust any mappings or pressure curves, exited GIMP right away (GIMP saves it to a dynamics file automatically).
So I now have a "Test.gdyn" file, with no actual dynamics mappings or input curves, and it's a 210KB in size -- wait, what? 210 KB? Yup. A full 215,501 bytes of absolutely nothing.
I'd attach the file, but I think that's a bit over the size limits of the mailing list. But to sum up what the file looks like in a text editor:
- Every output declaration (opacity-output, color-output, etc.) in the file reads like this:
(use-pressure no)
(use-velocity no)
(use-direction no)
(use-tilt no)
(use-wheel no)
(use-random no)
(use-fade no)
- (the above is repeated once per output, total 11 times)
- And it's always followed by a curve declaration (pressure-curve, direction-curve, etc.) that looks like this:
(curve-type smooth)
(n-points 17)
(points 34 0.000000 0.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 1.000000 1.000000)
(n-samples 256)
(samples 256 0.000000 0.003922 0.007843 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.050980 0.054902 0.058824 0.062745 0.066667 0.070588 0.074510 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.101961 0.105882 0.109804 0.113725 0.117647 0.121569 0.125490 0.129412 0.133333 0.137255 0.141176 0.145098 0.149020 0.152941 0.156863 0.160784 0.164706 0.168627 0.172549 0.176471 0.180392 0.184314 0.188235 0.192157 0.196078 0.200000 0.203922 0.207843 0.211765 0.215686 0.219608 0.223529 0.227451 0.231373 0.235294 0.239216 0.243137 0.247059 0.250980 0.254902 0.258824 0.262745 0.266667 0.270588 0.274510 0.278431 0.282353 0.286275 0.290196 0.294118 0.298039 0.301961 0.305882 0.309804 0.313725 0.317647 0.321569 0.325490 0.329412 0.333333 0.337255 0.341176 0.345098 0.349020 0.352941 0.356863 0.360784 0.364706 0.368627 0.372549 0.376471 0.380392 0.384314 0.388235 0.392157 0.396078 0.400000 0.403922 0.407843 0.411765 0.415686 0.419608 0.423529 0.427451 0.431373 0.435294 0.439216 0.443137 0.447059 0.450980 0.454902 0.458824 0.462745 0.466667 0.470588 0.474510 0.478431 0.482353 0.486275 0.490196 0.494118 0.498039 0.501961 0.505882 0.509804 0.513725 0.517647 0.521569 0.525490 0.529412 0.533333 0.537255 0.541176 0.545098 0.549020 0.552941 0.556863 0.560784 0.564706 0.568627 0.572549 0.576471 0.580392 0.584314 0.588235 0.592157 0.596078 0.600000 0.603922 0.607843 0.611765 0.615686 0.619608 0.623529 0.627451 0.631373 0.635294 0.639216 0.643137 0.647059 0.650980 0.654902 0.658824 0.662745 0.666667 0.670588 0.674510 0.678431 0.682353 0.686275 0.690196 0.694118 0.698039 0.701961 0.705882 0.709804 0.713725 0.717647 0.721569 0.725490 0.729412 0.733333 0.737255 0.741176 0.745098 0.749020 0.752941 0.756863 0.760784 0.764706 0.768627 0.772549 0.776471 0.780392 0.784314 0.788235 0.792157 0.796078 0.800000 0.803922 0.807843 0.811765 0.815686 0.819608 0.823529 0.827451 0.831373 0.835294 0.839216 0.843137 0.847059 0.850980 0.854902 0.858824 0.862745 0.866667 0.870588 0.874510 0.878431 0.882353 0.886275 0.890196 0.894118 0.898039 0.901961 0.905882 0.909804 0.913725 0.917647 0.921569 0.925490 0.929412 0.933333 0.937255 0.941176 0.945098 0.949020 0.952941 0.956863 0.960784 0.964706 0.968627 0.972549 0.976471 0.980392 0.984314 0.988235 0.992157 0.996078 1.000000)
- (the above is repeated once per mapping, total 77(!) times)
And it's all bloat. If I manually cut out all the input curve declarations (leaving only the mapping matrix definition) this reduces the filesize by 99%, and a much more reasonable 2.4kb.
Ideas.... - Does GIMP really need to output pressure curves for an input that is not actually mapped to something? - Does GIMP really need to output a full lookup table if the specified curve type is "smooth" (the apparent default) and GIMP can just re-generate the lookup table when loading the file? - Why does the definition of a default linear curve -- i.e. (0,0)-(1,1) -- need to specify more than two points? - And since it is a default linear curve, does it even need to be specified at all?
Hmmm.
-- Stratadrake
strata_ranger@hotmail.com
--------------------
Numbers may not lie, but neither do they tell the whole truth.
=
Cutting the bloat out of .GDYN files
On Fri, 2013-04-05 at 19:12 -0700, Richard Gitschlag wrote:
Ideas....
- Does GIMP really need to output pressure curves for an input that is not actually mapped to something?
- Does GIMP really need to output a full lookup table if the specified curve type is "smooth" (the apparent default) and GIMP can just re-generate the lookup table when loading the file? - Why does the definition of a default linear curve -- i.e. (0,0)-(1,1) -- need to specify more than two points? - And since it is a default linear curve, does it even need to be specified at all?
I think the right answer here is that patches are welcome.
Liam
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
Cutting the bloat out of .GDYN files
Subject: Re: [Gimp-developer] Cutting the bloat out of .GDYN files From: liam@holoweb.net
To: strata_ranger@hotmail.com
CC: gimp-developer-list@gnome.org
Date: Fri, 5 Apr 2013 22:51:26 -0400On Fri, 2013-04-05 at 19:12 -0700, Richard Gitschlag wrote:
I think the right answer here is that patches are welcome.
Liam
How easy is it to set up a compiler for GIMP's source on a win32 platform again? At the rate I find things to criticize about the current behavior (bug or otherwise) I really should be making my own local modifications anyway....
-- Stratadrake
strata_ranger@hotmail.com
--------------------
Numbers may not lie, but neither do they tell the whole truth.
=
Cutting the bloat out of .GDYN files
On Fri, Apr 5, 2013 at 11:08 PM, Richard Gitschlag < strata_ranger@hotmail.com> wrote:
How easy is it to set up a compiler for GIMP's source on a win32 platform
again?
http://partha.com/articles/groundwork.html
?
Cutting the bloat out of .GDYN files
Hello,
On Fri, 05 Apr 2013 22:51:26 -0400 Liam R E Quin wrote:
Ideas....
- Does GIMP really need to output pressure curves for an input that is not actually mapped to something? - Does GIMP really need to output a full lookup table if the specified curve type is "smooth" (the apparent default) and GIMP can just re-generate the lookup table when loading the file? - Why does the definition of a default linear curve -- i.e. (0,0)-(1,1) -- need to specify more than two points? - And since it is a default linear curve, does it even need to be specified at all?
I think the right answer here is that patches are welcome.
It's never the right answer. Especially when a question is asked, not just a rant posted.
WBR, Andrew
Cutting the bloat out of .GDYN files
On 06.04.2013 10:55, Andrew Shadura wrote:
Hello,
On Fri, 05 Apr 2013 22:51:26 -0400 Liam R E Quin wrote:
Ideas....
- Does GIMP really need to output pressure curves for an input that is not actually mapped to something? - Does GIMP really need to output a full lookup table if the specified curve type is "smooth" (the apparent default) and GIMP can just re-generate the lookup table when loading the file? - Why does the definition of a default linear curve -- i.e. (0,0)-(1,1) -- need to specify more than two points? - And since it is a default linear curve, does it even need to be specified at all?I think the right answer here is that patches are welcome.
It's never the right answer. Especially when a question is asked, not just a rant posted.
So you're trying to prevent Richard from working on GIMP's source code in order to check whether his ideas will work out?
Regards, Michael
Cutting the bloat out of .GDYN files
On Sat, 2013-04-06 at 10:55 +0200, Andrew Shadura wrote:
Hello,
On Fri, 05 Apr 2013 22:51:26 -0400 Liam R E Quin wrote:
Ideas....
- Does GIMP really need to output pressure curves for an input that is not actually mapped to something? - Does GIMP really need to output a full lookup table if the specified curve type is "smooth" (the apparent default) and GIMP can just re-generate the lookup table when loading the file? - Why does the definition of a default linear curve -- i.e. (0,0)-(1,1) -- need to specify more than two points? - And since it is a default linear curve, does it even need to be specified at all?I think the right answer here is that patches are welcome.
It's never the right answer. Especially when a question is asked, not just a rant posted.
It is exactly the answer, because the answer to obviously stupid things a program does is most of the time "it is like it is because nobody did anything about it".
--mitch
Setting up a win32 compiler [was: Cutting the bloat out of .GDYN files]
From: ccurtis0@gmail.com
Date: Fri, 5 Apr 2013 23:27:23 -0400
Subject: Re: [Gimp-developer] Cutting the bloat out of .GDYN files
To: strata_ranger@hotmail.com
CC: gimp-developer-list@gnome.org
On Fri, Apr 5, 2013 at 11:08 PM, Richard Gitschlag wrote:
How easy is it to set up a compiler for GIMP's source on a win32 platform again? http://partha.com/articles/groundwork.html
?-----------------------
A related question: is it possible to compile GIMP for win32 from inside an IDE (such as MSVC) ?
-- Stratadrake
strata_ranger@hotmail.com
--------------------
Numbers may not lie, but neither do they tell the whole truth.
=