(10-26-2022, 11:23 PM)BaconWizard17 Wrote:(10-26-2022, 11:00 PM)teapot Wrote:(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))))
That worked perfectly! Thank you for the help!
I noticed you used "let" instead of "let*". Both variations work for me, but is there a difference between the two?
Your'e welcome..
let* when the order of evaluation matters e.g. when one variable uses another one.
let when it doesn't matter.
http://computer-programming-forum.com/40...afb466.htm