Lines Matching full:it
11 including commercial applications, and to alter it and redistribute it
28 Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C.
81 /* NOTE: when realloc returns NULL, it leaves the original memory untouched */
100 /* inline is not available in C90, but use it when supported by the compiler */
107 /* restrict is not available in C90, but use it when supported by the compiler */
172 Often in case of an error a value is assigned to a variable and then it breaks
174 It makes the error handling code shorter and more readable.
186 /*Set error var to the error code, and return it.*/
192 /*Try the code, if it returns error, also return the error.*/
294 /*free string pointer and set it to NULL*/
383 /*write given buffer to the file, overwriting the file, it doesn't append to it.*/
467 …/*ensure incremented bp can be compared to bitsize without overflow even when it would be incremen… in LodePNGBitReader_init()
993 symbol, it'd give it the theoretical 0 bits but in practice zlib wants 1 bit*/ in lodepng_huffman_code_lengths()
1135 …/*see comments in deflateDynamic for explanation of the context and these variables, it is analogo… in getTreeInflateDynamic()
1144 …/*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already… in getTreeInflateDynamic()
1146 /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/ in getTreeInflateDynamic()
1148 /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/ in getTreeInflateDynamic()
1428 …/*the custom inflate is allowed to have its own error codes, however, we translate it to code 110*/ in inflatev()
1450 given array must be sorted (if no value is smaller, it returns the size of the given array)*/
1500 it's always going to be the zeros that dominate, so not important for PNG*/
1587 It uses a hash table technique to let it encode faster. When doing LZ77 encoding, a
1601 …unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/ in encodeLZ77()
1714 /*encode it as length/distance pair or literal value*/ in encodeLZ77()
1719 length of only 3 may be not worth it then*/ in encodeLZ77()
1744 …/*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next… in deflateNoCompression()
1822 … encoded data, represented with integers since there will also be length and distance codes in it*/ in deflateDynamic()
1859 /*This while loop never loops due to a break at the end, it is here to in deflateDynamic()
1860 allow breaking out of it to the cleanup phase on error conditions.*/ in deflateDynamic()
2129 …/*the custom deflate is allowed to have its own error codes, however, we translate it to code 111*/ in deflate()
2231 … /*the custom zlib is allowed to have its own error codes, however, we translate it to code 110*/ in zlib_decompress()
2296 /*the custom zlib is allowed to have its own error codes, however, we translate it to code 111*/ in zlib_compress()
2682 …/*if the palette is already allocated, it will have size 1024 so no reallocation needed in that ca… in lodepng_color_mode_alloc_palette()
2688 This is an error according to the PNG spec, but common PNG decoders make it black instead. in lodepng_color_mode_alloc_palette()
3097 …/*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for secon… in addColorBits()
3110 index for a color. It's like an octree, but because the alpha channel is used too, each
3151 Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist")
3605 this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the
3606 specification it looks like bKGD should ignore the alpha values of the palette since it can use
3703 /* mark things as done already if it would be impossible to have a more expensive case */ in lodepng_compute_color_stats()
3880 …ating for 8-bit and 65535 for opaque alpha channel). This function is expensive, do not call it for
3903 This is used if auto_convert is enabled (it is by default).
3959 … unsigned mask = (1u << mode_out->bitdepth) - 1u; /*stats always uses 16-bit, mask converts it*/ in auto_choose_color()
4023 /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/ in Adam7_getpassvalues()
4039 /*read the information from the header and store it in the LodePNGInfo. return value is error*/
4064 CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ in lodepng_inspect()
4443 /*even though it's not allowed by the standard, no error is thrown if in readChunk_tEXt()
4478 /*copy the object to change parameters in it*/ in readChunk_zTXt()
4526 /*copy the object to change parameters in it*/ in readChunk_iTXt()
4534 …it'd still fail with other error checks below if it's too short. This just gives a different error… in readChunk_iTXt()
4552 /*even though it's not allowed by the standard, no error is thrown if in readChunk_iTXt()
4671 /*copy the object to change parameters in it*/ in readChunk_iCCP()
4844 …/*palette transparency chunk (tRNS). Even though this one is an ancillary chunk , it is still comp… in decodeGeneric()
4845 … in without 'LODEPNG_COMPILE_ANCILLARY_CHUNKS' because it contains essential color information that in decodeGeneric()
4891 } else /*it's not an implemented chunk type, so ignore it: skip over the data*/ { in decodeGeneric()
5524 … /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ in filter()
5563 … /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ in filter()
5600 to simulate the true case where the tree is the same for the whole image. Sometimes it gives in filter()
5602 cases better compression. It does make this a bit less slow, so it's worth doing this.*/ in filter()
5605 images only, so disable it*/ in filter()
5616 … /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ in filter()
5623 …/*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/ in filter()
5798 It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19 in isGrayICCProfile()
5804 data), and requires using a gray color model if it is "GRAY". in isGrayICCProfile()
5836 state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/ in lodepng_encode()
5861 if the palette has only gray colors, so disallow it.*/ in lodepng_encode()
5906 or in case of auto_convert, it wasn't possible to find appropriate model*/ in lodepng_encode()
6036 …state->error = addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt tha… in lodepng_encode()
6071 /*instead of cleaning the vector up, give it to the output*/ in lodepng_encode()
6147 …case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decodin… in lodepng_error_text()
6167 case 26: return "FDICT encountered in zlib header while it's not used for PNG"; in lodepng_error_text()
6170 case 28: return "incorrect PNG signature, it's no PNG or corrupted"; in lodepng_error_text()
6184 case 42: return "tRNS chunk appeared while it was not allowed for this color type"; in lodepng_error_text()
6196 tree will have more leaves than symbols after generating it out of the in lodepng_error_text()
6209 …/*this would result in the inability of a deflated block to ever contain an end code. It must be a… in lodepng_error_text()
6216 …urn "while decoding, invalid compression method encountering in zTXt or iTXt chunk (it must be 0)"; in lodepng_error_text()
6248 case 103: return "invalid palette index in bKGD chunk. Maybe it came before PLTE chunk?"; in lodepng_error_text()
6252 …ase 107: return "color convert from palette mode requested without setting the palette data in it"; in lodepng_error_text()
6286 /*write given buffer to the file, overwriting the file, it doesn't append to it.*/