Lines Matching refs:key

2910 static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t …  in lodepng_add_text_sized()  argument
2920 info->text_keys[info->text_num - 1] = alloc_string(key); in lodepng_add_text_sized()
2927 unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) { in lodepng_add_text() argument
2928 return lodepng_add_text_sized(info, key, str, lodepng_strlen(str)); in lodepng_add_text()
2977 static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag, in lodepng_add_itext_sized() argument
2993 info->itext_keys[info->itext_num - 1] = alloc_string(key); in lodepng_add_itext_sized()
3001 unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, in lodepng_add_itext() argument
3003 return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str)); in lodepng_add_itext()
3665 stats->key = 0; in lodepng_color_stats_init()
3767 if(a != 65535 && (a != 0 || (stats->key && !matchkey))) { in lodepng_compute_color_stats()
3769 stats->key = 0; in lodepng_compute_color_stats()
3771 } else if(a == 0 && !stats->alpha && !stats->key) { in lodepng_compute_color_stats()
3772 stats->key = 1; in lodepng_compute_color_stats()
3776 } else if(a == 65535 && stats->key && matchkey) { in lodepng_compute_color_stats()
3779 stats->key = 0; in lodepng_compute_color_stats()
3786 if(stats->key && !stats->alpha) { in lodepng_compute_color_stats()
3792 stats->key = 0; in lodepng_compute_color_stats()
3817 if(a != 255 && (a != 0 || (stats->key && !matchkey))) { in lodepng_compute_color_stats()
3819 stats->key = 0; in lodepng_compute_color_stats()
3822 } else if(a == 0 && !stats->alpha && !stats->key) { in lodepng_compute_color_stats()
3823 stats->key = 1; in lodepng_compute_color_stats()
3827 } else if(a == 255 && stats->key && matchkey) { in lodepng_compute_color_stats()
3830 stats->key = 0; in lodepng_compute_color_stats()
3856 if(stats->key && !stats->alpha) { in lodepng_compute_color_stats()
3862 stats->key = 0; in lodepng_compute_color_stats()
3917 unsigned key = stats->key; in auto_choose_color() local
3922 if(key && numpixels <= 16) { in auto_choose_color()
3924 key = 0; in auto_choose_color()
3960 if(key) { in auto_choose_color()
4438 char *key = 0, *str = 0; in readChunk_tEXt() local
4449 key = (char*)lodepng_malloc(length + 1); in readChunk_tEXt()
4450 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_tEXt()
4452 lodepng_memcpy(key, data, length); in readChunk_tEXt()
4453 key[length] = 0; in readChunk_tEXt()
4464 error = lodepng_add_text(info, key, str); in readChunk_tEXt()
4469 lodepng_free(key); in readChunk_tEXt()
4484 char *key = 0; in readChunk_zTXt() local
4493 key = (char*)lodepng_malloc(length + 1); in readChunk_zTXt()
4494 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_zTXt()
4496 lodepng_memcpy(key, data, length); in readChunk_zTXt()
4497 key[length] = 0; in readChunk_zTXt()
4512 error = lodepng_add_text_sized(info, key, (char*)str, size); in readChunk_zTXt()
4516 lodepng_free(key); in readChunk_zTXt()
4532 char *key = 0, *langtag = 0, *transkey = 0; in readChunk_iTXt() local
4544 key = (char*)lodepng_malloc(length + 1); in readChunk_iTXt()
4545 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_iTXt()
4547 lodepng_memcpy(key, data, length); in readChunk_iTXt()
4548 key[length] = 0; in readChunk_iTXt()
4593 if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)str, size); in readChunk_iTXt()
4596 error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)(data + begin), length); in readChunk_iTXt()
4602 lodepng_free(key); in readChunk_iTXt()