struct P1::ImageSdkC::ConvertConfig

#include <C_P1ImageCaptureImage.h>

struct ConvertConfig
{
    // fields

    bool scale = false;
    double scaleFactor = 0.0;
    int32_t dstWidth = 0;
    int32_t dstHeight = 0;
    BitmapImageRepFormat outputFormat = kBitmapFormat_Unknown;
    P1::ImageSdk::CanvasClip canvasClip = P1::ImageSdk::CanvasClipNone;
    bool crop = false;
    int32_t x = 0;
    int32_t y = 0;
    int32_t width = 0;
    int32_t height = 0;
    bool noiseModelEnabled = false;
    float noiseModelP1 = 5;
    float noiseModelP2 = 1;
    bool contrastEnabled = false;
    float contrast = 0.0;
    bool brightnessEnabled = false;
    float brightness = 0;
    bool saturationEnabled = false;
    float saturation = 0;
    bool exposureEnabled = false;
    float exposure = 0;
    bool gainEnabled = false;
    float gain = 1.0;
    bool blackLevelEnabled = false;
    float blackLevelRed = 0.0;
    float blackLevelGreen = 0.0;
    float blackLevelBlue = 0.0;
    bool midtoneLevelEnabled = false;
    float midtoneLevelRed = 0.0;
    float midtoneLevelGreen = 0.0;
    float midtoneLevelBlue = 0.0;
    bool whiteLevelEnabled = false;
    float whiteLevelRed = 1.0;
    float whiteLevelGreen = 1.0;
    float whiteLevelBlue = 1.0;
    bool blackLevelTargetEnabled = false;
    float blackLevelTargetRed = 0.0;
    float blackLevelTargetGreen = 0.0;
    float blackLevelTargetBlue = 0.0;
    bool whiteLevelTargetEnabled = false;
    float whiteLevelTargetRed = 1.0;
    float whiteLevelTargetGreen = 1.0;
    float whiteLevelTargetBlue = 1.0;
    bool colorBalanceShadowEnabled = false;
    float colorBalanceShadowRed = 1.0;
    float colorBalanceShadowGreen = 1.0;
    float colorBalanceShadowBlue = 1.0;
    bool colorBalanceMidtoneEnabled = false;
    float colorBalanceMidtoneRed = 1.0;
    float colorBalanceMidtoneGreen = 1.0;
    float colorBalanceMidtoneBlue = 1.0;
    bool colorBalanceHighlightEnabled = false;
    float colorBalanceHighlightRed = 1.0;
    float colorBalanceHighlightGreen = 1.0;
    float colorBalanceHighlightBlue = 1.0;
    bool sharpeningEnabled = false;
    float sharpeningAmount = 0.0f;
    bool noiseReductionEnabled = false;
    int noiseReductionRadius = 0;
    bool clarityEnabled = false;
    int clarityMethod = 0;
    float clarityFactor = 0.0f;
    bool shadowRecoveryEnabled = false;
    float shadowRecovery = 0.0f;
    bool highlightRecoveryEnabled = false;
    float highlightRecovery = 0.0f;
    size_t redCurveTableSize = 0;
    double* redCurve = nullptr;
    size_t greenCurveTableSize = 0;
    double* greenCurve = nullptr;
    size_t blueCurveTableSize = 0;
    double* blueCurve = nullptr;
    size_t lumaCurveTableSize = 0;
    double* lumaCurve = nullptr;
    size_t rgbCurveTableSize = 0;
    double* rgbCurve = nullptr;
    bool whiteBalanceGainEnabled = false;
    float whiteBalanceGainRed = 0.0;
    float whiteBalanceGainGreen = 0.0;
    float whiteBalanceGainBlue = 0.0;
    bool geometricCorrectionEnabled = false;
    GeometricCorrection geometricCorrection;
    bool lightFalloffCorrectionEnabled = false;
    bool chromaticAberrationCorrectionEnabled = false;
    bool exposureWarningMaskEnabled = false;
    float exposureWarningThresholdOver = 1.0f;
    float exposureWarningThresholdUnder = 0.0f;
    bool clipWarningMaskEnabled = false;
    int clipWarningCount = -1;
    int histogramStage = 0;
    bool enableLinearPath = false;

    // methods

    bool toJSON(json& jsonStream) const;
    bool fromJSON(const json jsonStream);
    void freeElements();
    void DeepCopy(const ConvertConfig& other);
    ConvertConfig& operator = (const ConvertConfig& other);
};