mirror of https://github.com/GNOME/gimp.git
Fix #9874 SF plugin script-fu-set-cmap.scm
New API for GByte to gimp-image-set-colormap
This commit is contained in:
parent
7f3595285d
commit
109f43750c
|
@ -25,6 +25,8 @@
|
|||
(define (script-fu-make-cmap-array palette)
|
||||
(let* (
|
||||
(num-colors (car (gimp-palette-get-color-count palette)))
|
||||
; cons-array is not Scheme standard
|
||||
; but was in SIOD and is in script-fu-compat.init
|
||||
(cmap (cons-array (* num-colors 3) 'byte))
|
||||
(color 0)
|
||||
(i 0)
|
||||
|
@ -44,7 +46,6 @@
|
|||
|
||||
(define (script-fu-set-cmap img drawable palette)
|
||||
(gimp-image-set-colormap img
|
||||
(* (car (gimp-palette-get-color-count palette)) 3)
|
||||
(script-fu-make-cmap-array palette))
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue