#include "PngWriter.h"

#ifdef _WIN32
#include "Win32WicImageWriter.h"
#else
#include "BasicPngWriter.h"
#endif

PngWriter::PngWriter()
    : IImageWriter(ImgFormat::PNG)
{
#ifdef _WIN32
    mWriterImpl = std::make_unique<Win32WicImageWriter>(mFormat);
#else
    mWriterImpl = std::make_unique<BasicPngWriter>();
#endif
}

PngWriter::~PngWriter()
{

}

std::unique_ptr<PngWriter> PngWriter::Create()
{
    return std::make_unique<PngWriter>();
}

void PngWriter::write(const Path& path, Image* image)
{
    mWriterImpl->write(path, image);
}
