Re: JPEG Support For Libcairo

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.lib.cairo
Organization Geek Central
Message-ID <[email protected]>
On Tue, 29 Dec 2015 09:57:25 +1030, Adrian Johnson wrote:

> +
> +   // set jpeg mime data
> +   fseek(infile, 0, SEEK_END);
> +   len = ftell(infile);
> +   fseek(infile, 0, SEEK_SET);
> +   data = malloc(len);
> +   fread(data, len, 1, infile);
> +   cairo_surface_set_mime_data(sfc, CAIRO_MIME_TYPE_JPEG, data, len,
> free, data);

No error checking!
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.