implement save handler troubles
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.
implement save handler troubles | Pavel | 22 May 10:24 |
implement save handler troubles | Alexandre Prokoudine | 22 May 10:57 |
implement save handler troubles | Pavel | 22 May 11:01 |
implement save handler troubles | Paka | 22 May 11:33 |
implement save handler troubles | Pavel | 22 May 11:43 |
implement save handler troubles | Michael Schumacher | 22 May 12:43 |
implement save handler troubles | Pavel | 22 May 15:49 |
implement save handler troubles | Pavel | 22 May 15:49 |
implement save handler troubles
Hi team,
I somehow could not reach the author of the original mpo load file handler, so I am trying to write my own.
My new load handler is working fine, however, I have quite big problems with the save handler.
First of all, Gimp writes this message when starting from console:
GIMP-Error: load handler "save-mpo-file" does not take the standard
load handler args<<
but of course, the "save-mpo-file" function is passed to "gimp_register_save_handler" function, not to "gimp_register_load_handler" as the error message might suggest. But anyway, it works OK afterward.
What is the bigger problem is that when the save function is called, I get the image ID of an image with name "Untitled". This image has only one layer. If I iterate through all the images available at the time of saving, there are two - "Untitled", and "test01.jpg". The latter one has been created by opening of two images "as layers" - test01.jpg and test02.jpg. This image contains two layers - "Background" and "test02.jpg".
So it looks like the export command of Gimp creates a temporary image with one layer only (either the active one, or whatever). Which is quite useless. Is this by design? Or how is it possible to export images with multiple layers?
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Thanks, Pavel
implement save handler troubles
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
Alexandre
implement save handler troubles
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
Alexandre
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list
implement save handler troubles
* Pavel [05-22-14 07:05]:
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
Alexandre
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list
maybe because gimp 2.8 was released on 3 May 2012 ?? Why not test with it?
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net
implement save handler troubles
On Thu, 2014-05-22 at 07:33 -0400, Paka wrote:
* Pavel [05-22-14 07:05]:
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
Alexandre
_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-listmaybe because gimp 2.8 was released on 3 May 2012 ?? Why not test with it?
Simply because I don't want to waste 3 or more hours setting up an environment with Gimp 2.8, and because I don't believe that anything regarding save handlers has changed from 2.6 to 2.8. So I would like if anybody can confirm whether it is possible to export multilayer images or not. Is that so complicated question?
implement save handler troubles
Von: Pavel
On Thu, 2014-05-22 at 07:33 -0400, Paka wrote:
* Pavel [05-22-14 07:05]:
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
maybe because gimp 2.8 was released on 3 May 2012 ?? Why not test with it?
Simply because I don't want to waste 3 or more hours setting up an environment with Gimp 2.8, and because I don't believe that anything regarding save handlers has changed from 2.6 to 2.8. So I would like if anybody can confirm whether it is possible to export multilayer images or not. Is that so complicated question?
The save&export separation happened during 2.8, and there are a number of export-related changes in the 2.8 branch as well.
For the exporting, I'd have a look at a plug-in that exports layers as such, for example the PDF plug-in: https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-pdf-save.c
For your plug-in to be relevant to most users, it has to work with GIMP 2.8.
Hint: Do not annoy the people who can help with your questions, and do not discard their questions.
Regards, Michael GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
implement save handler troubles
Hi Michael,
I would argue whose answer was more annoying ...
anyway, thank you for your hint, at least something.
Regarding the version, I specified it so that we were sure that I haven't missed something, but I was almost sure that my problems have nothing to do with the particular Gimp version. (I mean, perhaps somebody would know that there used to be a bug which is fixed now.)
So just for those who might have similar problems in the future:
The "save" procedure must not have NULL as "image_type" argument in "gimp_install_procedure" call. I know that this was quite difficult to guess without the source code snippet, however if somebody really was keen to help, he/she would perhaps ask for the relevant code, rather than answering "Er...why".
The solution of the main problem was to include GIMP_EXPORT_CAN_HANDLE_LAYERS flag in the "gimp_export_image" call. Something what I would expect to be an instant answer on the expert forum like this.
Pavel
On Thu, 2014-05-22 at 14:43 +0200, Michael Schumacher wrote:
Von: Pavel
On Thu, 2014-05-22 at 07:33 -0400, Paka wrote:
* Pavel [05-22-14 07:05]:
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
maybe because gimp 2.8 was released on 3 May 2012 ?? Why not test with it?
Simply because I don't want to waste 3 or more hours setting up an environment with Gimp 2.8, and because I don't believe that anything regarding save handlers has changed from 2.6 to 2.8. So I would like if anybody can confirm whether it is possible to export multilayer images or not. Is that so complicated question?
The save&export separation happened during 2.8, and there are a number of export-related changes in the 2.8 branch as well.
For the exporting, I'd have a look at a plug-in that exports layers as such, for example the PDF plug-in: https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-pdf-save.c
For your plug-in to be relevant to most users, it has to work with GIMP 2.8.
Hint: Do not annoy the people who can help with your questions, and do not discard their questions.
implement save handler troubles
Hi Michael,
I would argue whose answer was more annoying ...
anyway, thank you for your hint, at least something.
Regarding the version, I specified it so that we were sure that I haven't missed something, but I was almost sure that my problems have nothing to do with the particular Gimp version. (I mean, perhaps somebody would know that there used to be a bug which is fixed now.)
So just for those who might have similar problems in the future:
The "save" procedure must not have NULL as "image_type" argument in "gimp_install_procedure" call. I know that this was quite difficult to guess without the source code snippet, however if somebody really was keen to help, he/she would perhaps ask for the relevant code, rather than answering "Er...why".
The solution of the main problem was to include GIMP_EXPORT_CAN_HANDLE_LAYERS flag in the "gimp_export_image" call. Something what I would expect to be an instant answer on the expert forum like this.
Pavel
On Thu, 2014-05-22 at 14:43 +0200, Michael Schumacher wrote:
Von: Pavel
On Thu, 2014-05-22 at 07:33 -0400, Paka wrote:
* Pavel [05-22-14 07:05]:
Is this the most comprehensive answer you can give me?
On Thu, 2014-05-22 at 14:57 +0400, Alexandre Prokoudine wrote:
22 мая 2014 г. 14:28 пользователь "Pavel" написал:
(I am testing it on Gimp 2.6, perhaps it has been improved since then?)
Er... Why?
maybe because gimp 2.8 was released on 3 May 2012 ?? Why not test with it?
Simply because I don't want to waste 3 or more hours setting up an environment with Gimp 2.8, and because I don't believe that anything regarding save handlers has changed from 2.6 to 2.8. So I would like if anybody can confirm whether it is possible to export multilayer images or not. Is that so complicated question?
The save&export separation happened during 2.8, and there are a number of export-related changes in the 2.8 branch as well.
For the exporting, I'd have a look at a plug-in that exports layers as such, for example the PDF plug-in: https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-pdf-save.c
For your plug-in to be relevant to most users, it has to work with GIMP 2.8.
Hint: Do not annoy the people who can help with your questions, and do not discard their questions.