xw33421 / as3gif

Automatically exported from code.google.com/p/as3gif
0 stars 0 forks source link

gifDecode.disposeValue out of bounds #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. copy pasted the example code
2. added the following URL in the URLRequest: http://m.buienradar.nl/
3. didn't see anything

What is the expected output? What do you see instead?
Expected to see the animated GIF, but nothing was drawn

What version of the product are you using? On what operating system?
-

Please provide any additional information below.
I traced the issue back to the GIFPlayer.update() method. The case switch check 
for the values 1 and 2, but the GIF i was loading resulted in a 
gifDecoder.disposeValue value of 3. Adding this case fixed the issue and got my 
animation working:

switch ( gifDecoder.disposeValue ) 
{       
    case 1:
    if ( !iIndex ) 
    bitmapData = aFrames[ 0 ].bitmapData.clone();
    bitmapData.draw ( aFrames[ iIndex ].bitmapData );
    break;
    case 2:
    case 3:
    bitmapData = aFrames[ iIndex ].bitmapData;
    break;
}

Original issue reported on code.google.com by i...@vannieuwburg.net on 3 Oct 2011 at 12:54