Lines Matching refs:key

2908 static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t …  in lodepng_add_text_sized()  argument
2918 info->text_keys[info->text_num - 1] = alloc_string(key); in lodepng_add_text_sized()
2925 unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) { in lodepng_add_text() argument
2926 return lodepng_add_text_sized(info, key, str, lodepng_strlen(str)); in lodepng_add_text()
2975 static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag, in lodepng_add_itext_sized() argument
2991 info->itext_keys[info->itext_num - 1] = alloc_string(key); in lodepng_add_itext_sized()
2999 unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, in lodepng_add_itext() argument
3001 return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str)); in lodepng_add_itext()
3663 stats->key = 0; in lodepng_color_stats_init()
3765 if(a != 65535 && (a != 0 || (stats->key && !matchkey))) { in lodepng_compute_color_stats()
3767 stats->key = 0; in lodepng_compute_color_stats()
3769 } else if(a == 0 && !stats->alpha && !stats->key) { in lodepng_compute_color_stats()
3770 stats->key = 1; in lodepng_compute_color_stats()
3774 } else if(a == 65535 && stats->key && matchkey) { in lodepng_compute_color_stats()
3777 stats->key = 0; in lodepng_compute_color_stats()
3784 if(stats->key && !stats->alpha) { in lodepng_compute_color_stats()
3790 stats->key = 0; in lodepng_compute_color_stats()
3815 if(a != 255 && (a != 0 || (stats->key && !matchkey))) { in lodepng_compute_color_stats()
3817 stats->key = 0; in lodepng_compute_color_stats()
3820 } else if(a == 0 && !stats->alpha && !stats->key) { in lodepng_compute_color_stats()
3821 stats->key = 1; in lodepng_compute_color_stats()
3825 } else if(a == 255 && stats->key && matchkey) { in lodepng_compute_color_stats()
3828 stats->key = 0; in lodepng_compute_color_stats()
3854 if(stats->key && !stats->alpha) { in lodepng_compute_color_stats()
3860 stats->key = 0; in lodepng_compute_color_stats()
3915 unsigned key = stats->key; in auto_choose_color() local
3920 if(key && numpixels <= 16) { in auto_choose_color()
3922 key = 0; in auto_choose_color()
3958 if(key) { in auto_choose_color()
4436 char *key = 0, *str = 0; in readChunk_tEXt() local
4447 key = (char*)lodepng_malloc(length + 1); in readChunk_tEXt()
4448 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_tEXt()
4450 lodepng_memcpy(key, data, length); in readChunk_tEXt()
4451 key[length] = 0; in readChunk_tEXt()
4462 error = lodepng_add_text(info, key, str); in readChunk_tEXt()
4467 lodepng_free(key); in readChunk_tEXt()
4482 char *key = 0; in readChunk_zTXt() local
4491 key = (char*)lodepng_malloc(length + 1); in readChunk_zTXt()
4492 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_zTXt()
4494 lodepng_memcpy(key, data, length); in readChunk_zTXt()
4495 key[length] = 0; in readChunk_zTXt()
4510 error = lodepng_add_text_sized(info, key, (char*)str, size); in readChunk_zTXt()
4514 lodepng_free(key); in readChunk_zTXt()
4530 char *key = 0, *langtag = 0, *transkey = 0; in readChunk_iTXt() local
4542 key = (char*)lodepng_malloc(length + 1); in readChunk_iTXt()
4543 if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ in readChunk_iTXt()
4545 lodepng_memcpy(key, data, length); in readChunk_iTXt()
4546 key[length] = 0; in readChunk_iTXt()
4591 if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)str, size); in readChunk_iTXt()
4594 error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)(data + begin), length); in readChunk_iTXt()
4600 lodepng_free(key); in readChunk_iTXt()