[cairo] Pycairo: Access cairo_surface_set_mime_data through pycairo

Simon Sapin simon.sapin at exyr.org
Thu Dec 20 03:49:58 PST 2012


Le 07/08/2012 03:49, d74n5pohf9 at ipharzle.e4ward.com a écrit :
> On Fri, 2012-08-03 at 12:00 -0700, cairo-request at cairographics.org
>> The pdf files I'm generating with pycairo are rather large. Is it
>> possible to expose cairo_surface_set_mime_data through pycairo, so
>> the
>> jpeg data can be embedded instead of converted into png?
>
> Hi Manuel,
>
> The function should appear in the next version of pycairo. You could
> open a bug report if you want to make sure it is not forgotten, and
> submit a patch if you are really keen.

Hi,

Please find attached a patch (with tests and docs) for adding the 
.set_mime_data() and .get_mime_data() methods to cairo.Surface.

See also:
https://github.com/SimonSapin/py2cairo/commit/ebe487cabd40a3eac

Cheers,
-- 
Simon Sapin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mime_data.patch
Type: text/x-patch
Size: 9086 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20121220/801e3e2c/attachment.bin>


More information about the cairo mailing list