johnsen-zhang / as3gif Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/as3gif
Automatically exported from code.google.com/p/as3gif
I've also noticed that with some gifs the previous frames aren't cleared
properly (issue 8 and 10). A way to 'fix' these gifs is to open them in
photoshop (cs5, I don't know what previous versions can edit animated gifs) for
example, open the animation panel, select all the frames and set the frame
disposal method to dispose. The gifs I tried had the disposal method set to
"don't dispose" only for the first frame.
I hope this helps anyone who encountered this problem.
Original issue reported on code.google.com by [email protected]
on 8 Oct 2010 at 1:12
Please change this in the GIFPlayer class:
private function update ( pEvt:TimerEvent ) :void
{
var delay:int = aFrames[ iIndex = iInc++ % arrayLng ].delay;
pEvt.target.delay = ( delay > 0 ) ? delay : 100;
switch ( gifDecoder.disposeValue )
{
case 0:
if ( !iIndex ) bitmapData = aFrames[ 0 ].bitmapData.clone();
bitmapData.draw ( aFrames[ iIndex ].bitmapData );
break;
case 1:
if ( !iIndex ) bitmapData = aFrames[ 0 ].bitmapData.clone();
bitmapData.draw ( aFrames[ iIndex ].bitmapData );
break
case 2:
bitmapData = aFrames[ iIndex ].bitmapData;
break;
}
dispatchEvent ( new FrameEvent ( FrameEvent.FRAME_RENDERED, aFrames[ iIndex
] ) );
}
+ in the readSteam() method before event dispatching add this lines plz:
__width = aFrames[0].bitmapData.rect.width;
__height = aFrames[0].bitmapData.rect.height;
dispatchEvent(new GIFPlayerEvent ( GIFPlayerEvent.COMPLETE ,
aFrames[0].bitmapData.rect));
__width, __height - create override methods for them. Usability grows ^_^
Cheers, Jloa
Original issue reported on code.google.com by [email protected]
on 12 Feb 2009 at 12:07
Seems like no one posted how to resize the animated gif after it’s loaded. I
put up some sample code if you’re interested.
This code allows you to resize the width and height of an animated GIF loaded
in through GIFPlayer.
https://gist.github.com/1238101
Original issue reported on code.google.com by [email protected]
on 23 Sep 2011 at 6:44
this version has a Bug in GIFPlayer.as
private function update( pEvt : TimerEvent ) : void {
var delay : int = aFrames[ iIndex = iInc++ % arrayLng ].delay;
pEvt.target.delay = ( delay > 0 ) ? delay : 100;
/*look here..gifDecoder.disposeValue is a Number means this is a single
disposeValue in the gif,but it's a fault,not everyone.every Frame has her
disponseValue.so i think it's a bug.
Fst: GIFFrame.as
public var disposeValue:int;
public function GIFFrame( _pImage:BitmapData, _pDelay:int,_pdisponse:int){
bitmapData = _pImage;
delay = _pDelay;
disposeValue = _pdisponse;
}
second:GIFDecoder.as
frames.push ( new GIFFrame (bitmap, delay,dispose) ); // add image to frame
list
final:GIFPlayer.as
private function update ( pEvt:TimerEvent ) :void{
var delay:int = aFrames[ iIndex = iInc++ % arrayLng ].delay;
pEvt.target.delay = ( delay > 0 ) ? delay : 100;
switch ( aFrames[ iIndex ].disposeValue )
*/
switch ( gifDecoder.disposeValue ) {
case 1:
if ( !iIndex ) bitmapData = aFrames[ 0 ].bitmapData.clone();
bitmapData.draw(aFrames[ iIndex ].bitmapData);
break;
case 2:
bitmapData = aFrames[ iIndex ].bitmapData;
break;
}
dispatchEvent(new FrameEvent(FrameEvent.FRAME_RENDERED, aFrames[ iIndex ]));
}
Original issue reported on code.google.com by [email protected]
on 24 Aug 2009 at 7:23
Attachments:
What steps will reproduce the problem?
1. Load an offending file
What is the expected output? What do you see instead?
The file should animate like normal. Instead it animates, but never clears the
screen after each frame, making each frame stack on the previous one.
What version of the product are you using? On what operating system?
0.6
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2010 at 9:29
Attachments:
The SWC is missing from the downloads page :
http://code.google.com/p/as3gif/issues/list
Even though the summmary says,
"GIFPlayer 0.6 Sources (Documentation, SWC, examples)"
The FLA is included to make the SWC, but that is not so useful if you don't
have flash to compile it :)
Original issue reported on code.google.com by [email protected]
on 13 Oct 2011 at 1:21
What steps will reproduce the problem?
1. Use the demo app
What is the expected output? What do you see instead?
When loading, the loaded file is uploaded and then downloaded.
Instead, it should just be loaded into memory with the load method and use
loadBytes.
What version of the product are you using? On what operating system?
0.6
Replacement functions:
function onSelect ( pEvt:Event ):void {
myUpload.load();
}
function onComplete ( pEvt:Event ):void {
myGIFPlayer.loadBytes(myUpload.data);
}
Original issue reported on code.google.com by [email protected]
on 20 Sep 2010 at 9:30
How come there is no source code in the SVN ?
Original issue reported on code.google.com by [email protected]
on 11 Jul 2008 at 8:39
Is it possible to republish the component under MIT license?
Original issue reported on code.google.com by [email protected]
on 16 Feb 2009 at 5:59
This is improvement patch file for solving Issue 4, 6, 7, 8.
Original issue reported on code.google.com by [email protected]
on 2 Jul 2010 at 3:10
Some gif files has disposal method reading problem.
for example http://img682.imageshack.us/img682/7098/drinkmini.gif
in as3gif image blurs, in other viewers all ok
Original issue reported on code.google.com by [email protected]
on 22 Mar 2010 at 9:31
What steps will reproduce the problem?
1. Generate a GIF with 9 frames (160x120);
My file that I was generating became 192258 bytes.
Can I regulate that by calling setQuality() method? Or the setQuality() is all
about generation speed, not the generated file size?
Original issue reported on code.google.com by [email protected]
on 24 Nov 2010 at 3:00
Attachments:
What steps will reproduce the problem?
1. Try to load a big gif, 500x375 with around 5 frames, it will make the
flash player hangs, that means that the function to load is taking too much
time to complete, and it should not be loaded all in the same time, it
should use events, or timers, idk. I believe that its the GIFDecoder read
or getFrame function! (Inside the GIFPlayer readStream function).
What is the expected output? What do you see instead?
I expect that it loads larger gifs without making the flash player hangs
(it will hang my game ;p), I dont expect it to load instantly, but it
should not make the execution flow stop until it is all loaded :/
What version of the product are you using? On what operating system?
0.6, Windows
Please provide any additional information below.
I hope it gets fixed soon :), I need to load large gifs in the middle of
the gameplay :/
Original issue reported on code.google.com by [email protected]
on 21 Jan 2010 at 6:09
What steps will reproduce the problem?
1. Load one of this files in your library:
http://www.amezbros.com/1.gif
http://www.amezbros.com/2.gif
http://www.amezbros.com/3.gif
What is the expected output? What do you see instead?
It is expected to appear an static gif image, but it appears a white rectangle
What version of the product are you using? On what operating system?
AS3GIF player 0.4
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 17 Dec 2008 at 4:14
[deleted issue]
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 [email protected]
on 3 Oct 2011 at 12:54
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.