title: Resize image by percentage on both x and y on command line with Gimp
body: <p>AFAIK, it should be possible.  I know that <code>convert</code> of ImageMagick makes this task trivial, but I cannot use ImageMagick, therefore I am leaning towards Gimp (on Windows).</p>
  
  <p>I have tried with this Guile script:</p>
  
  <pre><code>(define (resize-image filename new-filename scale)
    (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
           (drawable (car (gimp-image-get-active-layer image)))
           (width (gimp-image-width image))
           (height (gimp-image-height image)))
      (gimp-image-scale-full image (* width scale) (* height scale) INTERPOLATION-CUBIC)
      (gimp-file-save RUN-NONINTERACTIVE image drawable new-filename new-filename)
      (gimp-image-delete image)))
  </code></pre>
  
  <p>that I run with:</p>
  
  <pre><code>gimp-2.8 -i -b "(resize-image \"image.jpg\" \"image-small.jpg\" 0.5)" -b "(gimp-quit 0)"
  </code></pre>
  
  <p>but I get this error:</p>
  
  <pre><code>(gimp-2.8:22244): LibGimpBase-WARNING **: gimp-2.8: gimp_wire_read(): error
  
  (gimp-2.8:22244): LibGimpBase-WARNING **: gimp-2.8: gimp_wire_read(): error
  batch command experienced an execution error:
  Error: ( : 1) *: argument 1 must be: number
  </code></pre>
  
  <p>My solution has been inspired by this post:</p>
  
  <p><a href="http://warunapw.blogspot.it/2010/01/batch-resize-images-in-gimp.html" rel="nofollow noreferrer">http://warunapw.blogspot.it/2010/01/batch-resize-images-in-gimp.html</a></p>