> Given the said zero time delay of frames, it is understandable that GDIplus reports a frame count of 1 only, because there isn't enough delay time needed to let it build up the buffer ready for frames retrieval.
The specification is unclear on zero delay time.
The WIC Animated GIF sample coalesces frames with zero delay time (i.e. m_uFrameDelay == 0) together:Code:vii) Delay Time - If not 0, this field specifies the number of hundredths (1/100) of a second to wait before continuing with the processing of the Data Stream. The clock starts ticking immediately after the graphic is rendered. This field may be used in conjunction with the User Input Flag field.
*but* they have special code for zero delay time for compat purposes explained in this snippet:Code:// Keep composing frames until we see a frame with delay greater than // 0 (0 delay frames are the invisible intermediate frames), or until // we have reached the very last frame. while (SUCCEEDED(hr) && m_uFrameDelay == 0 && !IsLastFrame()) { hr = DisposeCurrentFrame(); if (SUCCEEDED(hr)) { hr = OverlayNextFrame(); }
cheers,Code:// Insert an artificial delay to ensure rendering for gif with very small // or 0 delay. This delay number is picked to match with most browsers' // gif display speed. // // This will defeat the purpose of using zero delay intermediate frames in // order to preserve compatibility. If this is removed, the zero delay // intermediate frames will not be visible. if (m_uFrameDelay < 90) { m_uFrameDelay = 90; }
</wqw>




Reply With Quote
