libnative-utilities/include/png/PNGChunkIHDR.hpp

62 lines
1.8 KiB
C++
Raw Permalink Normal View History

2024-08-15 18:40:30 +08:00
#ifndef PNGCHUNKIDHR_HPP
#define PNGCHUNKIDHR_HPP
#include "include/png/PNGChunk.hpp"
class PNGChunkIHDR : public PNGChunk{
private:
unsigned int imgHeight;
unsigned int imgWidth;
unsigned int imgColorType;
unsigned int imgBitDepth;
unsigned int imgCompressMethod;
unsigned int imgFilterMethod;
unsigned int imgInterlaceMethod;
public:
static const unsigned char IMG_COLORTYPE_GRAYSCALE;
static const unsigned char IMG_COLORTYPE_GRAYSCALE_CHANNEL;
static const unsigned char IMG_COLORTYPE_TRUECOLOR;
static const unsigned char IMG_COLORTYPE_TRUECOLOR_CHANNEL;
static const unsigned char IMG_COLORTYPE_INDEXEDCOLOR;
static const unsigned char IMG_COLORTYPE_INDEXEDCOLOR_CHANNEL;
static const unsigned char IMG_COLORTYPE_ALPHA_GRAYSCALE;
static const unsigned char IMG_COLORTYPE_ALPHA_GRAYSCALE_CHANNEL;
static const unsigned char IMG_COLORTYPE_ALPHA_TRUECOLOR;
static const unsigned char IMG_COLORTYPE_ALPHA_TRUECOLOR_CHANNEL;
static const unsigned char IMG_COMPRESS_METHOD_DEFAULT;
static const unsigned char IMG_SCAN_METHOD_SCANLINE;
static const unsigned char IMG_SCAN_METHOD_ADAM7;
PNGChunkIHDR(unsigned int chunkLength, unsigned int chunkType, const unsigned char* chunkData, unsigned int crc32);
unsigned int getImageHeight();
unsigned int getImageWidth();
unsigned int getImageColorType();
unsigned int getImageBitBepth();
unsigned int getImageCompressMethod();
unsigned int getImageFilterMethod();
unsigned int getImageInterlaceMethod();
unsigned int getCRC32();
unsigned int getColorChannelCount();
unsigned int getBitsPerPixel();
};
#endif // PNGCHUNKIDHR_HPP