Skip to content

Commit

Permalink
Clean up PNG and JPEG encoding properly
Browse files Browse the repository at this point in the history
  • Loading branch information
barisyild authored and joshtynjala committed Nov 19, 2024
1 parent 1b6a884 commit c0e1a1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions project/src/graphics/format/JPEG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ namespace lime {

}

jpeg_destroy_compress (&cinfo);

return true;

}
Expand Down
4 changes: 4 additions & 0 deletions project/src/graphics/format/PNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ namespace lime {

if (!info_ptr) {

png_destroy_write_struct (&png_ptr, NULL);

return false;

}
Expand Down Expand Up @@ -310,6 +312,8 @@ namespace lime {

}

png_destroy_write_struct (&png_ptr, &info_ptr);

return true;

}
Expand Down

0 comments on commit c0e1a1b

Please sign in to comment.