public static Bitmap LoadTargaImage(string sFileName) { using (TargaImage image = new TargaImage(sFileName)) { return(new Bitmap(image.Image)); } }
/// <summary> /// Loads a Targa image file into a Bitmap object. /// </summary> /// <param name="sFileName">The Targa image filename</param> /// <returns>A Bitmap object with the Targa image loaded into it.</returns> public static Bitmap LoadTargaImage(string sFileName) { Bitmap b = null; using (TargaImage ti = new TargaImage(sFileName)) { b = new Bitmap(ti.Image); } return b; }