Yellow artifacts when rendering gifs #146
Answered
by
stenson
bensapirstein
asked this question in
Q&A
-
|
I'm trying to render a gif and it has yellow artifacts, any idea how to fix this? from coldtype import *
from coldtype.fx.skia import phototype
fnt_ar = Font("Wasim/sources/Wasim-Ar.ufo")
fnt_hb = Font("Wasim/sources/Wasim-Heb.ufo")
fnt = Font.Fontmake("Wasim/Wasim.designspace")
txt = 'ابن\n\n\n\n\n\n\n\n\nآدم'
size = 40
secs = 2
def unclose(p:P):
p._val.value = [p if p[0] != "closePath" else ('endPath', ()) for p in p._val.value ]
p.endPath()
return p
@animation(timeline=Timeline(30*secs, 30), bg=bw(1), watch=[fnt_ar.path, fnt_hb.path])
def BenAdam(f):
return (StSt(txt, fnt, size*10, wght=f.e("qeio"))
.xalign(f.a.r, "E")
.mapv(unclose)
.explode()
.fssw(-1, 0, 1)
.outline(0.5)
.castshadow(40, size)
.align(f.a.r, tx=0)
.f(1)
.ch(phototype(f.a.r, blur=3, cut=90, cutw=30, fill=bw(0)))
)
release = BenAdam.export("gif") |
Beta Was this translation helpful? Give feedback.
Answered by
stenson
Oct 13, 2023
Replies: 1 comment 4 replies
-
|
I'd recommend using installing and using gifski — there are some built-in utilities for that, so you can do something like this instead of declaring a @animation(timeline=Timeline(30*secs, 30), bg=bw(1), watch=[fnt_ar.path, fnt_hb.path], release=lambda x: x.gifski()) |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
bensapirstein
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


I'd recommend using installing and using gifski — there are some built-in utilities for that, so you can do something like this instead of declaring a
releasefunction as above:@animation(timeline=Timeline(30*secs, 30), bg=bw(1), watch=[fnt_ar.path, fnt_hb.path], release=lambda x: x.gifski())