summaryrefslogtreecommitdiffstats
path: root/gimp/scripts/gimp-convert-to-jpeg.scm
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2008-02-28 16:44:05 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2008-02-28 16:44:05 +0000
commit87016891f0a0485ac9b3673081511cdda855c6af (patch)
tree479eead2750fae096abe8e20a501cc0cfcf323e3 /gimp/scripts/gimp-convert-to-jpeg.scm
parent55504ae54122b6f9eaf0a3c0dd7d71a63af852e3 (diff)
downloadtheme-87016891f0a0485ac9b3673081511cdda855c6af.tar
theme-87016891f0a0485ac9b3673081511cdda855c6af.tar.gz
theme-87016891f0a0485ac9b3673081511cdda855c6af.tar.bz2
theme-87016891f0a0485ac9b3673081511cdda855c6af.tar.xz
theme-87016891f0a0485ac9b3673081511cdda855c6af.zip
Ship backgrounds as jpeg
Diffstat (limited to 'gimp/scripts/gimp-convert-to-jpeg.scm')
-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)
+ )
+
+ )
+)