Post Reply 

Macro to Scale then Round Corners?

Jan 10, 2012, 20:12
Post: #1
Macro to Scale then Round Corners?
I'm looking to use script-fu to automate a process I do at work.

What I do is find images, paste them into GIMP, scale them down, and round the corners.

I've been playing around with script fu to make it automatically scale the image and round the corners, but I've run into problems with the image variable needing to be changed each time something is pasted.

Is there a way I can automate this, perhaps some code that will set the image variable to whatever the current window is, or am I stuck doing "manual labor"?
Thanks!
Find all posts by this user
Quote this message in a reply
Jan 10, 2012, 20:58
Post: #2
RE: Macro to Scale then Round Corners?
When the usual script is started, it receives two variables, the current image, and the active drawable (usually a layer).

You can also investigate using ImageMagick. The method seems to imply a prepared transparency mask but if you always scale to the same size this won't be a problem.

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
Jan 10, 2012, 21:18
Post: #3
RE: Macro to Scale then Round Corners?
(Jan 10, 2012 20:58)ofnuts Wrote:  When the usual script is started, it receives two variables, the current image, and the active drawable (usually a layer).

My script looks something like this:
(gimp-image-scale x 104 91)(script-fu-round-corners TRUE x 10 10 FALSE 8 8 15 FALSE FALSE)

Where x=image variable. If I set it to a number, it gives me an error if the current image is not the same as the image number in the script. If I leave it blank, it gives me an error saying that I need to put something there. Is there a variable I can use there to that it references whatever is currently open?
Find all posts by this user
Quote this message in a reply
Jan 10, 2012, 21:23
Post: #4
RE: Macro to Scale then Round Corners?
This is going to be interesting, if a little confusing Wink

Ofnuts can answer your questions here and I'll answer them in your other thread:
http://gimpforums.com/thread-script-fu-t...nd-corners
Find all posts by this user
Quote this message in a reply
Jan 10, 2012, 23:01
Post: #5
RE: Macro to Scale then Round Corners?
(Jan 10, 2012 21:23)paynekj Wrote:  This is going to be interesting, if a little confusing Wink

Ofnuts can answer your questions here and I'll answer them in your other thread:
http://gimpforums.com/thread-script-fu-t...nd-corners
I have nothing to add to your excellent reply Smile

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
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  round corners of rectangle BenjaminGer 3 177 Aug 21, 2017 06:01
Last Post: ythgilb
  Scale Image won’t show inches properly pixelated 5 1,254 Sep 18, 2014 18:47
Last Post: Mark Pigott
  PRINT SIZE and SCALE and Printing... TWK 2 333 Aug 21, 2014 18:09
Last Post: TWK
  OSX: Dialog for Scale tool no longer appears alz0998 3 357 Jun 18, 2014 14:44
Last Post: ofnuts
  How to use Quick-Mask for round cropping? ispiro 4 522 Mar 13, 2014 11:04
Last Post: ispiro

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS