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 as bc
duration = 3.0
@bc.brushcue_fn
def frame(time):
input_image = bc.Composition.monet_women_with_parasol()
pixel_size = 50.0
input_image_bounds = input_image.bounds()
return input_image.pixelate(
((pixel_size * (1.0 - (time / duration))) + 1.0).round_to_int()
).crop(
bc.Bounds2f.from_x_y_width_height(
0.0, 0.0, input_image_bounds.width(), input_image_bounds.height()
)
)
graph = bc.Sequence.graph(duration, frame)
ctx = bc.Context()
sequence = graph.execute(ctx)
# Render `sequence` to a video file as needed.
[wgpu] using backend Metal — adapter 'Apple M5' (IntegratedGpu), driver ''