• Home
  • Raw
  • Download

Lines Matching refs:info_ptr

30 png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)  in png_write_info_before_PLTE()  argument
34 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE()
49 png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, in png_write_info_before_PLTE()
50 info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, in png_write_info_before_PLTE()
51 info_ptr->filter_type, in png_write_info_before_PLTE()
53 info_ptr->interlace_type); in png_write_info_before_PLTE()
61 if (info_ptr->valid & PNG_INFO_gAMA) in png_write_info_before_PLTE()
64 png_write_gAMA(png_ptr, info_ptr->gamma); in png_write_info_before_PLTE()
67 png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma); in png_write_info_before_PLTE()
73 if (info_ptr->valid & PNG_INFO_sRGB) in png_write_info_before_PLTE()
74 png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); in png_write_info_before_PLTE()
77 if (info_ptr->valid & PNG_INFO_iCCP) in png_write_info_before_PLTE()
78 png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, in png_write_info_before_PLTE()
79 info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); in png_write_info_before_PLTE()
82 if (info_ptr->valid & PNG_INFO_sBIT) in png_write_info_before_PLTE()
83 png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); in png_write_info_before_PLTE()
86 if (info_ptr->valid & PNG_INFO_cHRM) in png_write_info_before_PLTE()
90 info_ptr->x_white, info_ptr->y_white, in png_write_info_before_PLTE()
91 info_ptr->x_red, info_ptr->y_red, in png_write_info_before_PLTE()
92 info_ptr->x_green, info_ptr->y_green, in png_write_info_before_PLTE()
93 info_ptr->x_blue, info_ptr->y_blue); in png_write_info_before_PLTE()
97 info_ptr->int_x_white, info_ptr->int_y_white, in png_write_info_before_PLTE()
98 info_ptr->int_x_red, info_ptr->int_y_red, in png_write_info_before_PLTE()
99 info_ptr->int_x_green, info_ptr->int_y_green, in png_write_info_before_PLTE()
100 info_ptr->int_x_blue, info_ptr->int_y_blue); in png_write_info_before_PLTE()
106 if (info_ptr->unknown_chunks_num) in png_write_info_before_PLTE()
112 for (up = info_ptr->unknown_chunks; in png_write_info_before_PLTE()
113 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; in png_write_info_before_PLTE()
135 png_write_info(png_structp png_ptr, png_infop info_ptr) in png_write_info() argument
143 if (png_ptr == NULL || info_ptr == NULL) in png_write_info()
146 png_write_info_before_PLTE(png_ptr, info_ptr); in png_write_info()
148 if (info_ptr->valid & PNG_INFO_PLTE) in png_write_info()
149 png_write_PLTE(png_ptr, info_ptr->palette, in png_write_info()
150 (png_uint_32)info_ptr->num_palette); in png_write_info()
151 else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) in png_write_info()
155 if (info_ptr->valid & PNG_INFO_tRNS) in png_write_info()
160 info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) in png_write_info()
163 for (j = 0; j<(int)info_ptr->num_trans; j++) in png_write_info()
164 info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]); in png_write_info()
167 png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values), in png_write_info()
168 info_ptr->num_trans, info_ptr->color_type); in png_write_info()
172 if (info_ptr->valid & PNG_INFO_bKGD) in png_write_info()
173 png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); in png_write_info()
176 if (info_ptr->valid & PNG_INFO_hIST) in png_write_info()
177 png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); in png_write_info()
180 if (info_ptr->valid & PNG_INFO_oFFs) in png_write_info()
181 png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, in png_write_info()
182 info_ptr->offset_unit_type); in png_write_info()
185 if (info_ptr->valid & PNG_INFO_pCAL) in png_write_info()
186 png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, in png_write_info()
187 info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, in png_write_info()
188 info_ptr->pcal_units, info_ptr->pcal_params); in png_write_info()
192 if (info_ptr->valid & PNG_INFO_sCAL) in png_write_info()
195 png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, in png_write_info()
196 info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); in png_write_info()
199 png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, in png_write_info()
200 info_ptr->scal_s_width, info_ptr->scal_s_height); in png_write_info()
210 if (info_ptr->valid & PNG_INFO_pHYs) in png_write_info()
211 png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, in png_write_info()
212 info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); in png_write_info()
216 if (info_ptr->valid & PNG_INFO_tIME) in png_write_info()
218 png_write_tIME(png_ptr, &(info_ptr->mod_time)); in png_write_info()
224 if (info_ptr->valid & PNG_INFO_sPLT) in png_write_info()
225 for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) in png_write_info()
226 png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); in png_write_info()
231 for (i = 0; i < info_ptr->num_text; i++) in png_write_info()
234 info_ptr->text[i].compression); in png_write_info()
236 if (info_ptr->text[i].compression > 0) in png_write_info()
241 info_ptr->text[i].compression, in png_write_info()
242 info_ptr->text[i].key, in png_write_info()
243 info_ptr->text[i].lang, in png_write_info()
244 info_ptr->text[i].lang_key, in png_write_info()
245 info_ptr->text[i].text); in png_write_info()
250 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; in png_write_info()
253 else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) in png_write_info()
257 png_write_zTXt(png_ptr, info_ptr->text[i].key, in png_write_info()
258 info_ptr->text[i].text, 0, in png_write_info()
259 info_ptr->text[i].compression); in png_write_info()
264 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; in png_write_info()
266 else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) in png_write_info()
270 png_write_tEXt(png_ptr, info_ptr->text[i].key, in png_write_info()
271 info_ptr->text[i].text, in png_write_info()
274 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; in png_write_info()
284 if (info_ptr->unknown_chunks_num) in png_write_info()
290 for (up = info_ptr->unknown_chunks; in png_write_info()
291 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; in png_write_info()
315 png_write_end(png_structp png_ptr, png_infop info_ptr) in png_write_end() argument
325 if (info_ptr != NULL) in png_write_end()
332 if ((info_ptr->valid & PNG_INFO_tIME) && in png_write_end()
334 png_write_tIME(png_ptr, &(info_ptr->mod_time)); in png_write_end()
338 for (i = 0; i < info_ptr->num_text; i++) in png_write_end()
341 info_ptr->text[i].compression); in png_write_end()
343 if (info_ptr->text[i].compression > 0) in png_write_end()
348 info_ptr->text[i].compression, in png_write_end()
349 info_ptr->text[i].key, in png_write_end()
350 info_ptr->text[i].lang, in png_write_end()
351 info_ptr->text[i].lang_key, in png_write_end()
352 info_ptr->text[i].text); in png_write_end()
357 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; in png_write_end()
359 else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) in png_write_end()
363 png_write_zTXt(png_ptr, info_ptr->text[i].key, in png_write_end()
364 info_ptr->text[i].text, 0, in png_write_end()
365 info_ptr->text[i].compression); in png_write_end()
370 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; in png_write_end()
372 else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) in png_write_end()
376 png_write_tEXt(png_ptr, info_ptr->text[i].key, in png_write_end()
377 info_ptr->text[i].text, 0); in png_write_end()
383 info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; in png_write_end()
388 if (info_ptr->unknown_chunks_num) in png_write_end()
394 for (up = info_ptr->unknown_chunks; in png_write_end()
395 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; in png_write_end()
1043 png_infop info_ptr = NULL; in png_destroy_write_struct() local
1069 info_ptr = *info_ptr_ptr; in png_destroy_write_struct()
1071 if (info_ptr != NULL) in png_destroy_write_struct()
1075 png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); in png_destroy_write_struct()
1088 png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, in png_destroy_write_struct()
1091 png_destroy_struct((png_voidp)info_ptr); in png_destroy_write_struct()
1510 png_write_png(png_structp png_ptr, png_infop info_ptr, in png_write_png() argument
1513 if (png_ptr == NULL || info_ptr == NULL) in png_write_png()
1517 png_write_info(png_ptr, info_ptr); in png_write_png()
1532 && (info_ptr->valid & PNG_INFO_sBIT)) in png_write_png()
1533 png_set_shift(png_ptr, &info_ptr->sig_bit); in png_write_png()
1583 if (info_ptr->valid & PNG_INFO_IDAT) in png_write_png()
1584 png_write_image(png_ptr, info_ptr->row_pointers); in png_write_png()
1587 png_write_end(png_ptr, info_ptr); in png_write_png()