/// <summary> /// Imports the image. /// </summary> public ImportedImage ImportImage(Stream stream, PdfDocument document) { StreamReaderHelper helper = new StreamReaderHelper(stream); // Try all registered importers to see if any of them can handle the image. foreach (IImageImporter importer in _importers) { helper.Reset(); ImportedImage image = importer.ImportImage(helper, document); if (image != null) return image; } return null; }
/// <summary> /// Imports the image. /// </summary> public ImportedImage ImportImage(Stream stream, PdfDocument document) { StreamReaderHelper helper = new StreamReaderHelper(stream); // Try all registered importers to see if any of them can handle the image. foreach (IImageImporter importer in _importers) { helper.Reset(); ImportedImage image = importer.ImportImage(helper, document); if (image != null) { return(image); } } return(null); }