02-03-2019, 03:40 PM
Hello there. I have a problem that tortures me 2 days now.
I want to extend the colormap at indexed pictures by one color with script fu.
;get colormap length from header
(set! colormap_length (car (gimp-image-get-colormap image)))
;get colormap data from tail
(set! colormap (car (cdr (gimp-image-get-colormap image))))
;extend header
(set! colormap_length (+ colormap_length 3)) ;increaze by 3 bytes/1 color
;extend tail
;here, i want to make colormap:=colormap+"000000" thus extend the list
;set new colormap
(gimp-image-set-colormap image colormap_length colormap)
(Variables are defined ok)
I tried almost everythink while playing with let, set, list, cons car etc etc.
Thank you.
I want to extend the colormap at indexed pictures by one color with script fu.
;get colormap length from header
(set! colormap_length (car (gimp-image-get-colormap image)))
;get colormap data from tail
(set! colormap (car (cdr (gimp-image-get-colormap image))))
;extend header
(set! colormap_length (+ colormap_length 3)) ;increaze by 3 bytes/1 color
;extend tail
;here, i want to make colormap:=colormap+"000000" thus extend the list
;set new colormap
(gimp-image-set-colormap image colormap_length colormap)
(Variables are defined ok)
I tried almost everythink while playing with let, set, list, cons car etc etc.
Thank you.