Here my way to get an imageList from resource stream.
// Create storage for bitmap strip
ImageList images = new ImageList();
// Define the size of images we supply
images.ImageSize = imageSize;
// Get the assembly that contains the bitmap resource
Assembly myAssembly = Assembly.GetAssembly(assemblyType);
// Get the resource stream containing the images
Stream imageStream =
myAssembly.GetManifestResourceStream(imageName);
if (imageStream == null)
return null;
// Load the bitmap strip from resource
Bitmap pics = new Bitmap(imageStream);
if (makeTransparent)
{
Color backColor = pics.GetPixel(transparentPixel.X,
transparentPixel.Y);
// Make backColor transparent for Bitmap
pics.MakeTransparent(backColor);
}
// Load them all !
images.Images.AddStrip(pics);
return images;