[cairo] Is posible create a png surface from a png buffer read from a zip file?

KiwiLib KiwiLib kiwilib4941 at gmail.com
Sat Nov 7 14:03:55 PST 2015


thanks for your
​s​
answer
​s​
. The Png_data already contains png data. I 'm
looking for a
​simple ​
function
​ ​
like
​:​


sf:=cairo_image_surface_create_from_png_buffer(PNG_data);​

​I managed to load the buffer​ with my own code. Something like this.

dim as integer bytes
dim f as file
dim PNG_data as byte ptr

PNG_data = allocate(100000)

open "mypng.png", #f
read #f, PNG_data,bytes
sf:=cairo_image_surface_create_from_png_buffer(PNG_data,bytes)
close #f
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20151107/8a1987cf/attachment.html>


More information about the cairo mailing list