示例#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
示例#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
示例#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
示例#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
示例#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
示例#6
0
def lr_white_balance(xmp):
    return xmp_get_lr_settings(xmp, LR_WHITE_BALANCE)
示例#7
0
def lr_camera_calibration(xmp):
    return xmp_get_lr_settings(xmp, LR_CAMERA_CALIBRATION)
示例#8
0
def lr_process_version(xmp):
    return xmp_get_lr_settings(xmp, LR_PROCESS_VERSION)
示例#9
0
def lr_split_toning(xmp):
    return xmp_get_lr_settings(xmp, LR_SPLIT_TONING)
示例#10
0
def lr_sharpening(xmp):
    return xmp_get_lr_settings(xmp, LR_SHARPENING)
示例#11
0
def lr_color_adjustments(xmp):
    return xmp_get_lr_settings(xmp, LR_COLOR_ADJUSTMENTS)