您好我正在尝试将一堆图层(drawables + mask)转换为2d列表,以便使用list-ref进行随机访问。我失败了,我不知道我哪里出错了。 cmyk-list包含垃圾。在创建列表之前,所有drawable都已使用此示例模板(gimp-invert magenta-layer-copy)进行了测试。您的帮助,评论赞赏。
(set! layerList (cadr (gimp-image-get-layers image)))
(set! number-of-layers (vector-length layerList))
(set! cyan-layer-copy (aref layerList (- number-of-layers 4)))
(set! cyan-mask-copy (car (gimp-layer-get-mask cyan-layer-copy)))
(set! magenta-layer-copy (aref layerList (- number-of-layers 3)))
(set! magenta-mask-copy (car (gimp-layer-get-mask magenta-layer-copy)))
(set! yellow-layer-copy (aref layerList (- number-of-layers 2)))
(set! yellow-mask-copy (car (gimp-layer-get-mask yellow-layer-copy)))
(set! alpha-layer-copy (aref layerList (- number-of-layers 1)))
(set! cmyk-list '((cyan-layer-copy cyan-mask-copy)
(magenta-layer-copy magenta-mask-copy)
(yellow-layer-copy yellow-mask-copy)
(alpha-layer-copy 0)))