Lines Matching refs:in
301 static char* alloc_string_sized(const char* in, size_t insize) { in alloc_string_sized() argument
304 lodepng_memcpy(out, in, insize); in alloc_string_sized()
311 static char* alloc_string(const char* in) { in alloc_string() argument
312 return alloc_string_sized(in, lodepng_strlen(in)); in alloc_string()
1388 const unsigned char* in, size_t insize, in lodepng_inflatev() argument
1392 unsigned error = LodePNGBitReader_init(&reader, in, insize); in lodepng_inflatev()
1413 const unsigned char* in, size_t insize, in lodepng_inflate() argument
1416 unsigned error = lodepng_inflatev(&v, in, insize, settings); in lodepng_inflate()
1422 static unsigned inflatev(ucvector* out, const unsigned char* in, size_t insize, in inflatev() argument
1425 unsigned error = settings->custom_inflate(&out->data, &out->size, in, insize, settings); in inflatev()
1435 return lodepng_inflatev(out, in, insize, settings); in inflatev()
1593 … const unsigned char* in, size_t inpos, size_t insize, unsigned windowsize, in encodeLZ77() argument
1623 hashval = getHash(in, insize, pos); in encodeLZ77()
1626 if(numzeros == 0) numzeros = countZeros(in, insize, pos); in encodeLZ77()
1627 else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; in encodeLZ77()
1640 …lastptr = &in[insize < pos + MAX_SUPPORTED_DEFLATE_LENGTH ? insize : pos + MAX_SUPPORTED_DEFLATE_L… in encodeLZ77()
1652 foreptr = &in[pos]; in encodeLZ77()
1653 backptr = &in[pos - current_offset]; in encodeLZ77()
1667 current_length = (unsigned)(foreptr - &in[pos]); in encodeLZ77()
1702 if(!uivector_push_back(out, in[pos - 1])) ERROR_BREAK(83 /*alloc fail*/); in encodeLZ77()
1716 if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); in encodeLZ77()
1720 if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); in encodeLZ77()
1726 hashval = getHash(in, insize, pos); in encodeLZ77()
1728 if(numzeros == 0) numzeros = countZeros(in, insize, pos); in encodeLZ77()
1729 else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; in encodeLZ77()
2073 static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in, size_t insize, in lodepng_deflatev() argument
2083 else if(settings->btype == 0) return deflateNoCompression(out, in, insize); in lodepng_deflatev()
2104 … if(settings->btype == 1) error = deflateFixed(&writer, &hash, in, start, end, settings, final); in lodepng_deflatev()
2105 …else if(settings->btype == 2) error = deflateDynamic(&writer, &hash, in, start, end, settings, fin… in lodepng_deflatev()
2115 const unsigned char* in, size_t insize, in lodepng_deflate() argument
2118 unsigned error = lodepng_deflatev(&v, in, insize, settings); in lodepng_deflate()
2125 const unsigned char* in, size_t insize, in deflate() argument
2128 unsigned error = settings->custom_deflate(out, outsize, in, insize, settings); in deflate()
2132 return lodepng_deflate(out, outsize, in, insize, settings); in deflate()
2174 const unsigned char* in, size_t insize, in lodepng_zlib_decompressv() argument
2181 if((in[0] * 256 + in[1]) % 31 != 0) { in lodepng_zlib_decompressv()
2186 CM = in[0] & 15; in lodepng_zlib_decompressv()
2187 CINFO = (in[0] >> 4) & 15; in lodepng_zlib_decompressv()
2189 FDICT = (in[1] >> 5) & 1; in lodepng_zlib_decompressv()
2202 error = inflatev(out, in + 2, insize - 2, settings); in lodepng_zlib_decompressv()
2206 unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]); in lodepng_zlib_decompressv()
2215 unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, in lodepng_zlib_decompress() argument
2218 unsigned error = lodepng_zlib_decompressv(&v, in, insize, settings); in lodepng_zlib_decompress()
2226 … const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { in zlib_decompress() argument
2229 error = settings->custom_zlib(out, outsize, in, insize, settings); in zlib_decompress()
2243 error = lodepng_zlib_decompressv(&v, in, insize, settings); in zlib_decompress()
2254 unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, in lodepng_zlib_compress() argument
2261 error = deflate(&deflatedata, &deflatesize, in, insize, settings); in lodepng_zlib_compress()
2272 unsigned ADLER32 = adler32(in, (unsigned)insize); in lodepng_zlib_compress()
2292 static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, in zlib_compress() argument
2295 unsigned error = settings->custom_zlib(out, outsize, in, insize, settings); in zlib_compress()
2299 return lodepng_zlib_compress(out, outsize, in, insize, settings); in zlib_compress()
2309 … const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { in zlib_decompress() argument
2312 return settings->custom_zlib(out, outsize, in, insize, settings); in zlib_decompress()
2316 static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, in zlib_compress() argument
2319 return settings->custom_zlib(out, outsize, in, insize, settings); in zlib_compress()
3095 static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) { in addColorBits() argument
3099 in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/ in addColorBits()
3100 in = in << (bits * (m - p)); in addColorBits()
3101 if(p == 0) out[index * bits / 8u] = in; in addColorBits()
3102 else out[index * bits / 8u] |= in; in addColorBits()
3259 const unsigned char* in, size_t i, in getPixelColorRGBA8() argument
3263 *r = *g = *b = in[i]; in getPixelColorRGBA8()
3267 *r = *g = *b = in[i * 2 + 0]; in getPixelColorRGBA8()
3268 if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; in getPixelColorRGBA8()
3273 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorRGBA8()
3280 *r = in[i * 3 + 0]; *g = in[i * 3 + 1]; *b = in[i * 3 + 2]; in getPixelColorRGBA8()
3284 *r = in[i * 6 + 0]; in getPixelColorRGBA8()
3285 *g = in[i * 6 + 2]; in getPixelColorRGBA8()
3286 *b = in[i * 6 + 4]; in getPixelColorRGBA8()
3287 if(mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r in getPixelColorRGBA8()
3288 && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g in getPixelColorRGBA8()
3289 && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; in getPixelColorRGBA8()
3294 if(mode->bitdepth == 8) index = in[i]; in getPixelColorRGBA8()
3297 index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorRGBA8()
3306 *r = *g = *b = in[i * 2 + 0]; in getPixelColorRGBA8()
3307 *a = in[i * 2 + 1]; in getPixelColorRGBA8()
3309 *r = *g = *b = in[i * 4 + 0]; in getPixelColorRGBA8()
3310 *a = in[i * 4 + 2]; in getPixelColorRGBA8()
3314 *r = in[i * 4 + 0]; in getPixelColorRGBA8()
3315 *g = in[i * 4 + 1]; in getPixelColorRGBA8()
3316 *b = in[i * 4 + 2]; in getPixelColorRGBA8()
3317 *a = in[i * 4 + 3]; in getPixelColorRGBA8()
3319 *r = in[i * 8 + 0]; in getPixelColorRGBA8()
3320 *g = in[i * 8 + 2]; in getPixelColorRGBA8()
3321 *b = in[i * 8 + 4]; in getPixelColorRGBA8()
3322 *a = in[i * 8 + 6]; in getPixelColorRGBA8()
3332 const unsigned char* LODEPNG_RESTRICT in, in getPixelColorsRGBA8() argument
3339 buffer[0] = buffer[1] = buffer[2] = in[i]; in getPixelColorsRGBA8()
3350 buffer[0] = buffer[1] = buffer[2] = in[i * 2]; in getPixelColorsRGBA8()
3351 … buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255; in getPixelColorsRGBA8()
3357 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGBA8()
3365 lodepng_memcpy(buffer, &in[i * 3], 3); in getPixelColorsRGBA8()
3376 buffer[0] = in[i * 6 + 0]; in getPixelColorsRGBA8()
3377 buffer[1] = in[i * 6 + 2]; in getPixelColorsRGBA8()
3378 buffer[2] = in[i * 6 + 4]; in getPixelColorsRGBA8()
3380 && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r in getPixelColorsRGBA8()
3381 && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g in getPixelColorsRGBA8()
3382 && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255; in getPixelColorsRGBA8()
3388 unsigned index = in[i]; in getPixelColorsRGBA8()
3395 unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGBA8()
3403 buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; in getPixelColorsRGBA8()
3404 buffer[3] = in[i * 2 + 1]; in getPixelColorsRGBA8()
3408 buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; in getPixelColorsRGBA8()
3409 buffer[3] = in[i * 4 + 2]; in getPixelColorsRGBA8()
3414 lodepng_memcpy(buffer, in, numpixels * 4); in getPixelColorsRGBA8()
3417 buffer[0] = in[i * 8 + 0]; in getPixelColorsRGBA8()
3418 buffer[1] = in[i * 8 + 2]; in getPixelColorsRGBA8()
3419 buffer[2] = in[i * 8 + 4]; in getPixelColorsRGBA8()
3420 buffer[3] = in[i * 8 + 6]; in getPixelColorsRGBA8()
3428 const unsigned char* LODEPNG_RESTRICT in, in getPixelColorsRGB8() argument
3435 buffer[0] = buffer[1] = buffer[2] = in[i]; in getPixelColorsRGB8()
3439 buffer[0] = buffer[1] = buffer[2] = in[i * 2]; in getPixelColorsRGB8()
3445 unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGB8()
3451 lodepng_memcpy(buffer, in, numpixels * 3); in getPixelColorsRGB8()
3454 buffer[0] = in[i * 6 + 0]; in getPixelColorsRGB8()
3455 buffer[1] = in[i * 6 + 2]; in getPixelColorsRGB8()
3456 buffer[2] = in[i * 6 + 4]; in getPixelColorsRGB8()
3462 unsigned index = in[i]; in getPixelColorsRGB8()
3469 unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); in getPixelColorsRGB8()
3477 buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; in getPixelColorsRGB8()
3481 buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; in getPixelColorsRGB8()
3487 lodepng_memcpy(buffer, &in[i * 4], 3); in getPixelColorsRGB8()
3491 buffer[0] = in[i * 8 + 0]; in getPixelColorsRGB8()
3492 buffer[1] = in[i * 8 + 2]; in getPixelColorsRGB8()
3493 buffer[2] = in[i * 8 + 4]; in getPixelColorsRGB8()
3502 const unsigned char* in, size_t i, const LodePNGColorMode* mode) { in getPixelColorRGBA16() argument
3504 *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1]; in getPixelColorRGBA16()
3505 if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; in getPixelColorRGBA16()
3508 *r = 256u * in[i * 6 + 0] + in[i * 6 + 1]; in getPixelColorRGBA16()
3509 *g = 256u * in[i * 6 + 2] + in[i * 6 + 3]; in getPixelColorRGBA16()
3510 *b = 256u * in[i * 6 + 4] + in[i * 6 + 5]; in getPixelColorRGBA16()
3512 && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r in getPixelColorRGBA16()
3513 && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g in getPixelColorRGBA16()
3514 && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; in getPixelColorRGBA16()
3517 *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1]; in getPixelColorRGBA16()
3518 *a = 256u * in[i * 4 + 2] + in[i * 4 + 3]; in getPixelColorRGBA16()
3520 *r = 256u * in[i * 8 + 0] + in[i * 8 + 1]; in getPixelColorRGBA16()
3521 *g = 256u * in[i * 8 + 2] + in[i * 8 + 3]; in getPixelColorRGBA16()
3522 *b = 256u * in[i * 8 + 4] + in[i * 8 + 5]; in getPixelColorRGBA16()
3523 *a = 256u * in[i * 8 + 6] + in[i * 8 + 7]; in getPixelColorRGBA16()
3527 unsigned lodepng_convert(unsigned char* out, const unsigned char* in, in lodepng_convert() argument
3541 lodepng_memcpy(out, in, numbytes); in lodepng_convert()
3560 lodepng_memcpy(out, in, numbytes); in lodepng_convert()
3577 getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); in lodepng_convert()
3581 getPixelColorsRGBA8(out, numpixels, in, mode_in); in lodepng_convert()
3583 getPixelColorsRGB8(out, numpixels, in, mode_in); in lodepng_convert()
3587 getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); in lodepng_convert()
3696 const unsigned char* in, unsigned w, unsigned h, in lodepng_compute_color_stats() argument
3740 getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); in lodepng_compute_color_stats()
3756 getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); in lodepng_compute_color_stats()
3786 getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); in lodepng_compute_color_stats()
3798 getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); in lodepng_compute_color_stats()
3856 getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); in lodepng_compute_color_stats()
4041 const unsigned char* in, size_t insize) { in lodepng_inspect() argument
4044 if(insize == 0 || in == 0) { in lodepng_inspect()
4056 if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 in lodepng_inspect()
4057 || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) { in lodepng_inspect()
4060 if(lodepng_chunk_length(in + 8) != 13) { in lodepng_inspect()
4063 if(!lodepng_chunk_type_equals(in + 8, "IHDR")) { in lodepng_inspect()
4068 width = lodepng_read32bitInt(&in[16]); in lodepng_inspect()
4069 height = lodepng_read32bitInt(&in[20]); in lodepng_inspect()
4073 info->color.bitdepth = in[24]; in lodepng_inspect()
4074 info->color.colortype = (LodePNGColorType)in[25]; in lodepng_inspect()
4075 info->compression_method = in[26]; in lodepng_inspect()
4076 info->filter_method = in[27]; in lodepng_inspect()
4077 info->interlace_method = in[28]; in lodepng_inspect()
4094 unsigned CRC = lodepng_read32bitInt(&in[29]); in lodepng_inspect()
4095 unsigned checksum = lodepng_crc32(&in[12], 17); in lodepng_inspect()
4201 static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsig… in unfilter() argument
4221 unsigned char filterType = in[inindex]; in unfilter()
4223 …CERROR_TRY_RETURN(unfilterScanline(&out[outindex], &in[inindex + 1], prevline, bytewidth, filterTy… in unfilter()
4242 static void Adam7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, … in Adam7_deinterlace() argument
4259 out[pixeloutstart + b] = in[pixelinstart + b]; in Adam7_deinterlace()
4274 unsigned char bit = readBitFromReversedStream(&ibp, in); in Adam7_deinterlace()
4282 static void removePaddingBits(unsigned char* out, const unsigned char* in, in removePaddingBits() argument
4299 unsigned char bit = readBitFromReversedStream(&ibp, in); in removePaddingBits()
4309 static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, in postProcessScanlines() argument
4323 CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); in postProcessScanlines()
4324 removePaddingBits(out, in, w * bpp, ((w * bpp + 7u) / 8u) * 8u, h); in postProcessScanlines()
4327 else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); in postProcessScanlines()
4335 …CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i],… in postProcessScanlines()
4341 removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, in postProcessScanlines()
4346 Adam7_deinterlace(out, in, w, h, bpp); in postProcessScanlines()
4708 const unsigned char* in, size_t insize) { in lodepng_inspect_chunk() argument
4709 const unsigned char* chunk = in + pos; in lodepng_inspect_chunk()
4719 if(data + chunkLength + 4 > in + insize) return 30; in lodepng_inspect_chunk()
4762 const unsigned char* in, size_t insize) { in decodeGeneric() argument
4782 …state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameter… in decodeGeneric()
4793 chunk = &in[33]; /*first byte of the first chunk after the header*/ in decodeGeneric()
4802 if((size_t)((chunk - in) + 12) > insize || chunk < in) { in decodeGeneric()
4815 if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in) { in decodeGeneric()
4911 if(!IEND) chunk = lodepng_chunk_next_const(chunk, in + insize); in decodeGeneric()
4956 const unsigned char* in, size_t insize) { in lodepng_decode() argument
4958 decodeGeneric(out, w, h, state, in, insize); in lodepng_decode()
4991 …igned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, in lodepng_decode_memory() argument
5003 error = lodepng_decode(out, w, h, &state, in, insize); in lodepng_decode_memory()
5008 unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, s… in lodepng_decode32() argument
5009 return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8); in lodepng_decode32()
5012 unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, s… in lodepng_decode24() argument
5013 return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8); in lodepng_decode24()
5447 static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, in filter() argument
5490 filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); in filter()
5491 prevline = &in[inindex]; in filter()
5509 filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); in filter()
5531 prevline = &in[y * linebytes]; in filter()
5556 filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); in filter()
5570 prevline = &in[y * linebytes]; in filter()
5585 filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); in filter()
5586 prevline = &in[inindex]; in filter()
5618 filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); in filter()
5629 prevline = &in[y * linebytes]; in filter()
5641 static void addPaddingBits(unsigned char* out, const unsigned char* in, in addPaddingBits() argument
5651 unsigned char bit = readBitFromReversedStream(&ibp, in); in addPaddingBits()
5671 static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, un… in Adam7_interlace() argument
5687 out[pixeloutstart + b] = in[pixelinstart + b]; in Adam7_interlace()
5702 unsigned char bit = readBitFromReversedStream(&ibp, in); in Adam7_interlace()
5712 static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const unsigned char* in, in preProcessScanlines() argument
5734 addPaddingBits(padded, in, ((w * bpp + 7u) / 8u) * 8u, w * bpp, h); in preProcessScanlines()
5740 error = filter(*out, in, w, h, &info_png->color, settings); in preProcessScanlines()
5760 Adam7_interlace(adam7, in, w, h, bpp); in preProcessScanlines()
6294 unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize, in decompress() argument
6298 unsigned error = zlib_decompress(&buffer, &buffersize, 0, in, insize, &settings); in decompress()
6306 unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, in decompress() argument
6308 return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings); in decompress()
6313 unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize, in compress() argument
6317 unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); in compress()
6325 unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, in compress() argument
6327 return compress(out, in.empty() ? 0 : &in[0], in.size(), settings); in compress()
6355 unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h, const unsigned char* in, in decode() argument
6358 unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); in decode()
6371 … const std::vector<unsigned char>& in, LodePNGColorType colortype, unsigned bitdepth) { in decode() argument
6372 return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); in decode()
6377 const unsigned char* in, size_t insize) { in decode() argument
6379 unsigned error = lodepng_decode(&buffer, &w, &h, &state, in, insize); in decode()
6390 const std::vector<unsigned char>& in) { in decode() argument
6391 return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size()); in decode()
6408 unsigned encode(std::vector<unsigned char>& out, const unsigned char* in, unsigned w, unsigned h, in encode() argument
6412 unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); in encode()
6421 const std::vector<unsigned char>& in, unsigned w, unsigned h, in encode() argument
6423 if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; in encode()
6424 return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); in encode()
6428 const unsigned char* in, unsigned w, unsigned h, in encode() argument
6432 unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state); in encode()
6441 const std::vector<unsigned char>& in, unsigned w, unsigned h, in encode() argument
6443 if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84; in encode()
6444 return encode(out, in.empty() ? 0 : &in[0], w, h, state); in encode()
6449 const unsigned char* in, unsigned w, unsigned h, in encode() argument
6452 unsigned error = encode(buffer, in, w, h, colortype, bitdepth); in encode()
6458 const std::vector<unsigned char>& in, unsigned w, unsigned h, in encode() argument
6460 if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; in encode()
6461 return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); in encode()