Click or drag to resize

ExtractedImageInfo Class

Represents a single occurrence of an image on a PDF page. Encapsulates both the image and its location on the page.
Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.Codec.PdfExtractedImageInfo

Namespace:  Atalasoft.Imaging.Codec.Pdf
Assembly:  Atalasoft.dotImage.PdfReader (in Atalasoft.dotImage.PdfReader.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public class ExtractedImageInfo

The ExtractedImageInfo type exposes the following members.

Constructors
  NameDescription
Public methodExtractedImageInfo
Initializes a new instance of the ExtractedImageInfo class
Top
Properties
  NameDescription
Public propertyImage
Gets the extracted image.
Public propertyTransformation
Gets the transformation required to draw the image at the right location.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
C#
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);
      }
   }
}
[New Example] (Visual Basic)
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
Examples
C#
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);
      }
   }
}
[New Example] (Visual Basic)
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
See Also