##// END OF EJS Templates
use alphachannel for aliased png latex
Ben Greiner -
Show More
@@ -161,9 +161,26 b" def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0):"
161
161
162 resolution = round(150*scale)
162 resolution = round(150*scale)
163 subprocess.check_call(
163 subprocess.check_call(
164 ["dvipng", "-T", "tight", "-D", str(resolution), "-z", "9",
164 [
165 "-bg", "transparent", "-o", outfile, dvifile, "-fg", color],
165 "dvipng",
166 cwd=workdir, stdout=devnull, stderr=devnull)
166 "-T",
167 "tight",
168 "-D",
169 str(resolution),
170 "-z",
171 "9",
172 "-bg",
173 "Transparent",
174 "-o",
175 outfile,
176 dvifile,
177 "-fg",
178 color,
179 ],
180 cwd=workdir,
181 stdout=devnull,
182 stderr=devnull,
183 )
167
184
168 with outfile.open("rb") as f:
185 with outfile.open("rb") as f:
169 return f.read()
186 return f.read()
@@ -62,7 +62,6 b' if resource is not None and hasattr(resource, "getrusage"):'
62 Similar to clock(), but return a tuple of user/system times."""
62 Similar to clock(), but return a tuple of user/system times."""
63 return resource.getrusage(resource.RUSAGE_SELF)[:2]
63 return resource.getrusage(resource.RUSAGE_SELF)[:2]
64
64
65
66 else:
65 else:
67 # There is no distinction of user/system time under windows, so we just use
66 # There is no distinction of user/system time under windows, so we just use
68 # time.perff_counter() for everything...
67 # time.perff_counter() for everything...
General Comments 0
You need to be logged in to leave comments. Login now