D
Dylan Nicholson
Hi,
I've found quite a lot of messages and posts by developers at a loss
as to how to use MakeTransparent() to generate a GIF89 image with a
transparent color...but I've come across a particular problem that
I've yet to see mentioned, namely that using
bitmap.Save("filename.gif")
works just fine (correctly sets the transparent color in the GIF
file), whereas
bitmap.Save("filename.gif", ImageFormat.Gif);
doesn't work - the "transparent" color is consistently turned to
black.
Similarly for the Save(Stream, ImageFormat) overload, which is the one
I actually wanted to use (as I'd like to create the GIF file in
memory). Only workaround is to use the first form, saving to a temp
file, then load the file into memory.
I've also tried the other overloads for Bitmap.Save() with no luck.
Wondering if "ImageFormat.Gif" implies GIF87...but there is no
ImageFormat.Gif89.
Dylan
I've found quite a lot of messages and posts by developers at a loss
as to how to use MakeTransparent() to generate a GIF89 image with a
transparent color...but I've come across a particular problem that
I've yet to see mentioned, namely that using
bitmap.Save("filename.gif")
works just fine (correctly sets the transparent color in the GIF
file), whereas
bitmap.Save("filename.gif", ImageFormat.Gif);
doesn't work - the "transparent" color is consistently turned to
black.
Similarly for the Save(Stream, ImageFormat) overload, which is the one
I actually wanted to use (as I'd like to create the GIF file in
memory). Only workaround is to use the first form, saving to a temp
file, then load the file into memory.
I've also tried the other overloads for Bitmap.Save() with no luck.
Wondering if "ImageFormat.Gif" implies GIF87...but there is no
ImageFormat.Gif89.
Dylan