blob: 17c1b6e6c9cc729ae77e251f9255bb93e1caddbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
(define (img-recode
srcfile
destfile
fmt
ckey)
(let*
(
(image (car (file-img-load RUN-NONINTERACTIVE srcfile srcfile)))
(drawable (car (gimp-image-get-active-layer image)))
)
(file-img-save RUN-NONINTERACTIVE image drawable destfile destfile fmt ckey)
)
)
(img-recode "samples/rgb.img" "samples/recoded-rgb565.img" "RGB565" "no")
(img-recode "samples/rgb.img" "samples/recoded-rgba.img" "RGBA" "0x0F0")
(gimp-quit 0)
|