public void setRepeat(int iter) {
        if (iter >= 0) {
            repeat = iter;
        }
    }
Sets the number of times the set of GIF frames should be played. Default is
1; 0 means play indefinitely. Must be invoked before the first image is
added.

@param iter int number of iterations.
@return
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGifEncoder.java