RSS/Atom feed Twitter
Site is read-only, email is disabled

A plug-in for those who still don't like the new Save/Export

This discussion is connected to the gimp-user-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.

25 of 25 messages available
Toggle history

Please log in to manage your subscriptions.

A plug-in for those who still don't like the new Save/Export Akkana Peck 11 Aug 20:39
  A plug-in for those who still don't like the new Save/Export R Kimber 12 Aug 15:20
   A plug-in for those who still don't like the new Save/Export Alexandre Prokoudine 12 Aug 16:07
    A plug-in for those who still don't like the new Save/Export Partha Bagchi 12 Aug 16:30
     A plug-in for those who still don't like the new Save/Export Alexandre Prokoudine 12 Aug 16:41
      A plug-in for those who still don't like the new Save/Export Partha Bagchi 12 Aug 16:51
   A plug-in for those who still don't like the new Save/Export Burnie 12 Aug 20:50
    A plug-in for those who still don't like the new Save/Export Alexandre Prokoudine 13 Aug 06:19
  A plug-in for those who still don't like the new Save/Export maderios 15 Aug 12:03
  A plug-in for those who still don't like the new Save/Export minhsien0330 19 Aug 00:47
A plug-in for those who still don't like the new Save/Export maderios 17 Aug 19:31
  A plug-in for those who still don't like the new Save/Export Partha Bagchi 17 Aug 19:55
   A plug-in for those who still don't like the new Save/Export maderios 18 Aug 16:49
    A plug-in for those who still don't like the new Save/Export Akkana Peck 19 Aug 18:51
     A plug-in for those who still don't like the new Save/Export Paka 19 Aug 18:58
      A plug-in for those who still don't like the new Save/Export Akkana Peck 19 Aug 19:10
       A plug-in for those who still don't like the new Save/Export Chris Mohler 19 Aug 19:20
        A plug-in for those who still don't like the new Save/Export Akkana Peck 19 Aug 23:49
         A plug-in for those who still don't like the new Save/Export Chris Mohler 20 Aug 00:15
          A plug-in for those who still don't like the new Save/Export maderios 20 Aug 11:23
           A plug-in for those who still don't like the new Save/Export Patrick Shanahan 20 Aug 11:39
           A plug-in for those who still don't like the new Save/Export Burnie West 20 Aug 17:41
           A plug-in for those who still don't like the new Save/Export Chris Mohler 20 Aug 17:50
     A plug-in for those who still don't like the new Save/Export Akkana Peck 19 Aug 19:08
      A plug-in for those who still don't like the new Save/Export gg 19 Aug 19:47
Akkana Peck
2012-08-11 20:39:52 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

Yet another thread about Save vs. Export this morning. I guess it's time to post this.

Early on in the discussions, I posted something saying, basically, I don't like the new model either, but I'm going to work with it for a while and see if I continue to feel that way. But if I do, it's easy enough to write a plug-in that does what you want Save to do, perhaps involving gimp-file-save, and bind it to Ctrl-S.

Well, actually I've found it surprisingly easy to adapt to using ctrl-E instead of ctrl-S. It's only a minor irritation that I have to ignore the "you have unsaved images" when I quit (and that I can no longer use it to tell me whether I *really* have unsaved images).

But obviously a lot of people on the mailing lists are having a lot more trouble adapting. So yesterday I looked into the plug-in idea. And found out it was trivial. Aside from registering the plug-in, all you really need are two lines of Python:

pdb.gimp_file_save(img, drawable, img.filename, img.filename) pdb.gimp_image_clean_all(img)

The first line saves the image back to its current filename. (The gimp-file-save PDB call still handles all types, not just XCF.) The second line marks the image as clean, so you don't see an "unsaved image" warning when you quit. Since these are both PDB calls, you could also do them in Script-Fu.

Of course, I couldn't just stop there -- I wanted it to handle images that didn't have filenames yet. For those, I couldn't use the standard GIMP save-as dialog, because as far as I can tell, there's no way to call that dialog from a plug-in. So it uses the standard GTK save-as dialog, and it starts in whatever directory is most prevalent in your currently open images. The dialog part isn't doable in Script-Fu, I don't think (which is why I used Python).

