Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resize all layers in script-fu
#8
(10-26-2022, 09:11 PM)BaconWizard17 Wrote: it seems that it doesn't like how I'm assigning the "num_layers" and "layer_ids" variables. That makes me assume my syntax is incorrect there. I haven't been able to find anything that uses gimp-image-get-layers, so I can't find how I'm supposed to actually get the values.

You are using cdr to get the layer ids, use cadr. Here's my go:

Code:
 ; Testing resize layers to image size
  (let ((num-layers (car (gimp-image-get-layers image)))
       (layer-ids (cadr (gimp-image-get-layers image)))
       (i 0))
    (while (< i num-layers)
      (gimp-layer-resize-to-image-size (vector-ref layer-ids i))
      (set! i (+ i 1))))
Reply


Messages In This Thread
Resize all layers in script-fu - by BaconWizard17 - 10-23-2022, 04:08 PM
RE: Resize all layers in script-fu - by Ofnuts - 10-23-2022, 07:17 PM
RE: Resize all layers in script-fu - by teapot - 10-26-2022, 11:00 PM
RE: Resize all layers in script-fu - by teapot - 10-26-2022, 11:46 PM

Forum Jump: