ExtractedImageInfo Class |
Namespace: Atalasoft.Imaging.Codec.Pdf
The ExtractedImageInfo type exposes the following members.
Name | Description | |
---|---|---|
ExtractedImageInfo | Initializes a new instance of the ExtractedImageInfo class |
Name | Description | |
---|---|---|
Image | Gets the extracted image. | |
Transformation | Gets the transformation required to draw the image at the right location. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
using (FileStream file = new FileStream( string.Format(@"in.pdf", fileName), FileMode.Open, FileAccess.Read)) { Document document = new Document(file); for (int pageIndex=0; pageIndex<document.Pages.Count; pageIndex++) { Page page = document.Pages[pageIndex]; ExtractedImageInfo[] images = page.ExtractImages(); for (int imageIndex = 0; null!=images && imageIndex<images.Length; imageIndex++) { images[imageIndex].Image.Save( string.Format( @"..\..\out_{0}_{1}.bmp", pageIndex, imageIndex), new BmpEncoder(), null); } } }
Dim file As FileStream = New FileStream( _ String.Format("in.pdf", fileName), FileMode.Open, FileAccess.Read)) Dim document As Document = New Document(file) For pageIndex As Integer = 0 To document.Pages.Count - 1) Dim page As Page = document.Pages(pageIndex) Dim images() As ExtractedImageInfo = page.ExtractImages() For imageIndex As Integer = 0 To images.Length - 1) images(imageIndex).Bitmap.Save( _ String.Format( "..\..\out_{0}_{1}.bmp", pageIndex, imageIndex _ New BmpEncoder(), Nothing)) Next Next
using (FileStream file = new FileStream( string.Format(@"in.pdf", fileName), FileMode.Open, FileAccess.Read)) { Document document = new Document(file); for (int pageIndex=0; pageIndex<document.Pages.Count; pageIndex++) { Page page = document.Pages[pageIndex]; ExtractedImageInfo[] images = page.ExtractImages(); for (int imageIndex = 0; null!=images && imageIndex<images.Length; imageIndex++) { images[imageIndex].Image.Save( string.Format( @"..\..\out_{0}_{1}.bmp", pageIndex, imageIndex), new BmpEncoder(), null); } } }
Dim file As FileStream = New FileStream( _ String.Format("in.pdf", fileName), FileMode.Open, FileAccess.Read)) Dim document As Document = New Document(file) For pageIndex As Integer = 0 To document.Pages.Count - 1) Dim page As Page = document.Pages(pageIndex) Dim images() As ExtractedImageInfo = page.ExtractImages() For imageIndex As Integer = 0 To images.Length - 1) images(imageIndex).Bitmap.Save( _ String.Format( "..\..\out_{0}_{1}.bmp", pageIndex, imageIndex _ New BmpEncoder(), Nothing)) Next Next