Filling missing colors if size of palette is not a power of two (gif writing)