Anyway, the Python plug-in is available here: https://github.com/akkana/gimp-plugins/blob/master/save-export-clean.py It shows up as File->Save/Export clean. Lousy name. Feel free to suggest a better one.

Use at your own risk. I haven't tested it much. It WILL OVERWRITE the image file, without any warnings or confirmation dialogs. If you decide you like it, you can bind it to Ctrl-S. Or whatever.

Now can we move on and talk about gegl graphs and improving the brush UI? :-)

Alexandre Prokoudine writes (in response to the latest save-export thread):

By the way, what does it take to make you less sour a more broad-minded and positive thinking? Would a mug of cocoa and a bun do the trick, perhaps?

That sounds lovely, Alexandre. I think I'll go make some.

...Akkana

R Kimber
2012-08-12 15:20:23 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sat, 11 Aug 2012 13:39:52 -0700 Akkana Peck wrote:

Now can we move on and talk about gegl graphs and improving the brush UI? :-)

Or even making widely used plugins like 8bf work in Gimp

- Richard.

Alexandre Prokoudine
2012-08-12 16:07:15 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 12, 2012 at 7:20 PM, R Kimber wrote:

Or even making widely used plugins like 8bf work in Gimp

Are you by any chance referring to the PSPI plug-in?

Alexandre Prokoudine http://libregraphicsworld.org

Partha Bagchi
2012-08-12 16:30:20 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 12, 2012 at 12:07 PM, Alexandre Prokoudine wrote:

On Sun, Aug 12, 2012 at 7:20 PM, R Kimber wrote:

Or even making widely used plugins like 8bf work in Gimp

Are you by any chance referring to the PSPI plug-in?

Alexandre Prokoudine http://libregraphicsworld.org
_______________________________________________ gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list

Alexandre,

All Photoshop plugins filters have the extension 8bf?

Alexandre Prokoudine
2012-08-12 16:41:31 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 12, 2012 at 8:30 PM, Partha Bagchi wrote:

Alexandre,

All Photoshop plugins filters have the extension 8bf?

Nope. There's also 8bi and others. See the beginning of http://www.fileinfo.com/filetypes/plugin.

8bf is the only supported format because it's the only one Tor had documentation for. Adobe published some specs for its file formats since then, but nothing on filters as far as I can tell.

Alexandre Prokoudine http://libregraphicsworld.org

Partha Bagchi
2012-08-12 16:51:44 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 12, 2012 at 12:41 PM, Alexandre Prokoudine wrote:

On Sun, Aug 12, 2012 at 8:30 PM, Partha Bagchi wrote:

Alexandre,

All Photoshop plugins filters have the extension 8bf?

Nope. There's also 8bi and others. See the beginning of http://www.fileinfo.com/filetypes/plugin.

8bf is the only supported format because it's the only one Tor had documentation for. Adobe published some specs for its file formats since then, but nothing on filters as far as I can tell.

Alexandre Prokoudine http://libregraphicsworld.org
_______________________________________________ gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list

OK, but Wiki says that 8bf are Photoshop plug-in filters. See http://en.wikipedia.org/wiki/8bf#Plugin_types :)

Anyway, not relevant to the overall discussion about Akkana's plugin.

Burnie
2012-08-12 20:50:05 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/12/2012 08:20 AM, R Kimber wrote:

Or even making widely used plugins like 8bf work in Gimp

bug #?

Alexandre Prokoudine
2012-08-13 06:19:13 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Mon, Aug 13, 2012 at 12:50 AM, Burnie wrote:

On 08/12/2012 08:20 AM, R Kimber wrote:

Or even making widely used plugins like 8bf work in Gimp

bug #?

What would you need it for? :)

Alexandre Prokoudine http://libregraphicsworld.org

maderios
2012-08-15 12:03:31 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

Hi
Thanks for this post. This plug-in doesn't work for me (Debian Wheezy) I put it in /usr/lib/gimp/2.0/plug-ins/ chmod 755

Regards
Maderios

On 08/11/2012 10:39 PM, Akkana Peck wrote:

Yet another thread about Save vs. Export this morning. I guess it's time to post this.

