47 #ifndef _MIRA_JPEGCODEC_H_ 48 #define _MIRA_JPEGCODEC_H_ 53 namespace mira {
namespace codec {
66 (
"Description",
"Jpeg image compression (lossy)")
67 (
"Category" ,
"Image"))
73 JpegCodec(
int quality = 95) : mQuality(quality) {}
79 "The compression quality (0:highest compression - 100:best quality)",
83 template <
typename Reflector>
84 void reflect(Reflector &r)
86 r.property(
"Quality", mQuality,
87 "The compression quality (0:highest compression - 100:best quality)",
virtual void decodeBuffer(const Buffer< uint8 > &data, TypedVoidPtr ioObjectPtr)
Implementation of BinarySerializerCodec.
#define MIRA_REFLECT_BASE(reflector, BaseClass)
virtual TypeId getSupportedTypeId() const
Implementation of BinarySerializerCodec.
JPEG Codec class that can be used together with a BinarySerializer to encode images as JPEG...
Definition: JpegCodec.h:61
void property(const char *name, T &member, const char *comment, PropertyHint &&hint=PropertyHint(), ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
virtual Buffer< uint8 > encodeBuffer(TypedVoidConstPtr objectPtr)
Implementation of BinarySerializerCodec.