Further compression and png work.
This commit is contained in:
parent
318b481ccc
commit
9c8faa534b
34 changed files with 1164 additions and 203 deletions
|
@ -8,19 +8,31 @@
|
|||
|
||||
using Path = std::filesystem::path;
|
||||
|
||||
class BitStream;
|
||||
class File;
|
||||
|
||||
class PngWriter
|
||||
{
|
||||
public:
|
||||
PngWriter();
|
||||
~PngWriter();
|
||||
|
||||
static std::unique_ptr<PngWriter> Create();
|
||||
|
||||
void setPath(const Path& path);
|
||||
|
||||
void write(const std::unique_ptr<Image<unsigned char> >& image) const;
|
||||
void write(const std::unique_ptr<Image<unsigned char> >& image);
|
||||
|
||||
private:
|
||||
void writeSignature();
|
||||
void writeHeader();
|
||||
|
||||
|
||||
Path mPath;
|
||||
Image<unsigned char>* mWorkingImage{nullptr};
|
||||
std::unique_ptr<BitStream> mInStream;
|
||||
std::unique_ptr<BitStream> mOutStream;
|
||||
std::unique_ptr<File> mWorkingFile;
|
||||
};
|
||||
|
||||
using PngWriterPtr = std::unique_ptr<PngWriter>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue