Guides in templates
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.
Guides in templates | Chris Mohler | 28 Dec 02:25 |
Guides in templates | Sven Neumann | 28 Dec 22:53 |
Guides in templates | David Gowers | 29 Dec 04:22 |
Guides in templates | Chris Mohler | 29 Dec 04:29 |
Guides in templates | David Gowers | 29 Dec 09:22 |
Guides in templates
Hi gimp-dev list,
With a recent SVN I created a new image, added guides, and saved it as a template. However when I create a new image and select the template, the guides are no longer there. Is this intended behavior? I can't think of any reason not to keep the guides, but thought I'd ask...
Thanks,
Chris
Guides in templates
Hi,
On Sun, 2008-12-28 at 19:25 +0000, Chris Mohler wrote:
With a recent SVN I created a new image, added guides, and saved it as a template. However when I create a new image and select the template, the guides are no longer there. Is this intended behavior? I can't think of any reason not to keep the guides, but thought I'd ask...
No good reason except that no one has implemented this yet.
Sven
Guides in templates
Hi,
On Mon, Dec 29, 2008 at 8:23 AM, Sven Neumann wrote:
Hi,
On Sun, 2008-12-28 at 19:25 +0000, Chris Mohler wrote:
With a recent SVN I created a new image, added guides, and saved it as a template. However when I create a new image and select the template, the guides are no longer there. Is this intended behavior? I can't think of any reason not to keep the guides, but thought I'd ask...
No good reason except that no one has implemented this yet.
To clarify for Chris:
No one has implemented [image-based templates] yet; 'Save as template' does not fully work in this sense, it doesn't save image content; It just saves all the properties that you can see in the 'New image' dialog, like size, units, dpi, and fill color.
David
Guides in templates
On Mon, Dec 29, 2008 at 3:53 PM, Sven Neumann wrote:
Hi,
On Sun, 2008-12-28 at 19:25 +0000, Chris Mohler wrote:
With a recent SVN I created a new image, added guides, and saved it as a template. However when I create a new image and select the template, the guides are no longer there. Is this intended behavior? I can't think of any reason not to keep the guides, but thought I'd ask...
No good reason except that no one has implemented this yet.
OK - I took a look at the template code and after a (quick) review I have some more questions.
It seems that the current implementation writes parameters to the ~/.gimp-2.x/templaterc file, which are used to create a new image. Is there a technical (or other?) reason to not use the XCF format for templates?
One one hand, adding the guides to the current template system looks somewhat straightforward (like something I might be able to accomplish), but on the other hand I wonder if would be easier in the long run to handle templates as native XCF files.
David's message just came to me - thanks for clarifying:
No one has implemented [image-based templates] yet; 'Save as template' does not fully work in this sense, it doesn't save image content; It just saves all the properties that you can see in the 'New image' dialog, like size, units, dpi, and fill color.
So it sounds like 'image-based templates' is a good idea, but one that has not been implemented yet?
If that's the general consensus, I will investigate the image-based approach a bit more. No promises though - I am still not extremely good at C...
Thanks,
Chris
Guides in templates
Hi,
On Mon, Dec 29, 2008 at 1:59 PM, Chris Mohler wrote:
On Mon, Dec 29, 2008 at 3:53 PM, Sven Neumann wrote:
Hi,
On Sun, 2008-12-28 at 19:25 +0000, Chris Mohler wrote:
With a recent SVN I created a new image, added guides, and saved it as a template. However when I create a new image and select the template, the guides are no longer there. Is this intended behavior? I can't think of any reason not to keep the guides, but thought I'd ask...
No good reason except that no one has implemented this yet.
OK - I took a look at the template code and after a (quick) review I have some more questions.
It seems that the current implementation writes parameters to the ~/.gimp-2.x/templaterc file, which are used to create a new image. Is there a technical (or other?) reason to not use the XCF format for templates?
One one hand, adding the guides to the current template system looks somewhat straightforward (like something I might be able to accomplish), but on the other hand I wonder if would be easier in the long run to handle templates as native XCF files.
IMO 'both' is the correct answer. For simple templates like what can
currently be expressed by templaterc,
XCF is overkill*. Otherwise, using XCF for the template is fine, we
can save template .XCFs in gimp's template/ directory (don't know
whether it creates this itself, but I found it in my .gimp-2.7
directory.) and
use the templaterc 'filename' field to point at them. Of course we
should synchronize the templaterc properties like image size and units
with the template XCFs as applicable.
* 12k for a 2400x2400 empty grayscale image, versus ~100 bytes for a templaterc entry.
David's message just came to me - thanks for clarifying:
No one has implemented [image-based templates] yet; 'Save as template' does not fully work in this sense, it doesn't save image content; It just saves all the properties that you can see in the 'New image' dialog, like size, units, dpi, and fill color.
So it sounds like 'image-based templates' is a good idea, but one that has not been implemented yet?
Yes, it's been planned for a long time , a field for it is already
included in GimpTemplate (app/core/gimptemplate.h). Basically what
needs to be done is
a) set that field when saving as template, and
b) use the field when creating a new image (there may be UI
considerations involved here).
If that's the general consensus, I will investigate the image-based approach a bit more. No promises though - I am still not extremely good at C...
I look forward to seeing what you come up with.
David