GDI+ / Images



GIF is the only image format that can present image-based animation in Internet Explorer. But what level of support does GDI+ offer for animated GIFs? Well, at least the ability to read individual frames, and in this sample you'll see how to use GDI+ to pick apart an animated GIF. It is shown here after loading one of the sample images and scrolling to frame 7: Of interest is the way the WinForms PictureBox control deals with animated GIFs. Normally it always animates, but in this sample there's...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Have you ever tried to create a transparent GIF with GDI+? Seems like it should be easy since there's such a thing as Color.Transparent, but interestingly enough the GIF encoder that's included with the .NET framework doesn't correctly identify Color.Transparent! But there is a way to get the job done by using unsafe code blocks to directly access the memory where the bitmap is held. Here is a fun WinForms sample that allows you to read in any GIF file and set any color in the palette to be transparent:It...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

News


Welcome to my blog.
Here's what we've got on the menu today:

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Syndication: