10-26-2022, 11:00 PM
(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))))