Api was too confusing for people.

This commit is contained in:
Matthew Parlane
2013-11-17 10:34:34 +13:00
parent 2025f00f88
commit 71d70d896f
7 changed files with 16 additions and 8 deletions

View File

@ -24,8 +24,6 @@ TextureToPng
Inputs:
data : This is an array of RGBA with 8 bits per channel. 4 bytes for each pixel.
data is a newly allocated memory and must have delete[] run on it before returning.
row_stride: Determines the amount of bytes per row of pixels.
*/
bool TextureToPng(u8* data, int row_stride, const char* filename, int width, int height, bool saveAlpha)
@ -109,8 +107,5 @@ finalise:
if (info_ptr != NULL) png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
if (png_ptr != NULL) png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
// Our duty to delete the inputted data.
delete[] data;
return success;
}