Esempio n. 1
0
def lr_detail(xmp, luminance, color):
    detail = {}
    if luminance or color:
        detail = xmp_get_lr_settings(xmp, LR_DETAIL)
        if luminance:
            detail.update(xmp_get_lr_settings(xmp, LR_DETAIL_LUMINANCE))
        if color:
            detail.update(xmp_get_lr_settings(xmp, LR_DETAIL_COLOR))
    return detail
Esempio n. 2
0
def lr_effects(xmp, grain, vignette, dehaze):
    effects = xmp_get_lr_settings(xmp, LR_EFFECTS)
    if not dehaze:
        effects.pop('Dehaze')

    if grain:
        effects.update(xmp_get_lr_settings(xmp, LR_EFFECTS_GRAIN))
    if vignette:
        effects.update(xmp_get_lr_settings(xmp, LR_EFFECTS_VIGNETTE))

    if not grain and not vignette:
        effects.pop('EnableEffects')
    return effects
Esempio n. 3
0
def lr_tone_curve(xmp):
    tc = get_tonecurve(xmp)
    lrt = xmp_get_lr_settings(xmp, LR_TONE_CURVE)
    for t in LR_ARRAY_TAGS:
        if tc[t]:
            lrt[t] = tc_format(tc[t])
    return lrt
Esempio n. 4
0
def lr_color(xmp, treatment, adjustments, saturation, vibrance):
    color = xmp_get_lr_settings(xmp, LR_COLOR)
    if not treatment:
        color.pop('ConvertToGrayscale')
    if not saturation:
        color.pop('Saturation')
    if not vibrance:
        color.pop('Vibrance')

    if adjustments:
        color.update(lr_color_adjustments(xmp))
    else:
        color.pop('EnableColorAdjustments')
    return color
Esempio n. 5
0
def lr_tone(xmp, exposure, contrast, highlights, shadows, white, black,
            clarity):
    tone = xmp_get_lr_settings(xmp, LR_TONE)
    if not exposure:
        tone.pop('Exposure2012')
    if not contrast:
        tone.pop('Contrast2012')
    if not highlights:
        tone.pop('Highlights2012')
    if not shadows:
        tone.pop('Shadows2012')
    if not white:
        tone.pop('Whites2012')
    if not black:
        tone.pop('Blacks2012')
    if not clarity:
        tone.pop('Clarity2012')
    return tone
Esempio n. 6
0
def lr_white_balance(xmp):
    return xmp_get_lr_settings(xmp, LR_WHITE_BALANCE)
Esempio n. 7
0
def lr_camera_calibration(xmp):
    return xmp_get_lr_settings(xmp, LR_CAMERA_CALIBRATION)
Esempio n. 8
0
def lr_process_version(xmp):
    return xmp_get_lr_settings(xmp, LR_PROCESS_VERSION)
Esempio n. 9
0
def lr_split_toning(xmp):
    return xmp_get_lr_settings(xmp, LR_SPLIT_TONING)
Esempio n. 10
0
def lr_sharpening(xmp):
    return xmp_get_lr_settings(xmp, LR_SHARPENING)
Esempio n. 11
0
def lr_color_adjustments(xmp):
    return xmp_get_lr_settings(xmp, LR_COLOR_ADJUSTMENTS)