public Uri ResolvePasteUpReference(PropertyDictionary manifest, string manifestPath) { Document document = Document.Deserialize(manifest, Path.GetDirectoryName(manifestPath)); PasteUpRenderer renderer = new PasteUpRenderer(document); string outputPath = _temporaryFileManager.CreateAnonymousFilePath(".png"); using (Bitmap bitmap = renderer.Render()) { bitmap.Save(outputPath); } return new Uri(outputPath); }
public void SaveImage() { using (SaveFileDialog saveFileDialog = new SaveFileDialog()) { saveFileDialog.Filter = "PNG Image (*.png)|*.png"; if (saveFileDialog.ShowDialog() == DialogResult.OK) { using (PasteUpRenderer renderer = new PasteUpRenderer(_document)) { using (Bitmap bitmap = renderer.Render()) { bitmap.Save(saveFileDialog.FileName); } } } } }