BrushCue Example: Pixelate Reveal Animation¶
You can use this tool online at https://www.brushcue.com/tools/pixelate-reveal-animation
In [ ]:
!pip install brushcue
In [1]:
import brushcue
import io
input_image_1 = brushcue.composition_monet_women_with_parasol() # insert your own image here
duration_2 = brushcue.float_passthrough(5.0)
time_3 = brushcue.float_passthrough(0.0)
int_to_float_4 = brushcue.int_to_float(69)
float_divide_5 = brushcue.float_divide(time_3, duration_2)
composition_size_6 = brushcue.composition_size(input_image_1)
float_subtract_7 = brushcue.float_subtract(1.0, float_divide_5)
image_width_8 = brushcue.vector2i_x(composition_size_6)
int_to_float_9 = brushcue.int_to_float(image_width_8)
float_divide_10 = brushcue.float_divide(int_to_float_9, int_to_float_4)
float_multiply_11 = brushcue.float_multiply(float_divide_10, float_subtract_7)
float_add_12 = brushcue.float_add(float_multiply_11, 1.0)
float_round_to_int_13 = brushcue.float_round_to_int(float_add_12)
int_max_14 = brushcue.int_max(1, float_round_to_int_13)
pixelate_15 = brushcue.composition_pixelate(input_image_1, int_max_14)
sequence_graph_16 = brushcue.sequence_graph(duration_2, time_3, pixelate_15)
ctx = brushcue.Context()
result = sequence_graph_16.execute(ctx)
result = result.as_sequence()
# You can render the result to an video file