fixes color/size bug for gif encoding