Lines Matching +full:- +full:y

4  * Copyright 2002-2010 Guillaume Cottenceau.
31 #define ERR_FILE_NOT_FOUND -1
32 #define ERR_PNG -2
98 int x, y, i_buf = 0; in lv_test_assert_img_eq() local
99 for(y = 0; y < p.height; y++) { in lv_test_assert_img_eq()
100 png_byte * row = p.row_pointers[y]; in lv_test_assert_img_eq()
126 fn_ref_no_ext[strlen(fn_ref_no_ext) - 4] = '\0'; in lv_test_assert_img_eq()
162 p->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); in read_png_file()
164 if(!p->png_ptr) { in read_png_file()
169 p->info_ptr = png_create_info_struct(p->png_ptr); in read_png_file()
170 if(!p->info_ptr) { in read_png_file()
174 if(setjmp(png_jmpbuf(p->png_ptr))) { in read_png_file()
178 png_init_io(p->png_ptr, fp); in read_png_file()
179 png_set_sig_bytes(p->png_ptr, 8); in read_png_file()
181 png_read_info(p->png_ptr, p->info_ptr); in read_png_file()
183 p->width = png_get_image_width(p->png_ptr, p->info_ptr); in read_png_file()
184 p->height = png_get_image_height(p->png_ptr, p->info_ptr); in read_png_file()
185 p->color_type = png_get_color_type(p->png_ptr, p->info_ptr); in read_png_file()
186 p->bit_depth = png_get_bit_depth(p->png_ptr, p->info_ptr); in read_png_file()
188 p->number_of_passes = png_set_interlace_handling(p->png_ptr); in read_png_file()
189 png_read_update_info(p->png_ptr, p->info_ptr); in read_png_file()
192 if(setjmp(png_jmpbuf(p->png_ptr))) { in read_png_file()
196 p->row_pointers = (png_bytep *) malloc(sizeof(png_bytep) * p->height); in read_png_file()
198 int y; in read_png_file() local
199 for(y = 0; y < p->height; y++) in read_png_file()
200 p->row_pointers[y] = (png_byte *) malloc(png_get_rowbytes(p->png_ptr, p->info_ptr)); in read_png_file()
202 png_read_image(p->png_ptr, p->row_pointers); in read_png_file()
221 return -1; in write_png_file()
229 return -1; in write_png_file()
235 return -1; in write_png_file()
240 return -1; in write_png_file()
248 return -1; in write_png_file()
261 return -1; in write_png_file()
266 for(uint32_t y = 0; y < height; y++) { in write_png_file() local
267 row_pointers[y] = malloc(3 * width); in write_png_file()
268 uint8_t * line = raw_img8 + y * width * 4; in write_png_file()
270 row_pointers[y][x * 3 + 0] = line[x * 4 + 2]; in write_png_file()
271 row_pointers[y][x * 3 + 1] = line[x * 4 + 1]; in write_png_file()
272 row_pointers[y][x * 3 + 2] = line[x * 4 + 0]; in write_png_file()
281 return -1; in write_png_file()
286 for(uint32_t y = 0; y < height; y++) free(row_pointers[y]); in write_png_file() local
298 int y; in png_release() local
299 for(y = 0; y < p->height; y++) free(p->row_pointers[y]); in png_release()
301 free(p->row_pointers); in png_release()
303 png_destroy_read_struct(&p->png_ptr, &p->info_ptr, NULL); in png_release()