25 ImageSpec config, spec;
26 config.attribute(
"oiio:UnassociatedAlpha", 1);
36 if (spec.nchannels == 4 && spec.format == TypeDesc::UINT16) {
48 const int file_channels = ibuf->
planes >> 3;
49 const TypeDesc data_format = is_16bit ? TypeDesc::UINT16 : TypeDesc::UINT8;
54 if (is_16bit && file_channels == 4) {
55 file_spec.attribute(
"oiio:UnassociatedAlpha", 0);
58 file_spec.attribute(
"oiio:UnassociatedAlpha", 1);
62 file_spec.attribute(
"compression",
"zip");
65 file_spec.attribute(
"compression",
"lzw");
68 file_spec.attribute(
"compression",
"packbits");
71 file_spec.attribute(
"compression",
"none");
@ COLOR_ROLE_DEFAULT_BYTE
Contains defines and structs used throughout the imbuf module.
#define TIF_COMPRESS_PACKBITS
#define TIF_COMPRESS_NONE
#define TIF_COMPRESS_DEFLATE
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
bool imb_oiio_write(const WriteContext &ctx, const char *filepath, const ImageSpec &file_spec)
WriteContext imb_create_write_context(const char *file_format, ImBuf *ibuf, int flags, bool prefer_float)
ImBuf * imb_oiio_read(const ReadContext &ctx, const ImageSpec &config, char colorspace[IM_MAX_SPACE], ImageSpec &r_newspec)
bool imb_oiio_check(const uchar *mem, size_t mem_size, const char *file_format)
ImageSpec imb_create_write_spec(const WriteContext &ctx, int file_channels, TypeDesc data_format)
ImBufFloatBuffer float_buffer
ImbFormatOptions foptions