1 #define QOI_IMPLEMENTATION
2 #include "vg/submodules/qoi/qoi.h"
3 #include "vg/vg_platform.h"
6 u8
*qoi_encode_rgbaf32( f32
*data
, u32 width
, u32 height
, int *length
)
9 for( u32 i
=0; i
<width
*height
*4; i
++ )
11 buf
[i
] = vg_clampf( data
[i
] * 255.0f
, 0.0f
, 255.0f
);
22 return qoi_encode( buf
, &desc
, length
);
25 void qoi_free( u8
*ptr
)
30 #include "vg/vg_tool.h"
31 #include "vg/vg_tool.c"