summaryrefslogtreecommitdiffstats
path: root/gimp/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'gimp/scripts')
-rw-r--r--gimp/scripts/gimp-convert-to-jpeg.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/gimp/scripts/gimp-convert-to-jpeg.scm b/gimp/scripts/gimp-convert-to-jpeg.scm
new file mode 100644
index 0000000..f184b88
--- /dev/null
+++ b/gimp/scripts/gimp-convert-to-jpeg.scm
@@ -0,0 +1,17 @@
+
+(define (gimp-convert-to-jpeg quality infile outfile)
+ (let* ((image (car (file-png-load 1 infile infile)))
+ )
+
+ (gimp-image-flatten image)
+
+ (let* ((drawable (car (gimp-image-get-active-drawable image))))
+ (if (= (car (gimp-drawable-is-rgb drawable)) FALSE)
+ (gimp-image-convert-rgb image))
+
+ (file-jpeg-save 1 image drawable outfile outfile quality 0 1 0 "Mandriva Theme" 2 1 0 2 )
+ (gimp-image-delete image)
+ )
+
+ )
+)