With GroupDocs.Parser, you can extract images from ODP documents in your .NET projects in just a few steps:
- Initialize the Parser with the ODP file.
- Retrieve image elements from the document.
- Use the extracted images as needed in your workflow.
With GroupDocs.Parser, you can extract images from ODP documents in your .NET projects in just a few steps:
// Open the document containing images using Parser
using (Parser parser = new Parser("input.odp")) {
// Extract all embedded images from the file
IEnumerable<PageImageArea> images = parser.GetImages();
// Handle cases where no images are found
if (images == null)
{
return;
}
// Process or save the retrieved images
foreach (PageImageArea image in images)
{
Console.WriteLine(string.Format("Page: {0}, R: {1}, Type: {2}",
image.Page.Index, image.Rectangle, image.FileType));
}
}
GroupDocs.Parser offers more than just image extraction — you can also extract raw text, hyperlinks, metadata, and structured content for advanced automation scenarios.
Pull out embedded images from a variety of file formats, including DOCX, PDF, PPTX, XLSX, and image files like PNG, JPG, and TIFF.
Images are extracted with high fidelity, maintaining their original resolution, format, and color profile.
Customize image extraction with filtering by page, format, or resolution, and support for multi-page documents.
This example demonstrates how to extract all image assets from a PDF file and save them to the local file system.
// Load the PDF using the Parser class
using (Parser parser = new Parser("input.pdf"))
{
// Extract embedded images from the file
IEnumerable<PageImageArea> images = parser.GetImages();
// Set output format and image options (e.g., PNG)
ImageOptions options = new ImageOptions(ImageFormat.Png);
// Write the extracted images to disk
int imageNumber = 0;
foreach (PageImageArea image in images)
{
image.Save(imageNumber.ToString() + ".png", options);
imageNumber++;
}
}
Download GroupDocs.Parser for free or get a trial license for full access!
Explore documentation, code samples, and community support to enhance your experience.
GroupDocs.Parser enables accurate image extraction from a wide range of document and image formats. Check the list below for commonly supported types.