Early on in the discussions, I posted something saying, basically, I don't like the new model either, but I'm going to work with it for a while and see if I continue to feel that way. But if I do, it's easy enough to write a plug-in that does what you want Save to do, perhaps involving gimp-file-save, and bind it to Ctrl-S.

Well, actually I've found it surprisingly easy to adapt to using ctrl-E instead of ctrl-S. It's only a minor irritation that I have to ignore the "you have unsaved images" when I quit (and that I can no longer use it to tell me whether I *really* have unsaved images).

But obviously a lot of people on the mailing lists are having a lot more trouble adapting. So yesterday I looked into the plug-in idea. And found out it was trivial. Aside from registering the plug-in, all you really need are two lines of Python:

pdb.gimp_file_save(img, drawable, img.filename, img.filename) pdb.gimp_image_clean_all(img)

The first line saves the image back to its current filename. (The gimp-file-save PDB call still handles all types, not just XCF.) The second line marks the image as clean, so you don't see an "unsaved image" warning when you quit. Since these are both PDB calls, you could also do them in Script-Fu.

Of course, I couldn't just stop there -- I wanted it to handle images that didn't have filenames yet. For those, I couldn't use the standard GIMP save-as dialog, because as far as I can tell, there's no way to call that dialog from a plug-in. So it uses the standard GTK save-as dialog, and it starts in whatever directory is most prevalent in your currently open images. The dialog part isn't doable in Script-Fu, I don't think (which is why I used Python).

Anyway, the Python plug-in is available here: https://github.com/akkana/gimp-plugins/blob/master/save-export-clean.py It shows up as File->Save/Export clean. Lousy name. Feel free to suggest a better one.

Use at your own risk. I haven't tested it much. It WILL OVERWRITE the image file, without any warnings or confirmation dialogs. If you decide you like it, you can bind it to Ctrl-S. Or whatever.

Now can we move on and talk about gegl graphs and improving the brush UI? :-)

Alexandre Prokoudine writes (in response to the latest save-export thread):

By the way, what does it take to make you less sour a more broad-minded and positive thinking? Would a mug of cocoa and a bun do the trick, perhaps?

That sounds lovely, Alexandre. I think I'll go make some.

...Akkana _______________________________________________ gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list

maderios
2012-08-17 19:31:33 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/17/2012 09:24 PM, Akkana Peck wrote:

maderios writes:

Hi
Thanks for this post. This plug-in doesn't work for me (Debian Wheezy) I put it in /usr/lib/gimp/2.0/plug-ins/ chmod 755

What is it doing, or not doing? "Doesn't work" doesn't give me much to go on to figure out what needs fixing.

...Akkana

Hi
It means I can't see any change in the menu. I can't see any change concerning save and save as.
Greetings

Partha Bagchi
2012-08-17 19:55:12 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Fri, Aug 17, 2012 at 3:31 PM, maderios wrote:

On 08/17/2012 09:24 PM, Akkana Peck wrote:

maderios writes:

Hi
Thanks for this post. This plug-in doesn't work for me (Debian Wheezy) I put it in /usr/lib/gimp/2.0/plug-ins/ chmod 755

What is it doing, or not doing? "Doesn't work" doesn't give me much to go on to figure out what needs fixing.

...Akkana

Hi
It means I can't see any change in the menu. I can't see any change concerning save and save as.
Greetings

--
Maderios

See if this script helps you. An old script written by Rob Antonishen:

http://ffaat.pointclark.net/incoming/scripts/save_and_export.scm

maderios
2012-08-18 16:49:24 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/17/2012 09:55 PM, Partha Bagchi wrote:

Maderios

See if this script helps you. An old script written by Rob Antonishen:

http://ffaat.pointclark.net/incoming/scripts/save_and_export.scm

Hi
The Akkana script
https://github.com/akkana/gimp-plugins/blob/master/save-export-clean.py works well now.

Greetings

minhsien0330
2012-08-19 00:47:50 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

Dear Akkana Peck:

Thanks for your plug-in, It's really useful !

