aboutsummaryrefslogtreecommitdiff
path: root/img-fu
diff options
context:
space:
mode:
authorIgor Pashev <pashev@truth.pearl.pomorsu.ru>2009-10-28 14:14:58 +0300
committerIgor Pashev <pashev@truth.pearl.pomorsu.ru>2009-10-28 14:14:58 +0300
commit629cb019b8641c1278309bb3aa53463c4a4ac66f (patch)
tree3d705d349f47312da5605c4041054f7ae877c449 /img-fu
downloadgimp-plugin-img-629cb019b8641c1278309bb3aa53463c4a4ac66f.tar.gz
Public release
Diffstat (limited to 'img-fu')
-rw-r--r--img-fu21
1 files changed, 21 insertions, 0 deletions
diff --git a/img-fu b/img-fu
new file mode 100644
index 0000000..17c1b6e
--- /dev/null
+++ b/img-fu
@@ -0,0 +1,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)
+