0

您好,我正在尝试将一堆图层(drawables + mask)转换为二维列表,以便使用 list-ref 进行随机访问。我失败了,我看不出哪里出错了。cmyk 列表包含垃圾。在创建列表之前,所有可绘制对象都已使用此示例模板 (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)))                             
4

0 回答 0