Non compressing png writer is ok.
This commit is contained in:
parent
33369b1775
commit
e4f9393ee7
18 changed files with 196 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue