Clean up Image class.
This commit is contained in:
parent
4bb87de0e6
commit
0d3674faac
30 changed files with 330 additions and 135 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "PngHeader.h"
|
||||
#include "Image.h"
|
||||
#include "DeflateElements.h"
|
||||
#include "PlatformImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -28,8 +29,8 @@ public:
|
|||
|
||||
void setPngInfo(const PngInfo& info);
|
||||
|
||||
void write(const std::unique_ptr<Image<unsigned char> >& image);
|
||||
void write(Image<unsigned char>* image);
|
||||
void write(const std::unique_ptr<Image>& image);
|
||||
void write(Image* image);
|
||||
|
||||
private:
|
||||
void writeSignature();
|
||||
|
@ -42,7 +43,7 @@ private:
|
|||
//void writeIDatChunk();
|
||||
|
||||
Path mPath;
|
||||
Image<unsigned char>* mWorkingImage{nullptr};
|
||||
Image* mWorkingImage{nullptr};
|
||||
std::unique_ptr<BitStream> mInStream;
|
||||
std::unique_ptr<BitStream> mOutStream;
|
||||
std::unique_ptr<File> mWorkingFile;
|
||||
|
@ -52,6 +53,8 @@ private:
|
|||
PngHeader mPngHeader;
|
||||
|
||||
Deflate::CompressionMethod mCompressionMethod{Deflate::CompressionMethod::DYNAMIC_HUFFMAN};
|
||||
|
||||
std::unique_ptr<PlatformImageWriter> mPlatformWriter;
|
||||
};
|
||||
|
||||
using PngWriterPtr = std::unique_ptr<PngWriter>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue