Clean up some warnings.
This commit is contained in:
parent
a19567508e
commit
dba6a91ec1
25 changed files with 453 additions and 431 deletions
|
@ -1,21 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "PngHeader.h"
|
||||
#include "Image.h"
|
||||
#include "DeflateElements.h"
|
||||
#include "PlatformImageWriter.h"
|
||||
#include "IImageWriter.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
|
||||
using Path = std::filesystem::path;
|
||||
|
||||
class BitStream;
|
||||
class BufferBitStream;
|
||||
class File;
|
||||
|
||||
class PngWriter
|
||||
class PngWriter : public IImageWriter
|
||||
{
|
||||
public:
|
||||
PngWriter();
|
||||
|
@ -23,40 +14,10 @@ public:
|
|||
|
||||
static std::unique_ptr<PngWriter> Create();
|
||||
|
||||
void setCompressionMethod(Deflate::CompressionMethod method);
|
||||
|
||||
void setPath(const Path& path);
|
||||
|
||||
void setPngInfo(const PngInfo& info);
|
||||
|
||||
void write(const std::unique_ptr<Image>& image);
|
||||
void write(Image* image);
|
||||
void write(const Path& path, Image* image) override;
|
||||
|
||||
private:
|
||||
void writePlatform(Image* image);
|
||||
|
||||
void writeSignature();
|
||||
void writeHeader();
|
||||
|
||||
void writeDataChunks(const BufferBitStream& buffer);
|
||||
|
||||
void writeEndChunk();
|
||||
|
||||
//void writeIDatChunk();
|
||||
|
||||
Path mPath;
|
||||
Image* mWorkingImage{nullptr};
|
||||
std::unique_ptr<BitStream> mInStream;
|
||||
std::unique_ptr<BitStream> mOutStream;
|
||||
std::unique_ptr<File> mWorkingFile;
|
||||
|
||||
unsigned mPngInfoUserSet{false};
|
||||
PngInfo mPngInfo;
|
||||
PngHeader mPngHeader;
|
||||
|
||||
Deflate::CompressionMethod mCompressionMethod{Deflate::CompressionMethod::DYNAMIC_HUFFMAN};
|
||||
|
||||
std::unique_ptr<PlatformImageWriter> mPlatformWriter;
|
||||
std::unique_ptr<IImageWriter> mWriterImpl;
|
||||
};
|
||||
|
||||
using PngWriterPtr = std::unique_ptr<PngWriter>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue