예제 #1
0
 public static Bitmap LoadTargaImage(string sFileName)
 {
     using (TargaImage image = new TargaImage(sFileName))
     {
         return(new Bitmap(image.Image));
     }
 }
예제 #2
0
        /// <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;
        }