1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00
Commit Graph

111 Commits

Author SHA1 Message Date
Simon Sapin
0faaceb44f Have Image objects "render themselves" on a cairo Context. 2013-04-03 16:00:31 +02:00
Simon Sapin
e36006ea21 Introduce Image objects, with intrinsic width/height/ratio as attributes. 2013-04-03 13:34:14 +02:00
Simon Sapin
c854feece9 Fix #21: Check for 'data' URL scheme case-insensitively. 2013-03-28 13:33:28 +01:00
Simon Sapin
3a42860018 Move GDK-PixBuf code to cairocffi.pixbuf 2013-02-26 15:04:52 +01:00
Simon Sapin
06a9ad8c91 Unicode strings are fine with CFFI 0.5 2013-02-25 16:38:54 +01:00
Simon Sapin
4c4be709d5 Make GDK-PixBuf optional. 2013-02-25 16:34:42 +01:00
Simon Sapin
e2ef91dd99 Fix the GDK-PixBuf loader for images with an alpha channel. 2013-02-25 16:30:39 +01:00
Simon Sapin
9ccd37e088 Don’t bother making CairoSVG optional. 2013-02-25 16:26:39 +01:00
Simon Sapin
f33e9e8039 Have a better error message when CairoSVG uses pycairo instead of craicffi. 2013-02-25 14:48:56 +01:00
Simon Sapin
4f9f486ef1 cairocffi accepts byte strings for set_mime_data() now. 2013-01-01 16:55:48 +01:00
Simon Sapin
a1109346df Update for cairocffi changes. 2012-12-30 11:08:55 +01:00
Simon Sapin
124a28cb15 Convert pixbuf images to cairo with Gdk if available. 2012-12-29 23:02:50 +01:00
Simon Sapin
4eb59f04ec Update setup.py and tox.ini 2012-12-29 15:27:45 +01:00
Simon Sapin
294be548b0 All tests passsing with cffi!! 2012-12-29 14:55:59 +01:00
Simon Sapin
5baee96712 Use pixbuf through cffi. 2012-12-29 11:58:52 +01:00
Simon Sapin
c70b00b5b8 More WIP: cairocffi and pango cffi. 2012-12-29 01:36:06 +01:00
Simon Sapin
d2040ac77a WIP: use Pango and cairo through cffi.
Use cairocffi
Ditch pycairo, PyGTK and PyGobject-introspection.
2012-12-28 23:17:04 +01:00
Simon Sapin
f243dbcca3 Embed JPEG-encoded images in PDF. Fix #6
If an image is in JPEG format, embed it as-is in the PDF output.
This often results in smaller PDF file size.

