Exemple #1
0
        /// <summary>
        /// Loads an iamge using the standard method.
        /// </summary>
        /// <param name="path">The path to the file.</param>
        protected void LoadSafe(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            Clear();
            this.Image = IMAGE.StandardLoad(path);
        }
Exemple #2
0
 /// <summary>
 /// Loads a BMP image and returns it as a bitmap object.
 /// </summary>
 /// <param name="path">The path of the image.</param>
 /// <returns>A <see cref="Bitmap"/> object.</returns>
 public static Bitmap FromFileAsBitmap(string path)
 {
     try
     {
         return(IMAGE.StandardLoad(path));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + "\r\nIn BMP.FromFileAsBitmap(string)");
     }
 }
Exemple #3
0
 /// <summary>
 /// Loads a ICO image and returns it as a bitmap object.
 /// </summary>
 /// <param name="path">The path of the image.</param>
 /// <returns>A <see cref="Bitmap"/> object.</returns>
 public static Bitmap FromFileAsBitmap(string path)
 {
     try
     {
         Bitmap bmp = IMAGE.StandardLoad(path);
         ImageHelper.RotateImageByExifOrientationData(bmp);
         return(bmp);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + "\r\nIn ICO.FromFileAsBitmap(string)");
     }
 }