I'm trying to display a multi-page/frame TIFF file on a web page. All I get displayed is the first page.
I can also display any single page in the mutli-page file using SetActiveFrame to select the appropriate page. I just can't display the entire file.
My code:
Response.ContentType = "image/jpeg";
Image image = Image.FromFile("MyTiff.tif");
int frameCount = image.GetFrameCount(Imaging.FrameDimension.Page);
for (int index = 0; index < frameCount; index++)
{
image.SelectActiveFrame(System.Drawing.Imaging.FrameDimension.Page, index);
image.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg);
}
I also tried making each page a separate image in a collection of images, to completely disassociate each image from the TIFF file, and then saving the collection of images to the web page. This also resulted in only the first image being displayed on the web page.
Thanks