After testing it I found this plug-in will not export the background layer to save.
The procedures to reproduce this problem are: (1) File > New > Create a New Image (default backgound color is white) (2) Layers > New Layer (choose "Transparency") (3) Drawing any thing on the new transparent layer with Paintbrush tool (4) File > Save/Export Clean
(5) Type a name "test.jpg" and "Save" it (6) Open the "test.jpg" with any image viewer, you will see it had a black ground, not the white background.

Besides, how do I setup the exported jpg quality? The defualt jpeg output quality of Save/Export Clean seems very low.

Thanks a lot~

Best Regards,

Minhsien0330

Akkana Peck
2012-08-19 18:51:58 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

maderios writes:

The Akkana script
https://github.com/akkana/gimp-plugins/blob/master/save-export-clean.py works well now.

For those who haven't used sites like Github before: be sure to click on "Raw" before saving the plug-in to your plug-ins directory.

minhsien0330 writes:

After testing it I found this plug-in will not export the background layer to save.

Interesting! Thanks for the clear steps -- I see the same thing you do.

I had wondered why the PDB call gimp-file-save required a drawable (layer) argument. It looks like, when exporting to formats like jpeg which can't handle multiple layers, gimp-file-save uses that argument to decide which layer to save. That also explains why, in GIMP 2.6 and earlier, we had to go through that extra step of flattening the image if it had multiple layers before it could be saved to jpeg.

To get around that, the plug-in would probably have to have some of extra logic:

if (the image has multiple layers) look up target file type to see if the format supports that if not supported:
save context for undo, or make a duplicate image flatten the image
save it
undo the flatten or delete the duplicate image

I don't know of a way using the GIMP pdb to look up whether a particular file format needs flattening. So the plug-in might have to maintain its own table of formats.

I had been thinking about this plug-in as something for people who edit a png or jpg or whatever, make a simple change and re-save it. I figured that when someone starts adding extra layers, they'd actually prefer the "save as xcf, export a copy to jpg" model ... at least, that's my own workflow. Do you think there are a lot of people who use multiple layers yet save as jpg?

Besides, how do I setup the exported jpg quality? The defualt jpeg output quality of Save/Export Clean seems very low.

That's a good question, and might require more research. At first I assumed it was following my default settings for the jpeg plug-in. If you export to JPG and get the dialog, you can click on "Save Settings" after adjusting the Quality slider. But GIMP doesn't actually seem to save those settings -- I find that whatever I adjust them to, my jpg quality settings end up at 90, whether I actually set the default higher or lower than that.

That might be a bug -- if so, we should probably move to the gimp-developer list to find out (CCing). I'll do more testing before filing one, but it seems odd that quality keeps ending up at 90 and I don't seem to be able to change it.

...Akkana

Paka
2012-08-19 18:58:57 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

* Akkana Peck [08-19-12 14:53]:

I had wondered why the PDB call gimp-file-save required a drawable (layer) argument. It looks like, when exporting to formats like jpeg which can't handle multiple layers, gimp-file-save uses that argument to decide which layer to save. That also explains why, in GIMP 2.6 and earlier, we had to go through that extra step of flattening the image if it had multiple layers before it could be saved to jpeg.

To get around that, the plug-in would probably have to have some of extra logic:

wouldn't it be more simple to flatten everything rather than ... ?

or should I remount the *dummy hat* :^)

Akkana Peck
2012-08-19 19:08:54 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

minhsien0330 writes:

Besides, how do I setup the exported jpg quality? The defualt jpeg output quality of Save/Export Clean seems very low.

Akkana Peck writes:

I find that whatever I
adjust them to, my jpg quality settings end up at 90, whether I actually set the default higher or lower than that.

Turns out that's a known bug that has already been fixed in the GIMP 2.8 tree.

...Akkana

Akkana Peck
2012-08-19 19:10:19 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

Paka writes:

* Akkana Peck [08-19-12 14:53]:

To get around that, the plug-in would probably have to have some of extra logic:

wouldn't it be more simple to flatten everything rather than ... ?

It wouldn't make you very happy after you saved an XCF and tried to reopen it ... some formats DO support layers. :-)

...Akkana

