Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/handanim/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def cairo_surface_to_numpy(surface: cairo.ImageSurface):
h = surface.get_height()
a = np.ndarray(shape=(h, w, 4), dtype=np.uint8, buffer=buf)
# Cairo is ARGB, convert to a contiguous RGBA buffer for imageio.
return np.ascontiguousarray(a[:, :, [2, 1, 0, 3]])
b = a.copy()
b[:, :, 0] = a[:, :, 2]
b[:, :, 2] = a[:, :, 0]
Comment thread
OEvortex marked this conversation as resolved.
return b


def solve_quad_eqn(
Expand Down