Exemple #1
0
        /// <summary>
        /// Gets the image from the file.
        /// </summary>
        public void GetImageFromFile()
        {
            this.anImage = ExifThumbReader.ReadThumb(this.fileName);

            if (this.anImage == null)
            {
                this.anImage = this.FullSizeImage;
            }
        }
 protected static string ExtractThumbnailBase64(string path)
 {
     try
     {
         Image  thumbnailImage = ExifThumbReader.ReadThumb(path);
         string base64thumb    = ImageHelper.ImageToBase64(thumbnailImage);
         return(base64thumb);
     }
     catch
     {
         Image  thumb     = ImageHelper.PathToThumbnail(path, 200, 200);
         string baseThumb = ImageHelper.ImageToBase64(thumb);
         return(baseThumb);
     }
 }