- if ((imgidx > 0) && // REMOVEOBJECT2 not needed at frame 1(imgidx==0)
- (global.imagecount > 1))
- {
- // check last frame's disposal method
- if ((disposal = getGifDisposalMethod(gft, imgidx-1)) >= 0)
- {
- switch(disposal) {
- case NONE:
- swf_SetU16(t, depth-1);
- t = swf_InsertTag(t, ST_REMOVEOBJECT2);
- if (VERBOSE(3))
- fprintf(stdout, " [none]\n");
- break;
- case DO_NOT_DISPOSE:
- if (VERBOSE(3))
- fprintf(stdout, " [don't dispose]\n");
- break;
- case RESTORE_TO_BGCOLOR:
- swf_SetU16(t, depth-1);
- t = swf_InsertTag(t, ST_REMOVEOBJECT2);
+ if ((imgidx > 0) && // REMOVEOBJECT2 not needed at frame 1(imgidx==0)
+ (global.imagecount > 1)) {
+ // check last frame's disposal method
+ if ((disposal = getGifDisposalMethod(gft, imgidx - 1)) >= 0) {
+ switch (disposal) {
+ case NONE:
+ // [Replace one full-size, non-transparent frame with another]
+ t = swf_InsertTag(t, ST_REMOVEOBJECT2);
+ swf_SetU16(t, depth - 1);
+ if (VERBOSE(3))
+ fprintf(stdout, " [none]\n");
+ break;
+ case DO_NOT_DISPOSE:
+ // [Any pixels not covered up by the next frame continue to display]
+ if (VERBOSE(3))
+ fprintf(stdout, " [don't dispose]\n");
+ break;
+ case RESTORE_TO_BGCOLOR:
+ // [The background color or background tile -rather than a previous frame-
+ // shows through transparent pixels]
+ t = swf_InsertTag(t, ST_REMOVEOBJECT2);
+ swf_SetU16(t, depth - 2);