- if (index != -1)
- {
- // We're already on index = 0 by default. So no need
- // to call GoFrame(0) then. On top of that GoFrame doesn't
- // accept an index of 0. (Instead GoFirstFrame() should be used)
- // Also if the gif image has only one frame, calling GoFrame(0)
- // fails because GoFrame() only works with gif animations.
- // (It fails if IsAnimation() returns FALSE)
- // All valid reasons to NOT call GoFrame when index equals 0.
- if (index != 0)
- {
- ok = decod->GoFrame(index);
- }
- }
-