#pragma once

#include <string>
#include <sstream>

class PngInfo
{
public:
    enum class ColorType : unsigned char
    {
        GREYSCALE = 0,
        RGB = 2,
        PALETTE = 3,
        GREYSCALE_ALPHA = 4,
        RGB_ALPHA = 6
    };

    enum class CompressionMethod : unsigned char
    {
        DEFLATE = 0
    };

    enum class FilterMethod : unsigned char
    {
        ADAPTIVE = 0
    };

    enum class InterlaceMethod : unsigned char
    {
        NONE = 0,
        ADAM7 = 1
    };

    unsigned getNumChannels() const;

    std::string toString(ColorType colorType) const;

    std::string toString(CompressionMethod method) const;

    std::string toString(FilterMethod method) const;

    std::string toString(InterlaceMethod method) const;

    bool bitDepthIsValid(ColorType colorType, unsigned char bitDepth) const;

    bool compressionMethodIsValid(unsigned char method);

    bool filterMethodIsValid(unsigned char method);

    std::string toString() const;

    ColorType mColorType{ColorType::RGB};
    CompressionMethod mCompressionMethod{CompressionMethod::DEFLATE};
    FilterMethod mFilterMethod{FilterMethod::ADAPTIVE};
    InterlaceMethod mInterlaceMethod{InterlaceMethod::NONE};
};




