Skip to content

Commit

Permalink
transparency
Browse files Browse the repository at this point in the history
unclear if transparency was ever intended, but it does work now
  • Loading branch information
lcdavis13 committed Sep 19, 2023
1 parent 469216f commit 5cef31e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pixelhouse/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def canvas2gif(
): # pragma: no cover
images = [A.render(n).img for n in tqdm(range(len(A)))]

for i,img in enumerate(images):
if img.shape[2] == 4:
img[:, :, 3] = 255
images[i] = img
# for i,img in enumerate(images):
# if img.shape[2] == 4:
# img[:, :, 3] = 255
# images[i] = img

if duration == None:
duration = A.duration / A.fps
Expand All @@ -32,6 +32,7 @@ def canvas2gif(
palettesize=palettesize,
subrectangles=True,
loop=0,
disposal=2,
)

fs = os.stat(f_gif).st_size
Expand Down

0 comments on commit 5cef31e

Please sign in to comment.