Guide for VB.NET
Core Document Formats
PowerPoint to Other Raster Image Formats (Jpeg, Gif, Png, Jbig2)
Additional Features

VB.NET PowerPoint - Convert PPT to Raster Images

Convert PPT to Jpeg, Png, Gif and Jbig2 Raster Images with VB.NET Codes

VB.NET
Home > .NET Imaging SDK > VB.NET > PowerPoint: Render to Other Raster Images
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

If you want to convert your MS PowerPoint document presentation into raster image format for high-speed loading and further processing, what kind of image file do you want to convert PPT to? Is it Jpeg, Png or Gif? Or have you ever wondered there is such PowerPoint document converter that can allow you to convert and transform PPT document into all these raster images, including Jpeg, Png, Gif and even Jbig2? c# save tiff compression, itextsharp vb.net pdf to text, mvc return pdf, c# 2d barcode generator open source, barcode reader sdk vb.net, c# pdfsharp fill pdf form. If so, here is a great library - RasterEdge VB.NET PPT to Raster Images Converter, which aims at offering the easiest PPT conversion APIs to convert and transform PPT document to raster image files in single transforming or batch conversion modes.
Related .net document control helps:
asp.net edit pdf text control: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net sharepoint document viewer control: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
c# asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
c# asp.net excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net view text file in browser: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
asp.net view tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
Here is the page navigation for what will be mainly discussed on this Visual Basic .NET tutorial:
  • What come first are the crucial product developing requirements for applying VB.NET PPT to raster images converter
  • Then, you well get the comprehensive VB.NET guide on how to render and convert PowerPoint document to Jpeg, Png, Gif and Jbig2 raster images respectively with the detailed VB.NET demo methods and codes provided
c# create pdf with password, c# make thumbnail of pdf, c# resize pdf page, c# remove text from pdf, add header and footer in pdf using itextsharp c#, merge multiple file types into one pdf in c#, c# pdf library mit license.
Programming Demands
We are about to talk about the product developing requirements of using this VB.NET PPT to raster images converting component in two aspects: one is the basic .NET imaging libraries and the other is the operating and programming platforms. asp net remove text from pdf javascript, how to write pdf file in asp.net c#, asp.net tiff image viewer, best pdf viewer control for asp.net, pdf preview in asp net c# example, mvc 5 display pdf in view, asp net remove image from pdf.

PPT Converting Libraries

For using our robust and easy-to-use PPT document to raster images rendering tool in VB.NET program, following assemblies from RasterEdge .NET Imaging SDK package are demanded.
  • RasterEdge.Imaging.Basic.dll: basic and core .NET imaging reference for all VB.NET project images and documents pre-processing functions
  • RasterEdge.Imaging.MSPPT.dll: the specific PowerPoint document handling library

Programming Requirements

Here are the developing and programming demands that ensure VB.NET PPT to raster image converter can work correctly.
  • Compatible with Microsoft Visual Studio versions of 2005, 2008, 2010 and 2012
  • Support .NET Framework in versions 2.0, 3.0, 3.5, 4.0 and 4.5
  • Windows 2003, Windows 2008 Server and other operating systems in native 32 and 64 bit binaries
Besides, users just need to have some basic knowledge of VB.NET can use this VB.NET PPT to raster images converter very well.
Converting Demos
In this tutorial page, users can get both the complete free demo APIs and sample codes in VB.NET programming language. Of course, if you are developers or end users in Visual C#.NET, you need to link to C#.NET PowerPoint document to raster images conversions.

Sample Methods

Finishing the PowerPoint document to raster images conversions in VB program needs two steps:
  1. First, define the entire PPT document or just a certain PPT slide/page to be rendered into image object - REImage;
  2. Then, convert and save the rendered image into any compatible raster image file.
' Render PPTXDocument to get a REImage collection, or choose specific slide to render.	 
Private Function GetPage(pageIndex As Integer) As BasePage Implements PPTXDocument.GetPage
End Function
Private Function toImage() As BaseImage Implements PPTXPage.toImage
End Function
Private Function toImage(height As Integer, width As Integer) As BaseImage Implements PPTXPage.toImage
End Function

' Convert the rendered REImage into other image formats using API below.
Private Sub SaveImageFile(image As REImage, filePath As [String]) Implements REFile.SaveImageFile
End Sub
Note: as displayed in the above APIs, users can see method "height As Integer, width As Integer", which is a user-defined option offered for users to set the rendered image parameter on image width and height. Other image rendering and converting choices and options are image pixel, scaling factor and basic resolution, which can be found in specifying VB.NET PPT converting options.

