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;
    BitmapColorSpace outputColorSpace = kBitmapColorSpace_sRGB;
    P1::ImageSdk::CanvasClip canvasClip = P1::ImageSdk::CanvasClipMaintainDimensions;
    bool crop = false;
    int32_t x = 0;
    int32_t y = 0;
    int32_t width = 0;
    int32_t height = 0;
    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;
    float sharpeningRadius = 0.8f;
    float sharpeningThreshold = 0.0f;
    float haloSuppressionAmount = 0.0f;
    bool noiseReductionEnabled = false;
    float luminanceNoiseReductionAmount = 0.0f;
    float colorNoiseReductionAmount = 0.0f;
    bool noiseReductionSinglePixelEnabled = false;
    bool noiseModelEnabled = false;
    float noiseModelP1 = 5.0f;
    float noiseModelP2 = 1.0f;
    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;
    int whiteBalanceMode = 1;
    bool geometricCorrectionEnabled = false;
    GeometricCorrection geometricCorrection;
    bool geometricCorrectionCompensationEnabled = false;
    float geometricCompensationPressure = 0.0f;
    bool lightFalloffCorrectionEnabled = false;
    bool chromaticAberrationCorrectionEnabled = false;
    bool exposureWarningMaskEnabled = false;
    float exposureWarningThresholdOver = 1.0f;
    float exposureWarningThresholdUnder = 0.0f;
    bool clipWarningMaskEnabled = false;
    int clipWarningCount = -1;
    int dualExposureOutput = 0;
    bool enableLinearPath = false;
    OrientationMode orientationMode = OrientationMode::rotateAuto;
    bool polynomialTransformEnabled = false;
    bool polynomialTransformNormalized = false;
    float polynomial_ax = 0.f;
    float polynomial_bx = 0.f;
    float polynomial_cx = 1.f;
    float polynomial_ay = 0.f;
    float polynomial_by = 0.f;
    float polynomial_cy = 1.f;

    // methods

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