Post Reply 

How to disable all the Save YAPs

Apr 10, 2012, 00:33
Post: #1
How to disable all the Save YAPs
I am working with literally hundreds of images. All of them either are now or will be jpgs. All I need to do is open them up, resize them and then:

1. Cut the canvas size down only on the Y axis and center the image

or

2. Increase the canvas size up on the Y axis and not center the image which requires then sizing the resulting single layer to image size

After that, I need to save it as a different file name and close it. That's it. No other functions, no other options, no other possibilities exist. This is the ONLY way that this job can be done, these images must end up in this format and size.

Again I am doing this to hundreds of files. I am being slowed down a LOT by all the foolish YAPs about "JPG can't handle this blank layer do you want to export, blah blah blah" and of course "You're saving as a jpg so what quality do you want to use?"

Speed is my concern. I don't care about the options because I don't have options for this project. I just want to get it done. All this clicking the chain to break the link between X and Y and then mousing to the Resize button and then hitting Enter twice but only if I sized the canvas up and using the layer options to resize it if I sized it down if extremely time consuming. I want to use the keyboard as much as humanly possible...all this mousing is creating carpal tunnel and the tabbing to buttons is stupid due to the 5000 tab stops on each popup.

Some of this I can accept...I suppose. But is there any way to disable the popups for the JPG warnings when I save? Again I am not wanting to discuss why I should be saving in XCF or the disadvantages of using JPG or anything else. I just want to disable the popups that are slowing this project down significantly.

Thanks (hopefully)
Find all posts by this user
Quote this message in a reply
Apr 10, 2012, 06:29
Post: #2
RE: How to disable all the Save YAPs
How do you determine the new size? Looks like a typical job for a script built around ImageMagick if it can be computed (but then if you enter numbers in resize canvas I suppose it is).

Otherwise, have someone write a small Gimp script that takes the new size, and resizes and saves the image.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 10, 2012, 07:02
Post: #3
RE: How to disable all the Save YAPs
(Apr 10, 2012 06:29)ofnuts Wrote:  How do you determine the new size? Looks like a typical job for a script built around ImageMagick if it can be computed (but then if you enter numbers in resize canvas I suppose it is).

Otherwise, have someone write a small Gimp script that takes the new size, and resizes and saves the image.

The size is always the same in the end product. Sometimes the source is larger than that, sometimes smaller.

But again...I was asking about the Save YAPs. Is there a way to disable them?
Find all posts by this user
Quote this message in a reply
Apr 10, 2012, 07:58
Post: #4
RE: How to disable all the Save YAPs
(Apr 10, 2012 07:02)phlimm Wrote:  The size is always the same in the end product. Sometimes the source is larger than that, sometimes smaller.

But again...I was asking about the Save YAPs. Is there a way to disable them?
No. But you can write (or have written) your own save script.

But, given your goal, I restate my recommendation for a shell script built around Imagemagick. Then the work can be as simple as launching it against a directory containing the images and have it do the work in a matter of *seconds* (could very well process over ten images/second). There are forums with very helpful people on the ImageMagick site.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 10, 2012, 09:15
Post: #5
RE: How to disable all the Save YAPs
Do you know about keyboard shortcuts?

For instance I have defined Ctrl+Alt+F to be Flatten Image just to avoid the "JPEG plug-in can't handle layers" popup.

And of course Ctrl-S saves the image with the same name as it was loaded. (assuming you're using GIMP 2.6.x and not 2.7.x or 2.8 RC1)
Find all posts by this user
Quote this message in a reply
Apr 11, 2012, 16:04
Post: #6
RE: How to disable all the Save YAPs
Thanks for the replies. I did look into ImageMagick and I thought it was going to be a perfect answer. But then all the scripts I found were written for Unix and I am in Windows. I do not have the time to hassle with installing Cygwin and all the supporting stuff just to get them to compile. :O/
Find all posts by this user
Quote this message in a reply
Apr 11, 2012, 17:08
Post: #7
RE: How to disable all the Save YAPs
You don't need cygwin... Some of the calls can be a bit different because Windows cmd.exe does things differently from unix shells, but the functionality of imagemagick is the same on both platforms and you can write scripts in .BAT

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 12, 2012, 10:17
Post: #8
RE: How to disable all the Save YAPs
To get this back to into the realms of GIMP Wink, and to see if I understood your requirements correctly, I've made a quick script to try the re-cropping process on an already open image and attached it here.

As an aside I have to (yet again) apologise for attaching it as a zip file as this forum doesn't allow me to attach the script file directly Angry

The script creates a menu entry: contributed>>phlimm and prompts you to specify the required height and the background colour for those images that aren't tall enough to need cropping.

If this script does what you want, then I could do the next step and write the batch processing wrapper to go round it.

Kevin


Attached File(s)
.zip  phlimm.zip (Size: 962 bytes / Downloads: 29)
Find all posts by this user
Quote this message in a reply
Apr 12, 2012, 16:47
Post: #9
RE: How to disable all the Save YAPs
(Apr 12, 2012 10:17)paynekj Wrote:  As an aside I have to (yet again) apologise for attaching it as a zip file as this forum doesn't allow me to attach the script file directly Angry
It has been corrected, now it's possible to attach .scm files.

GIMP user forum here at GIMP Forums. A friendly place to learn GIMP!
Everyone's welcome, feel free to join the community.
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 13, 2012, 12:44
Post: #10
RE: How to disable all the Save YAPs
@phlimm
Quote:then all the scripts I found were written for Unix and I am in Windows
Coming to this a bit late and really it is off-topic for Gimp but using ImageMagick.
Linux scripts and Win Batch files do differ but not that much for a lot of things.

Something like this can be run from the command line whatever OS you are using.

convert *.jpg -resize 1600x1400 -background blue -compose copy -gravity center -extent 1600x1400 -quality 92 test.jpg

this seems complicated but you can build up an IM command line in parts.

convert is obvious, *.jpg is all jpg files in that folder
-resize 1600x1400 scales each image but keeps aspect ratio.
-background <colour> for the borders
-compose copy -gravity center -extent 1600x1400 makes a width x height canvas and centers the image
-quality 92 test.jpg sets the quality and outputs a file named test-(number).jpg.

screenshot http://i.imgur.com/90EK0.jpg

All sorts of other options for output names and formats.

The people at the ImageMagick forum, same as here, are very helpful, give advice and very often will make a custom batch file. Nothing has to be compiled. Ask there.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  nothing works from the File menu, can't save, export, close, etc jperiod 1 50 Aug 3, 2017 05:19
Last Post: ythgilb
  Default save-as location Babudro 1 117 Jun 7, 2017 15:44
Last Post: ythgilb
  Create new images button & Save as override from Script-fu beniman 12 418 Sep 10, 2014 10:57
Last Post: paynekj
Rainbow How do I save an index image's color map? Zippy0723 1 254 Sep 7, 2014 00:50
Last Post: Zippy0723
  OSX: EXPORT: No Extensions, totally broken (see image).. not a save/export question Thumbz 5 513 May 29, 2014 10:59
Last Post: fluffybunny2

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS