[cairo] cairo_image_surface_create_for_png() fclose()
Owen Taylor
otaylor at redhat.com
Mon Apr 11 09:18:34 PDT 2005
On Sat, 2005-04-09 at 15:24 +0800, Steve Chaplin wrote:
> Why does cairo_image_surface_create_for_png() take a FILE *
> and then call fclose()?
>
> I think it should either do
> 1) both fopen and fclose (and take a filename argument)
> or
> 2) neither fopen nor fclose
>
> I created a Python wrapper which takes a fileObject and
> passes the underlying FILE * to cairo_image_surface_create_for_png().
> The call to fclose causes a segmentation fault since Python
> is expecting to do the fclose itself. Removing the fclose fixes the
> problem.
Agreed. Filed in bugzilla at:
https://bugs.freedesktop.org/show_bug.cgi?id=2972
> Also, I agree with the earlier message which said
> cairo_image_surface_create_for_pn()
> should return the surface only, and use a 'getter' function to read
> the width and height.
https://bugs.freedesktop.org/show_bug.cgi?id=2973
Regards,
Owen
[ BTW, in general, it's really good if you can file any API
problems you think exist in bugzilla, since there is a very
good chance that things sent to the list will be remembered
the day after we release 1.0 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050411/c6e24b8c/attachment.pgp
More information about the cairo
mailing list