Image.Bytes
Image.Bytes property
Gets the image data store.
public byte[] Bytes { get; }
Examples
Shows how to get an image from a document.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Images();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
// Get all Image nodes
IList<Aspose.Note.Image> nodes = oneFile.GetChildNodes<Aspose.Note.Image>();
foreach (Aspose.Note.Image image in nodes)
{
using (MemoryStream stream = new MemoryStream(image.Bytes))
{
using (Bitmap bitMap = new Bitmap(stream))
{
// Save image bytes to a file
bitMap.Save(String.Format(dataDir + "{0}", Path.GetFileName(image.FileName)));
}
}
}
See Also
- class Image
- namespace Aspose.Note
- assembly Aspose.Note