PowerPoint to Jpeg

You can get the accurate VB demo code on rendering and converting single or multiple PPT pages to Jpeg raster image files in this section.
Jpeg acts as a standard compression mode for digital images. It uses lossy compression which can keep the image contents in high quality after compression.
''' <summary>
''' Render PPTXDocument to image in JPEG format
''' </summary>
''' <param name="PowerPointFilePath"></param>
''' <returns></returns>
Public Function RenderPPTXDocumentToJPEG(PowerPointFilePath As [String]) As List(Of Stream)
' a list of stream which contains the image data of the JPEG image.
Dim buffer As New List(Of Stream)()

Dim doc As New PPTXDocument(PowerPointFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
Dim page As PPTXPage = DirectCast(doc.GetPage(i), PPTXPage)
Dim temp As REImage = DirectCast(page.ToImage(), REImage)
Dim imageStream As New MemoryStream()
If temp IsNot Nothing Then
temp.Convert(imageStream, ImageFormat.Jpg)
buffer.Add(imageStream)

End If
Next

Return buffer
End Function

PowerPoint to Gif

Please refer to following VB demo code to render and convert PowerPoint (.pptx) document to raster Gif format in your VB.NET program.
Gif is also an image compression mode and famous for its standard LZW data encoding. Because Gif image is often in small size, so it is not widely used for digital photo.
''' <summary>
''' Render PPTXDocument to image in Gif format
''' </summary>
''' <param name="PowerPointFilePath"></param>
''' <returns></returns>
Public Function RenderPPTXDocumentToGIF(PowerPointFilePath As [String]) As List(Of Stream)
' a list of stream which contains the image data of the GIF image.
Dim buffer As New List(Of Stream)()

Dim doc As New PPTXDocument(PowerPointFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
Dim page As PPTXPage = DirectCast(doc.GetPage(i), PPTXPage)
Dim temp As REImage = DirectCast(page.ToImage(), REImage)
Dim imageStream As New MemoryStream()
If temp IsNot Nothing Then
temp.Convert(imageStream, ImageFormat.Gif)
buffer.Add(imageStream)

End If
Next

Return buffer
End Function

PowerPoint to Png

Check PPT to PNG image converting sample code in VB.NET class as below.
Png, the short form of Portable Network Graphics, supports lossless and portable compression.
''' <summary>
''' Render PPTXDocument to image in Png format
''' </summary>
''' <param name="PowerPointFilePath"></param>
''' <returns></returns>
Public Function RenderPPTXDocumentToPNG(PowerPointFilePath As [String]) As List(Of Stream)
' a list of stream which contains the image data of the PNG image.
Dim buffer As New List(Of Stream)()

Dim doc As New PPTXDocument(PowerPointFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
Dim page As PPTXPage = DirectCast(doc.GetPage(i), PPTXPage)
Dim temp As REImage = DirectCast(page.ToImage(), REImage)
Dim imageStream As New MemoryStream()
If temp IsNot Nothing Then
temp.Convert(imageStream, ImageFormat.Png)
buffer.Add(imageStream)

End If
Next

Return buffer
End Function

PowerPoint to Jbig2

VB.NET sample code below is offered to help users to render and convert PowerPoint (.pptx) document into raster Jbig2 file in high efficiency.
Jbig2 is a standard compression form for bitonal (black and white) images and supports both lossy and lossless compression modes.
''' <summary>
''' Render PPTXDocument to image in Jbig2 format
''' </summary>
''' <param name="PowerPointFilePath"></param>
''' <returns></returns>
Public Function RenderPPTXDocumentToJBIG2(PowerPointFilePath As [String]) As List(Of Stream)
' a list of stream which contains the image data of the JBIG2 image.
Dim buffer As New List(Of Stream)()

Dim doc As New PPTXDocument(PowerPointFilePath)
For i As Integer = 0 To doc.GetPageCount() - 1
Dim page As PPTXPage = DirectCast(doc.GetPage(i), PPTXPage)
Dim temp As REImage = DirectCast(page.ToImage(), REImage)
Dim imageStream As New MemoryStream()
If temp IsNot Nothing Then
temp.Convert(imageStream, ImageFormat.Jbig2)
buffer.Add(imageStream)

End If
Next

Return buffer
End Function


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2024 Raster Edge.com