public static void ProcessDirectory(string targetDirectory)
{
// string[] fileEntries = Directory.GetFiles(targetDirectory, "*.jpg");
var fileEntries = Directory.GetFiles(targetDirectory, "*.jpg");
//if (photos.Count() == 0)
//{
// Response.Redirect("~/Images/gallery-empty.png");
// return;
//}
// Process the list of files found in the directory.
using (var generator = new MultiThumbnailGenerator())
{
foreach (var photo in fileEntries)
{
using (var imageStream = new System.IO.MemoryStream(photo.FileContents)) //error
{
using (var image = System.Drawing.Image.FromStream(imageStream))
{
generator.AddImage(image);
}
}
}
using (var outStream = new System.IO.MemoryStream())
{
generator.WritePngToStream(outStream);
// var image = new WebImage(outStream);
// image.Write();
}
}
}
*MultiThumbnailGenerator is a class where i am generating thumbnail of many images of the folder , in that thumbnail all the images have lightly display,,,
I have an outstream (of many images to develop an image) ,I googled it but my requirement is ASP.net 3.5.
how to generate,create,save the outstream as an image