Lines Matching refs:buf
52 png_save_uint_32(png_bytep buf, png_uint_32 i)
54 buf[0] = (png_byte)((i >> 24) & 0xff);
55 buf[1] = (png_byte)((i >> 16) & 0xff);
56 buf[2] = (png_byte)((i >> 8) & 0xff);
57 buf[3] = (png_byte)(i & 0xff);
68 png_save_int_32(png_bytep buf, png_int_32 i)
70 buf[0] = (png_byte)((i >> 24) & 0xff);
71 buf[1] = (png_byte)((i >> 16) & 0xff);
72 buf[2] = (png_byte)((i >> 8) & 0xff);
73 buf[3] = (png_byte)(i & 0xff);
82 png_save_uint_16(png_bytep buf, unsigned int i)
84 buf[0] = (png_byte)((i >> 8) & 0xff);
85 buf[1] = (png_byte)(i & 0xff);
142 png_byte buf[8];
158 png_save_uint_32(buf, length);
159 png_memcpy(buf + 4, chunk_name, 4);
160 png_write_data(png_ptr, buf, (png_size_t)8);
206 png_byte buf[4];
218 png_save_uint_32(buf, png_ptr->crc);
220 png_write_data(png_ptr, buf, (png_size_t)4);
685 png_byte buf[13]; /* Buffer to store the IHDR info */
817 png_save_uint_32(buf, width);
818 png_save_uint_32(buf + 4, height);
819 buf[8] = (png_byte)bit_depth;
820 buf[9] = (png_byte)color_type;
821 buf[10] = (png_byte)compression_type;
822 buf[11] = (png_byte)filter_type;
823 buf[12] = (png_byte)interlace_type;
826 png_write_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
906 png_byte buf[3];
944 buf[0] = pal_ptr->red;
945 buf[1] = pal_ptr->green;
946 buf[2] = pal_ptr->blue;
947 png_write_chunk_data(png_ptr, buf, (png_size_t)3);
958 buf[0] = pal_ptr[i].red;
959 buf[1] = pal_ptr[i].green;
960 buf[2] = pal_ptr[i].blue;
961 png_write_chunk_data(png_ptr, buf, (png_size_t)3);
1074 png_byte buf[4];
1079 png_save_uint_32(buf, (png_uint_32)file_gamma);
1080 png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4);
1090 png_byte buf[1];
1098 buf[0]=(png_byte)srgb_intent;
1099 png_write_chunk(png_ptr, png_sRGB, buf, (png_size_t)1);
1280 png_byte buf[4];
1301 buf[0] = sbit->red;
1302 buf[1] = sbit->green;
1303 buf[2] = sbit->blue;
1315 buf[0] = sbit->gray;
1327 buf[size++] = sbit->alpha;
1330 png_write_chunk(png_ptr, png_sBIT, buf, size);
1343 png_byte buf[32];
1353 png_save_uint_32(buf, (png_uint_32)white_x);
1354 png_save_uint_32(buf + 4, (png_uint_32)white_y);
1356 png_save_uint_32(buf + 8, (png_uint_32)red_x);
1357 png_save_uint_32(buf + 12, (png_uint_32)red_y);
1359 png_save_uint_32(buf + 16, (png_uint_32)green_x);
1360 png_save_uint_32(buf + 20, (png_uint_32)green_y);
1362 png_save_uint_32(buf + 24, (png_uint_32)blue_x);
1363 png_save_uint_32(buf + 28, (png_uint_32)blue_y);
1365 png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32);
1377 png_byte buf[6];
1404 png_save_uint_16(buf, tran->gray);
1405 png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)2);
1411 png_save_uint_16(buf, tran->red);
1412 png_save_uint_16(buf + 2, tran->green);
1413 png_save_uint_16(buf + 4, tran->blue);
1415 if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
1417 if (buf[0] | buf[2] | buf[4])
1425 png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)6);
1441 png_byte buf[6];
1458 buf[0] = back->index;
1459 png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)1);
1464 png_save_uint_16(buf, back->red);
1465 png_save_uint_16(buf + 2, back->green);
1466 png_save_uint_16(buf + 4, back->blue);
1468 if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
1470 if (buf[0] | buf[2] | buf[4])
1479 png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)6);
1492 png_save_uint_16(buf, back->gray);
1493 png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)2);
1505 png_byte buf[3];
1522 png_save_uint_16(buf, hist[i]);
1523 png_write_chunk_data(png_ptr, buf, (png_size_t)2);
1712 png_byte buf;
1753 buf = (png_byte)compression;
1756 png_write_chunk_data(png_ptr, &buf, (png_size_t)1);
1868 png_byte buf[9];
1875 png_save_int_32(buf, x_offset);
1876 png_save_int_32(buf + 4, y_offset);
1877 buf[8] = (png_byte)unit_type;
1879 png_write_chunk(png_ptr, png_oFFs, buf, (png_size_t)9);
1892 png_byte buf[10];
1925 png_save_int_32(buf, X0);
1926 png_save_int_32(buf + 4, X1);
1927 buf[8] = (png_byte)type;
1928 buf[9] = (png_byte)nparams;
1929 png_write_chunk_data(png_ptr, buf, (png_size_t)10);
1952 png_byte buf[64];
1967 buf[0] = (png_byte)unit;
1968 png_memcpy(buf + 1, width, wlen + 1); /* Append the '\0' here */
1969 png_memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */
1972 png_write_chunk(png_ptr, png_sCAL, buf, total_len);
1984 png_byte buf[9];
1991 png_save_uint_32(buf, x_pixels_per_unit);
1992 png_save_uint_32(buf + 4, y_pixels_per_unit);
1993 buf[8] = (png_byte)unit_type;
1995 png_write_chunk(png_ptr, png_pHYs, buf, (png_size_t)9);
2007 png_byte buf[7];
2019 png_save_uint_16(buf, mod_time->year);
2020 buf[2] = mod_time->month;
2021 buf[3] = mod_time->day;
2022 buf[4] = mod_time->hour;
2023 buf[5] = mod_time->minute;
2024 buf[6] = mod_time->second;
2026 png_write_chunk(png_ptr, png_tIME, buf, (png_size_t)7);