MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / addChunk_IHDR

Function addChunk_IHDR

src/lodepng.cpp:4902–4921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4900}
4901
4902static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
4903 LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method)
4904{
4905 unsigned error = 0;
4906 ucvector header;
4907 ucvector_init(&header);
4908
4909 lodepng_add32bitInt(&header, w); /*width*/
4910 lodepng_add32bitInt(&header, h); /*height*/
4911 ucvector_push_back(&header, (unsigned char)bitdepth); /*bit depth*/
4912 ucvector_push_back(&header, (unsigned char)colortype); /*color type*/
4913 ucvector_push_back(&header, 0); /*compression method*/
4914 ucvector_push_back(&header, 0); /*filter method*/
4915 ucvector_push_back(&header, interlace_method); /*interlace method*/
4916
4917 error = addChunk(out, "IHDR", header.data, header.size);
4918 ucvector_cleanup(&header);
4919
4920 return error;
4921}
4922
4923static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info)
4924{

Callers 1

lodepng_encodeFunction · 0.85

Calls 5

ucvector_initFunction · 0.85
lodepng_add32bitIntFunction · 0.85
ucvector_push_backFunction · 0.85
addChunkFunction · 0.85
ucvector_cleanupFunction · 0.85

Tested by

no test coverage detected