(The image is still decoded however,
so there is no rendering speed improvement.)
2012-12-20 20:12:52 +01:00
Simon Sapin
f12deb8fc6 Work around a segfault on Python 3.2.
Something bad happend when de-allocating a module-level BytesIO()
and dummy PDFSurface.
2012-12-12 16:02:41 +01:00
Simon Sapin
4f8deadc47 Work around a bug in old pycairo versions.
See
http://cgit.freedesktop.org/py2cairo/commit/?id=cab2c1295499f57247854e8635b77ca716fa9730
2012-12-12 09:25:28 +01:00
Simon Sapin
f5bd8cf8ff Defer warnings when PixBuf is not available.
Previously, a missing PixBuf caused a warning at import-time.
Now the exception is saved and re-raised when an image needs
to be loaded: there is no warning if PixBuf is not used at all.
2012-10-07 10:07:21 +02:00
Simon Sapin
f8457ba3a5 Move save_pixels_to_png() to the test_draw module.
This function is only used for tests.
2012-10-07 09:49:07 +02:00
Simon Sapin
a564473882 Avoid re-using Pattern objects for images. 2012-09-26 16:59:40 +02:00
Simon Sapin
03d8817690 Cache failures to fetch/load images. 2012-09-26 14:44:43 +02:00
Simon Sapin
5f86288635 Make GDK-PixBuf truly optional. 2012-09-25 17:56:02 +02:00
Simon Sapin
f8f38f0d35 Compat with early pycairo versions. 2012-09-25 16:37:50 +02:00
Simon Sapin
c2a88cfafc Fix saving of PNG images for failed tests. 2012-08-03 17:19:18 +02:00
Simon Sapin
ba8a55d5c0 Add support for outlines. 2012-08-03 16:22:32 +02:00
Simon Sapin
d1971b6e63 Remove unused imports. 2012-08-03 13:32:42 +02:00
Simon Sapin
feece3d3c7 Always close pixbufs. 2012-07-31 18:10:44 +02:00
Simon Sapin
cb659911d8 Add a specific error message for 0-byte images. 2012-07-31 15:08:01 +02:00
Simon Sapin
eca3e872a3 Fix the PyGTK version of gdkpixbuf_loader() 2012-07-29 18:23:53 +02:00
Simon Sapin
f522eac201 Use the same get_pixbuf() for both PyGTK and introspection. 2012-07-29 18:21:33 +02:00
Simon Sapin
1efd026ad0 Warn if gdk-pixbuf istoo old for introspection. 2012-07-29 18:13:33 +02:00
Simon Sapin
f46c334fa0 Remove the Pystacia dependency in tox.ini 2012-07-29 16:55:05 +02:00
Simon Sapin
abf256a810 Merge branch 'master' into pixbuf 2012-07-29 16:53:08 +02:00
Simon Sapin
62016d2587 Apparently UnixInputStream doesn’t work well on sockets... 2012-07-28 22:26:58 +02:00
Simon Sapin
b3c059bc08 Switch to gdk-pixbuf for raster images instead of Pystacia. 2012-07-28 22:11:28 +02:00
Simon Sapin
fbfbdac032 Faster loading of non-PNG images. 2012-07-26 12:32:08 +02:00
Simon Sapin
4a6fff4384 Make mime_type optional in custom URL fetchers 2012-07-18 14:34:43 +02:00
Simon Sapin
2768dea548 Add `url_fetcher` to the public API 2012-07-13 12:24:55 +02:00
Simon Sapin
78461b81f1 Test the Navigator 2012-06-23 04:58:14 +02:00
Simon Sapin
a8efed1bf1 Do not crash on SVG images without an intrinsic size. 2012-06-04 09:02:47 +02:00
Simon Sapin
a394ab5762 Work around cairo to make sure SVG image stay vectors. 2012-05-29 19:11:10 +02:00
Simon Sapin
d694a98350 Rename the utils module to 'urls' 2012-05-23 15:13:57 +02:00
Simon Sapin
b6ea3821b8 Remove unused imports 2012-05-22 16:34:41 +02:00
Simon Sapin
dcacf9eed0 Switch the licence to BSD and rewrite module docstrings/headers 2012-03-21 23:26:58 +01:00
Simon Sapin
26de362b99 Add proper attribution in AUTHORS 2012-03-21 18:40:38 +01:00
Simon Sapin
9875f76995 Hello 2012 2012-03-21 18:40:38 +01:00
Simon Sapin
f46e01fddd Simplify error handling in images.
Catch any non-sytem exception and consider that as an invalid image.

This may hide bugs, maintaining a growing list of invalid-image
exceptions was no fun either. The exception’s repr() is logged as usual.
2012-03-21 14:34:27 +01:00
Simon Sapin
476732b81c Support images in <embed> or <object> 2012-02-29 17:38:30 +01:00
Simon Sapin
7167c3e637 Be more defensive. 2012-02-27 16:48:27 +01:00
Simon Sapin
7ad1083e88 Rename weasyprint.logging to avoid conflicts the stdlib module. 2012-02-23 19:31:15 +01:00
Guillaume Ayoub
a479fb67a0 Typo fix 2012-02-23 13:26:45 +01:00
Guillaume Ayoub
c5836405e9 Merge branch 'master' of github.com:Kozea/WeasyPrint 2012-02-23 13:19:21 +01:00
Guillaume Ayoub
b62e2712e0 Import the pystacia exception from the util module 2012-02-23 13:18:51 +01:00
Simon Sapin
af4aeb9376 Use pystacia instead of pypng in tests. 2012-02-22 14:13:14 +01:00
Simon Sapin
f5f9fc729c Switch to pystacia instead of PIL for raster images 2012-02-21 14:34:07 +01:00
Simon Sapin
a412924e92 Fix the test suite on pytest
(Do not swallow all exceptions!)
2012-02-21 12:59:06 +01:00
Simon Sapin
ff135aa285 Python 3 compat. All tests pass with the same code base! 2012-02-17 22:48:20 +01:00
Simon Sapin
cf52aa3aaf Move the whole 'weasy' package to 'weasyprint' 2012-02-14 12:49:33 +01:00