Add gif writing.