#pragma once //Return Codes enum { CELL_PNGDEC_ERROR_HEADER = 0x80611201, CELL_PNGDEC_ERROR_STREAM_FORMAT = 0x80611202, CELL_PNGDEC_ERROR_ARG = 0x80611203, CELL_PNGDEC_ERROR_SEQ = 0x80611204, CELL_PNGDEC_ERROR_BUSY = 0x80611205, CELL_PNGDEC_ERROR_FATAL = 0x80611206, CELL_PNGDEC_ERROR_OPEN_FILE = 0x80611207, CELL_PNGDEC_ERROR_SPU_UNSUPPORT = 0x80611208, CELL_PNGDEC_ERROR_SPU_ERROR = 0x80611209, CELL_PNGDEC_ERROR_CB_PARAM = 0x8061120a, }; enum CellPngDecColorSpace { CELL_PNGDEC_GRAYSCALE = 1, CELL_PNGDEC_RGB = 2, CELL_PNGDEC_PALETTE = 4, CELL_PNGDEC_GRAYSCALE_ALPHA = 9, CELL_PNGDEC_RGBA = 10, CELL_PNGDEC_ARGB = 20, }; enum CellPngDecDecodeStatus { CELL_PNGDEC_DEC_STATUS_FINISH = 0, //Decoding finished CELL_PNGDEC_DEC_STATUS_STOP = 1, //Decoding halted }; enum CellPngDecStreamSrcSel { CELL_PNGDEC_FILE = 0, CELL_PNGDEC_BUFFER = 1, }; struct CellPngDecDataOutInfo { be_t chunkInformation; be_t numText; be_t numUnknownChunk; be_t status; }; struct CellPngDecDataCtrlParam { be_t outputBytesPerLine; }; struct CellPngDecInfo { be_t imageWidth; be_t imageHeight; be_t numComponents; be_t colorSpace; // CellPngDecColorSpace be_t bitDepth; be_t interlaceMethod; // CellPngDecInterlaceMode be_t chunkInformation; }; struct CellPngDecSrc { be_t srcSelect; // CellPngDecStreamSrcSel be_t fileName; // const char* be_t fileOffset; // int64_t be_t fileSize; be_t streamPtr; be_t streamSize; be_t spuThreadEnable; // CellPngDecSpuThreadEna }; struct CellPngDecInParam { be_t commandPtr; be_t outputMode; // CellPngDecOutputMode be_t outputColorSpace; // CellPngDecColorSpace be_t outputBitDepth; be_t outputPackFlag; // CellPngDecPackFlag be_t outputAlphaSelect; // CellPngDecAlphaSelect be_t outputColorAlpha; }; struct CellPngDecOutParam { be_t outputWidthByte; be_t outputWidth; be_t outputHeight; be_t outputComponents; be_t outputBitDepth; be_t outputMode; // CellPngDecOutputMode be_t outputColorSpace; // CellPngDecColorSpace be_t useMemorySpace; }; struct CellPngDecSubHandle //Custom struct { u32 fd; u64 fileSize; CellPngDecInfo info; CellPngDecOutParam outParam; CellPngDecSrc src; };