BrushCue Example: Exposure Adjust¶

Open In Colab

You can use this tool online at https://www.brushcue.com/tools/exposure-adjust

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.0)
float_constant_3 = brushcue.float_constant(0.0)
float_constant_4 = brushcue.float_constant(0.0)
float_constant_5 = brushcue.float_constant(0.0)
float_constant_6 = brushcue.float_constant(0.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(0.0)
float_constant_12 = brushcue.float_constant(0.0)
float_constant_13 = brushcue.float_constant(0.0)
float_constant_14 = brushcue.float_constant(1.0)
float_constant_15 = brushcue.float_constant(2.0)
float_constant_16 = brushcue.float_constant(2.0)
float_constant_17 = brushcue.float_constant(2.0)
float_constant_18 = brushcue.float_constant(-6.705522537231445e-8)
steps_19 = brushcue.float_passthrough(float_constant_18)
float_power_20 = brushcue.float_pow(float_constant_15, steps_19)
float_power_21 = brushcue.float_pow(float_constant_16, steps_19)
float_power_22 = brushcue.float_pow(float_constant_17, steps_19)
exposure_adjust_linear_transform_23 = brushcue.composition_linear_transform(input_image_1, float_power_20, float_constant_2, float_constant_3, float_constant_4, float_constant_5, float_power_21, float_constant_6, float_constant_7, float_constant_8, float_constant_9, float_power_22, float_constant_10, float_constant_11, float_constant_12, float_constant_13, float_constant_14)

ctx = brushcue.Context()
result = exposure_adjust_linear_transform_23.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]:
No description has been provided for this image