BrushCue Example: Rose Tint¶
You can use this tool online at https://www.brushcue.com/tools/rose-tint
In [ ]:
!pip install brushcue
In [1]:
import brushcue
from PIL import Image
import io
input_image_1 = brushcue.composition_monet_women_with_parasol() # insert your own image here
float_constant_2 = brushcue.float_constant(0.4000000059604645)
float_constant_3 = brushcue.float_constant(0.20000000298023224)
transform_2d_identity_4 = brushcue.transform2_identity()
float_constant_5 = brushcue.float_constant(0.5)
float_constant_6 = brushcue.float_constant(1.0)
float_constant_7 = brushcue.float_constant(0.0)
float_constant_8 = brushcue.float_constant(0.0)
float_constant_9 = brushcue.float_constant(0.0)
float_constant_10 = brushcue.float_constant(0.0)
float_constant_11 = brushcue.float_constant(1.0)
float_constant_12 = brushcue.float_constant(0.0)
float_constant_13 = brushcue.float_constant(0.0)
float_constant_14 = brushcue.float_constant(0.0)
float_constant_15 = brushcue.float_constant(0.0)
float_constant_16 = brushcue.float_constant(1.0)
float_constant_17 = brushcue.float_constant(0.0)
float_constant_18 = brushcue.float_constant(0.0)
float_constant_19 = brushcue.float_constant(0.0)
float_constant_20 = brushcue.float_constant(0.0)
float_constant_21 = brushcue.float_constant(0.5)
rgba_color_constant_22 = brushcue.r_g_b_a_color_constant(1, 0.7, 0.8, 1)
srgb_profile_23 = brushcue.color_profile_s_r_g_b()
float_constant_24 = brushcue.float_constant(0.20000000298023224)
float_constant_25 = brushcue.float_constant(1.0)
overall_strength_26 = brushcue.float_constant(0.5)
float_constant_27 = brushcue.float_constant(0.10000000149011612)
float_constant_28 = brushcue.float_constant(1.0)
float_constant_29 = brushcue.float_constant(0.07999999821186066)
float_constant_30 = brushcue.float_constant(0.05000000074505806)
float_constant_31 = brushcue.float_constant(0.30000001192092896)
strength_32 = brushcue.float_passthrough(float_constant_21)
float_multiply_33 = brushcue.float_multiply(strength_32, float_constant_24)
float_multiply_34 = brushcue.float_multiply(float_constant_27, strength_32)
vector_2_float_from_components_35 = brushcue.vector2f_from_components(float_constant_29, float_constant_30)
float_multiply_36 = brushcue.float_multiply(overall_strength_26, float_constant_31)
float_multiply_37 = brushcue.float_multiply(float_constant_5, strength_32)
float_add_38 = brushcue.float_add(float_multiply_34, float_constant_25)
vector_2_float_scalar_multiply_39 = brushcue.vector2f_scalar_multiply(vector_2_float_from_components_35, overall_strength_26)
saturation_strength_40 = brushcue.float_add(float_multiply_36, float_constant_28)
saturation_boost_41 = brushcue.composition_saturation_adjust(input_image_1, saturation_strength_40)
warm_color_shift_42 = brushcue.composition_chroma_offset(saturation_boost_41, vector_2_float_scalar_multiply_39)
brightness_boost_43 = brushcue.composition_brightness_adjust(warm_color_shift_42, float_add_38)
get_image_size_44 = brushcue.composition_size(brightness_boost_43)
pink_overlay_45 = brushcue.composition_color_rect(rgba_color_constant_22, srgb_profile_23, get_image_size_44)
composition_rgba_linear_transform_46 = brushcue.composition_linear_transform(pink_overlay_45, float_constant_6, float_constant_7, float_constant_8, float_constant_9, float_constant_10, float_constant_11, float_constant_12, float_constant_13, float_constant_14, float_constant_15, float_constant_16, float_constant_17, float_constant_18, float_constant_19, float_constant_20, float_multiply_33)
red_pink_tint_47 = brushcue.composition_blend_alpha(composition_rgba_linear_transform_46, brightness_boost_43, transform_2d_identity_4)
rose_tint_result_48 = brushcue.composition_vignette(red_pink_tint_47, float_constant_2, float_constant_3, float_multiply_37)
ctx = brushcue.Context()
result = rose_tint_result_48.execute(ctx)
composition = result.as_composition()
data_bytes = composition.to_image_bytes(ctx)
img = Image.open(io.BytesIO(data_bytes))
img.thumbnail((400, 400)) # remove this line for full resolution
img
Out[1]: