Non compressing png writer is ok.

This commit is contained in:
James Grogan 2022-11-25 09:43:14 +00:00
parent 33369b1775
commit e4f9393ee7
18 changed files with 196 additions and 23 deletions

View file

@ -19,6 +19,25 @@ std::string PngInfo::toString(ColorType colorType) const
}
}
unsigned PngInfo::getNumChannels() const
{
switch(mColorType)
{
case ColorType::GREYSCALE:
return 1;
case ColorType::RGB:
return 3;
case ColorType::PALETTE:
return 1;
case ColorType::GREYSCALE_ALPHA:
return 2;
case ColorType::RGB_ALPHA:
return 4;
default:
return 1;
}
}
std::string PngInfo::toString(CompressionMethod method) const
{
switch(method)