Lines Matching refs:data
40 * @param img The source data for the image.
78 * @param[out] component_count The number of components in the data.
80 * @return The loaded image data in a canonical 4 channel format.
114 * @param[out] component_count The number of components in the data.
116 * @return The loaded image data in a canonical 4 channel format, or @c nullptr on error.
128 float* data = stbi_loadf(filename, &dim_x, &dim_y, nullptr, STBI_rgb_alpha);
129 if (data)
131 astcenc_image* img = astc_img_from_floatx4_array(data, dim_x, dim_y, y_flip);
132 stbi_image_free(data);
140 uint8_t* data = stbi_load(filename, &dim_x, &dim_y, nullptr, STBI_rgb_alpha);
141 if (data)
143 astcenc_image* img = astc_img_from_unorm8x4_array(data, dim_x, dim_y, y_flip);
144 stbi_image_free(data);
158 * @param img The source data for the image.
190 * @param img The source data for the image.
208 uint8_t* buf = reinterpret_cast<uint8_t*>(img->data[i]);
224 * @param img The source data for the image.
242 uint8_t* buf = reinterpret_cast<uint8_t*>(img->data[i]);
258 * @param img The source data for the image.
276 uint8_t* buf = reinterpret_cast<uint8_t*>(img->data[i]);
292 * @param img The source data for the image.
330 * Only uncompressed data supported
616 * @param[in,out] dataptr The data to convert.
623 uint8_t* data = reinterpret_cast<uint8_t*>(dataptr);
626 uint8_t d0 = data[0];
627 uint8_t d1 = data[1];
628 data[0] = d1;
629 data[1] = d0;
630 data += 2;
637 * @param[in,out] dataptr The data to convert.
644 uint8_t* data = reinterpret_cast<uint8_t*>(dataptr);
647 uint8_t d0 = data[0];
648 uint8_t d1 = data[1];
649 uint8_t d2 = data[2];
650 uint8_t d3 = data[3];
651 data[0] = d3;
652 data[1] = d2;
653 data[2] = d1;
654 data[3] = d0;
655 data += 4;
662 * @param v The data to convert.
674 After the header and the key/value data area, the actual image data follows.
675 Each image starts with a 4-byte "imageSize" value indicating the number of bytes of image data follow.
691 Byte data[format-specific-number-of-bytes]
887 uint32_t gl_type_size; // size of data elements to do endianness swap on (1=endian-neutral data)
930 * @param[out] component_count The number of components in the data.
932 * @return The loaded image data in a canonical 4 channel format, or @c nullptr on error.
1180 // ignore the key/value data
1232 // Transfer data from the surface to our own image data structure
1245 uint8_t* data8 = static_cast<uint8_t*>(astc_img->data[z]);
1251 uint16_t* data16 = static_cast<uint16_t*>(astc_img->data[z]);
1337 // Read the length of the data and endianess convert
1352 // Read the data
1353 unsigned char* data = new unsigned char[data_len];
1354 actual = fread(data, 1, data_len, f);
1357 printf("Failed to read mip 0 data from %s\n", filename);
1359 delete[] data;
1372 img.data = data;
1383 * @param img The image data to store.
1423 actual += fwrite(img.data, 1, img.data_len, wf);
1437 * @param img The source data for the image.
1491 // Collect image data to write
1516 uint8_t* data8 = static_cast<uint8_t*>(img->data[z]);
1578 uint16_t* data16 = static_cast<uint16_t*>(img->data[z]);
1665 Note that after the header, data are densely packed with no padding;
1675 flags bits are a combination of the following: 0x1 : Texture contains alpha data 0x2 : ---- (older files: texture contains alpha data, for Alpha-only texture) 0x4 : The fourcc field is valid,
1676 indicating a compressed or DX10 texture format 0x40 : texture contains uncompressed RGB data 0x200 : ---- (YUV in older files) 0x20000 : Texture contains Luminance data (can be combined with
1691 flag field is an OR or the following bits, that indicate fields containing valid data:
1755 * @param[out] component_count The number of components in the data.
1757 * @return The loaded image data in a canonical 4 channel format, or @c nullptr on error.
2007 // then transfer data from the surface to our own image-data-structure.
2020 uint8_t* data8 = static_cast<uint8_t*>(astc_img->data[z]);
2026 uint16_t* data16 = static_cast<uint16_t*>(astc_img->data[z]);
2044 * @param img The source data for the image.
2081 // * pixel data
2083 // Main header data
2101 // Pixel-format data
2111 // DX10 data
2119 // Collect image data to write
2145 uint8_t* data8 = static_cast<uint8_t*>(img->data[z]);
2208 uint16_t* data16 = static_cast<uint16_t*>(img->data[z]);
2510 print_error("ERROR: Image data size exceeded file size '%s'\n", filename);
2515 img.data = buffer;
2561 file.write(reinterpret_cast<char*>(img.data), img.data_len);