示例#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);
        }
示例#2
0
 /// <summary>
 /// Loads a PNG 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 PNG.FromFileAsBitmap(string)");
     }
 }