3#include "../_cexports/c_webstreaming.h"
4#include "converter.hpp"
36 return Internal::DoResCallShareOut<JPEGConverter>([&](
void*& handle)
38 return CVB_CALL_CAPI(CVWSCreateConverter(CExports::CVWSCT_Jpeg, handle));
48 return std::make_shared<T>(std::move(guard), PrivateTag{});
51 JPEGConverter(HandleGuard<Converter>&& guard, PrivateTag) noexcept
52 : Converter(std::move(guard))
63 CExports::cvbint64_t value = 0;
64 CVB_CALL_CAPI_CHECKED(CVWSGetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGScale, value));
65 return static_cast<int>(value);
77 CVB_CALL_CAPI_CHECKED(CVWSSetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGScale,
static_cast<CExports::cvbint64_t
>(scale)));
87 CExports::cvbint64_t value = 0;
88 CVB_CALL_CAPI_CHECKED(CVWSGetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGQualityLevel, value));
89 return static_cast<int>(value);
101 CVB_CALL_CAPI_CHECKED(CVWSSetPropertyAsInteger(
Handle(), CExports::CVWSCP_JPEGQualityLevel,
static_cast<CExports::cvbint64_t
>(quality)));
A converter object.
Definition: converter.hpp:29
void * Handle() const noexcept
Returns C-API style handle to Converter Object.
Definition: converter.hpp:45
A JPEG converter object.
Definition: jpeg_converter.hpp:22
void SetQuality(int quality)
Set the quality of the JPEG conversion.
Definition: jpeg_converter.hpp:99
void SetScale(int scale)
Set the scale of the JPEG conversion.
Definition: jpeg_converter.hpp:75
int Scale() const
Get the scale of the JPEG conversion.
Definition: jpeg_converter.hpp:61
static JPEGConverterPtr Create()
Creates a new JPEG converter.
Definition: jpeg_converter.hpp:34
int Quality() const
Get the quality of the JPEG conversion.
Definition: jpeg_converter.hpp:85
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24