corientdev / imagelistview

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

Animated GIFS #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*Posted by XChrome on CP*

Is there a way to support animated gifs? With static images like jpg, non-
animated gif, png everything works fine, but every animated gif throws an 
error. Maybe you could use the ImageAnimator.CanAnimate (on gif-extensions 
only) to check, if the images has frames and extract the first frame for the 
thumbnail.

Original issue reported on code.google.com by oozcitak on 3 Dec 2009 at 10:04

GoogleCodeExporter commented 9 years ago
Sample animated gif from wikimedia commons.

http://commons.wikimedia.org/wiki/File:Rotating_earth_(small).gif

Original comment by oozcitak on 3 Dec 2009 at 11:59

Attachments:

GoogleCodeExporter commented 9 years ago
Couldn't reproduce the issue. Waiting for feedback.

Original comment by oozcitak on 4 Dec 2009 at 12:05

GoogleCodeExporter commented 9 years ago
Now it seems to work for me as well. 

But try to load this small static gif. I'm getting a OutOfMemoryException
while debugging. The image cannot be read. It will not create a thumbnail.
But Windows Explorer or any other imagetool can display the gif without 
problems.

Original comment by m...@xchrome.de on 4 Dec 2009 at 1:47

Attachments:

GoogleCodeExporter commented 9 years ago
I couldn't manage to load this image. simply calling Image.FromFile with this 
image 
throws an OutOfMemory exception. There is either something wrong with this 
image or it 
is somehow not supported by the framework. 

As a solution, all renderers now check if the thumbnails are valid and draw the 
default 
ErrorImage in case of errors.

Original comment by oozcitak on 4 Dec 2009 at 3:02

GoogleCodeExporter commented 9 years ago
I figured out, that my image is not a GIF87a format. The problem with this 
image is, 
that one of my graphic programs (photoshop or corel photo paint) don't write a 
semicolon at the end of the gif-file. But this is necessary, according to 
gif89a-
specification. Normally this not a problem for Windows Explorer, Webbrowsers or 
other 
Graphic programs, but for GDI+ (results in OutOfMemoryException)

Original comment by oozcitak on 20 Dec 2009 at 12:10

GoogleCodeExporter commented 9 years ago
Fixed.

Original comment by oozcitak on 20 Dec 2009 at 12:46