Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/build/pkgs/gdmodule/patches/_gdmodule.c.patch
8815 views
1
diff -ru src/_gdmodule.c c/_gdmodule.c
2
--- src/_gdmodule.c 2005-03-11 06:06:26.000000000 +0100
3
+++ c/_gdmodule.c 2012-05-06 00:59:07.453373313 +0200
4
@@ -346,12 +346,12 @@
5
return write_file(self, args, 'p');
6
}
7
8
-
9
+#ifdef HAVE_LIBJPEG
10
static PyObject *image_writejpeg(imageobject *self, PyObject *args)
11
{
12
return write_file(self, args, 'j');
13
}
14
-
15
+#endif
16
17
static PyObject *image_writegd(imageobject *self, PyObject *args)
18
{
19
@@ -1420,13 +1420,13 @@
20
"writePng(f)\n"
21
"write the image to f as a PNG, where f is either an open file object or a\n"
22
"file name."},
23
-
24
+#ifdef HAVE_LIBJPEG
25
{"writeJpeg", (PyCFunction)image_writejpeg, 1,
26
"writeJpeg(f,quality)\n"
27
"write the image to f as a JPEG, where f is either an open file object or a\n"
28
"file name. quality is an optional integer value giving the JPEG quality from\n"
29
"0 to 95%; leave out for default quality."},
30
-
31
+#endif
32
{"writeWbmp", (PyCFunction)image_writewbmp, 1,
33
"writeWbmp(f,fg)\n"
34
"write the image to f as a WBMP, where f is either an open file object or a\n"
35
36