Chris Mohler
2012-08-19 19:20:46 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 19, 2012 at 2:10 PM, Akkana Peck wrote:

wouldn't it be more simple to flatten everything rather than ... ?

It wouldn't make you very happy after you saved an XCF and tried to reopen it ... some formats DO support layers. :-)

How about:

- Duplicate image - Flatten duplicate
- Save
- Destroy duplicate

Chris

gg
2012-08-19 19:47:05 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/19/12 21:08, Akkana Peck wrote:

minhsien0330 writes:

Besides, how do I setup the exported jpg quality? The defualt jpeg output quality of Save/Export Clean seems very low.

Akkana Peck writes:

I find that whatever I
adjust them to, my jpg quality settings end up at 90, whether I actually set the default higher or lower than that.

Turns out that's a known bug that has already been fixed in the GIMP 2.8 tree.

...Akkana
____________________

That explains a thing or two.

However 90 if not low. I find even on flesh tones, which are quite prone to zoning, I find anything over 84 has no perceptible difference in quality but quickly bloats the file size.

gg

Akkana Peck
2012-08-19 23:49:12 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

Chris Mohler writes:

On Sun, Aug 19, 2012 at 2:10 PM, Akkana Peck wrote:

wouldn't it be more simple to flatten everything rather than ... ?

It wouldn't make you very happy after you saved an XCF and tried to reopen it ... some formats DO support layers. :-)

How about:

- Duplicate image - Flatten duplicate
- Save
- Destroy duplicate

That was exactly one of the two options I just described. and if you're saving to XCF, you'll end up with a flattened XCF that's lost all the layer info.

Sure, it's fine if you only use the plug-in for exporting to JPG, and use Save for XCF. But then you probably wouldn't want to bind it to Ctrl-S.

...Akkana

Chris Mohler
2012-08-20 00:15:38 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Sun, Aug 19, 2012 at 6:49 PM, Akkana Peck wrote:

That was exactly one of the two options I just described. and if you're saving to XCF, you'll end up with a flattened XCF that's lost all the layer info.

Sure, it's fine if you only use the plug-in for exporting to JPG, and use Save for XCF. But then you probably wouldn't want to bind it to Ctrl-S.

Ah. My mistake.

I'm adapting to the new save/export workflow, so haven't needed to install your plug-in and didn't quite grasp what it was doing ;)

Chris

maderios
2012-08-20 11:23:01 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/20/2012 02:15 AM, Chris Mohler wrote:

Ah. My mistake.

I'm adapting to the new save/export workflow,

so haven't needed to

install your plug-in and didn't quite grasp what it was doing

Hi
Explanation: this plugin simplifies the life of people who use Gimp as a working tool.
Best regards.

Patrick Shanahan
2012-08-20 11:39:26 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

* maderios [08-20-12 07:24]:

Explanation: this plugin simplifies the life of people who use Gimp as a working tool.

The abrasive attitude will not promote much sympathy for your "use case".

Burnie West
2012-08-20 17:41:08 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On 08/20/2012 04:23 AM, maderios wrote:

On 08/20/2012 02:15 AM, Chris Mohler wrote:

Ah. My mistake.

I'm adapting to the new save/export workflow,

so haven't needed to

install your plug-in and didn't quite grasp what it was doing

Hi
Explanation: this plugin simplifies the life of people who use Gimp as a working tool.

and don't want to take the time to adapt - - -

As the biologists have been teaching for more than a century, it is best to adapt as change / evolution never ends Not all change at first blush to be an advance; and some motion feels very regressive (like forest fires).
Of course, some change is not an advance, and here I particularly refer to wars - and of course in the current context, flame wars

Chris Mohler
2012-08-20 17:50:10 UTC (over 12 years ago)

A plug-in for those who still don't like the new Save/Export

On Mon, Aug 20, 2012 at 6:23 AM, maderios wrote:

Hi
Explanation: this plugin simplifies the life of people who use Gimp as a working tool.
Best regards.

Please. I'm almost certain it was written to stop all the whining.

I "Save As" every hour or so and bump the version, but still - there's nothing quite as awful as accidentally discarding all of your layers, masks, paths, channels, etc. from your "working tool".

Chris