Here is the private method that I use to add images from the 12 Hive to
an Image Library:
private static void AddImageToList(SPList list, string imageName)
{
// Add an image from the 12 Hive to the
string imagePath = @"C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\TEMPLATE\IMAGES\";
try
{
FileStream stream = File.OpenRead(imagePath + imageName);
byte[] content = new byte[stream.Length];
stream.Read(content, 0, (int)stream.Length);
stream.Close();
list.RootFolder.Files.Add(list.RootFolder.Url +
"/" + imageName, content, true);
}
catch
{
// Do nothing if image is not found
}
}