Clean up PNG and JPEG encoding properly

This commit is contained in:
win11
2024-11-15 16:42:58 +03:00
committed by Josh Tynjala
parent 1b6a884692
commit c0e1a1b4a4
2 changed files with 6 additions and 0 deletions

View File

@@ -487,6 +487,8 @@ namespace lime {
}
jpeg_destroy_compress (&cinfo);
return true;
}

View File

@@ -237,6 +237,8 @@ namespace lime {
if (!info_ptr) {
png_destroy_write_struct (&png_ptr, NULL);
return false;
}
@@ -310,6 +312,8 @@ namespace lime {
}
png_destroy_write_struct (&png_ptr, &info_ptr);
return true;
}