Update: after some fiddling (sprinf and malloc were the reasons why the console didn't like my code as much as the simulator did), the gif encoder now works on the device and takes 23 seconds to create a 65 frames, 460Kb gif. I bet patterned dithering will produce smaller files.
Using coroutine.yield
and a bit of back and forth with the C runtime we even get a nice progress bar
So yeah, that feature is going to make it into the camera app. I just don't think there's going to be an animated preview in the camera roll (gifs can't be read so we would need to also generate a pdv or something but I think I'll leave that as an exercice to a providential github forker).