25 ImageSpec config, spec;
26 config.attribute(
"oiio:UnassociatedAlpha", 1);
35 if (spec.format == TypeDesc::UINT16) {
46 const int file_channels = ibuf->
planes >> 3;
47 const TypeDesc data_format = is_16bit ? TypeDesc::UINT16 : TypeDesc::UINT8;
56 file_spec.attribute(
"oiio:UnassociatedAlpha", 0);
59 file_spec.attribute(
"oiio:UnassociatedAlpha", 1);
63 compression = compression < 0 ? 0 : (compression > 9 ? 9 : compression);
64 file_spec.attribute(
"png:compressionLevel", compression);
@ COLOR_ROLE_DEFAULT_BYTE
Contains defines and structs used throughout the imbuf module.
@ IMB_COLORMANAGE_IS_DATA
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
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