Skip to content

Commit

Permalink
Initialize graphics context in png_export (guillaumechereau#361)
Browse files Browse the repository at this point in the history
* Initialize graphics context in png_export

* Signed declaration
  • Loading branch information
madd-games authored Mar 18, 2024
1 parent 746d06a commit e39b61b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/cla/individual/madd-games.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
UK, 2024-03-18

I hereby agree to the terms of the Goxel Individual Contributor License
Agreement v1.0.

I declare that I am authorized and able to make this agreement and sign this
declaration.

Signed,

Mariusz Pilipczuk [email protected] https://github.com/madd-games
4 changes: 4 additions & 0 deletions src/formats/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
// XXX: this function has to be rewritten.
static int png_export(const image_t *img, const char *path, int w, int h)
{
if (!goxel.graphics_initialized) {
goxel_create_graphics();
}

uint8_t *buf;
int bpp = img->export_transparent_background ? 4 : 3;
if (!path) return -1;
Expand Down

0 comments on commit e39b61b

Please sign in to comment.