Hi Brad,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Please use the code snippet given below for generating a slide thumbnail and presenting that on .aspx page using response stream. I have converted my code to support VB.NET and it executes successfully. For reference the output image is also attached. Hopefully, things will work for you this time.
'Instantiate a Presentation object that represents a PPT file
Dim pres As Presentation = New Aspose.Slides.Presentation("D://ppt//ImageSlideA.ppt")
'Accessing a slide using its slide position
Dim slide As Aspose.Slides.Slide = pres.GetSlideByPosition(1)
'Getting the thumbnail image of the slide of a specified size
Dim image As Image = slide.GetThumbnail(1.0F, 1.0F)
'Saving the thumbnail image in jpeg format
'Initializing Memory Stream
Dim ImageMs As MemoryStream = New MemoryStream()
'Saving image to memory stream
image.Save(ImageMs, System.Drawing.Imaging.ImageFormat.Jpeg)
ImageMs.Position = 0
'Intializing buffer
Dim pBuffer(ImageMs.Length) As Byte
'Memory stream to buffer
ImageMs.Read(pBuffer, 0, ImageMs.Length)
Response.Clear()
'set response content type: image/jpeg, image/gif, image/png, etc...
Response.ContentType = "image/jpeg"
'write the image to the output stream
Response.OutputStream.Write(pBuffer, 0, pBuffer.Length)
Response.End()
The following settings have been made in aspx page.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
Thanks and Regards,