]> git.lyx.org Git - features.git/commitdiff
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4749 .
authorPavel Sanda <sanda@lyx.org>
Mon, 7 Jul 2008 15:09:44 +0000 (15:09 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 7 Jul 2008 15:09:44 +0000 (15:09 +0000)
New versions of Imagemagick do not antialias ppm images used for
screen presentation of pictures.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25475 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/convertDefault.py

index 1806b2ecc534834616b4ba87996c6d3e84a3db45..54e4f213dc08c6b0fc0db357d960fbe2ddd6dcf3 100644 (file)
@@ -29,6 +29,11 @@ if sys.argv[1][:4] == 'pdf:':
     if not 'unrecognized' in output.lower():
         opts = defopt + ' ' + opts
 
+# for ppm target formats, we need to flatten image, as ppm has no support
+# for alpha channel, see bug 4749
+if sys.argv[2][:4] == 'ppm:':
+    opts = opts + ' -flatten'
+
 if os.system(r'convert %s "%s" "%s"' % (opts, sys.argv[1], sys.argv[2])) != 0:
     print >> sys.stderr, sys.argv[0], 'ERROR'
     print >> sys.stderr, 'Execution of "convert" failed.'