Reputation:
I am using images for graphics in cairo, I see that cairo_image_surface_new_from_png()
does not accept a FILE *
, so that is weird for me.
If I want to load assets for game graphics, what cairo function should I use? Is there any way to give cairo a tmpfile instead of a filename?
This filename stuff is really confusing to me because I dont give it a full file path. Can somebody please help me?
Upvotes: 0
Views: 461
Reputation: 545588
The function you’re looking for is cairo_image_surface_create_from_png
, it takes a filename as its argument.
Upvotes: 1