Post Reply 

call functions with image parameter

Jun 14, 2011, 14:54
Post: #1
call functions with image parameter
Hello, im new to this script-fu console thingy so please bear with me.
I need to crop a bunch of images down to 100x80 pixels so I wanted to at least try to speed things up by using the console. Browsing through the available functions I came across this: gimp-image-crop.
I figured I could simply type (gimp-image-crop "thumb.jpg" 100 80 0 0) but get the following output: Error: Invalid type for argument 1 to gimp-image-crop
I figure I need to define a new image with the proper image type but I don't know how, I was hoping I would have to familiarize myself with the scripts syntax too much to use this function.
Any help greatly appreciated
Find all posts by this user
Quote this message in a reply
Jun 14, 2011, 15:30 (This post was last modified: Jun 14, 2011 15:31 by ofnuts.)
Post: #2
RE: call functions with image parameter
If you need to crop (or rescale) a bunch of images, it will be a lot faster to look at ImageMagick (in particular the "convert" command). The ImageMagick tools can perform all kind of surgery on images of all kinds of formats, very quickly, from scripts.

Otherwise, the "image" parameter used in "gimp-image-crop" is something you would get as the return value of a "gimp-file-load" among other things.

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
Jun 15, 2011, 09:43
Post: #3
RE: call functions with image parameter
(Jun 14, 2011 15:30)ofnuts Wrote:  If you need to crop (or rescale) a bunch of images, it will be a lot faster to look at ImageMagick (in particular the "convert" command). The ImageMagick tools can perform all kind of surgery on images of all kinds of formats, very quickly, from scripts.

Otherwise, the "image" parameter used in "gimp-image-crop" is something you would get as the return value of a "gimp-file-load" among other things.

ImageMagick is wonderful thanks for the tip
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Any plugin for open multiple image in paint.net shinprog 1 330 Oct 31, 2017 11:38
Last Post: paynekj
  Scale image to specific size MattRothschild 1 220 Sep 15, 2017 11:13
Last Post: ythgilb
  Dividing and printing a large image RayArdia 1 156 Aug 9, 2017 07:22
Last Post: ythgilb
  Late binding / COM for opening an image into GIMP? i73 2 202 Aug 4, 2017 17:39
Last Post: i73
  PDB call to Image/Canvas size... ? Shadowes 3 433 Sep 1, 2014 22:31
Last Post: Shadowes

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS