Ejemplo n.º 1
0
        public object GetThumbnails(HttpPostedFileBase fileUpload)
        {
            var    stream = fileUpload.InputStream;
            Bitmap img    = new Bitmap(stream);

            DroppedImage = img;
            FileName     = fileUpload.FileName;
            int height = (int)(img.Height / ((float)img.Width / 500f));

            img = ResizeBitmap(img, 500, height);
            //img.Save(string.Format(@"C:\Users\Dimitar\Pictures\test\{0} {1}.jpg",
            //    Path.GetFileNameWithoutExtension(FileName), DateTime.Now.Ticks));
            return(img.ApplyFilters());
        }