Reworked ImageData:encode:

- It now returns a FileData containing the encoded ImageData.

- The first argument is now the format to encode to.

- The second argument is now the filename to write to, and is optional. No file will be written if a filename is not given.
This commit is contained in:
Alex Szpakowski
2015-07-04 22:30:09 -03:00
parent 3199482c3b
commit 2168d509b3
4 changed files with 36 additions and 28 deletions
+1 -2
View File
@@ -23,7 +23,6 @@
// LOVE
#include "FormatHandler.h"
#include "filesystem/File.h"
#include "image/ImageData.h"
// C++
@@ -46,7 +45,7 @@ public:
virtual ~ImageData();
// Implements image::ImageData.
virtual void encode(love::filesystem::File *f, ImageData::EncodedFormat format);
virtual love::filesystem::FileData *encode(EncodedFormat format, const char *filename);
private: