Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (47 sloc) 1.45 KB
using Aspose.Imaging;
using Aspose.Imaging.Examples.CSharp;
using Aspose.Imaging.ImageOptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CSharp.ModifyingAndConvertingImages.CMX
{
class CMXToPNGConversion
{
public static void Run()
{
//ExStart:CMXToPNGConversion
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_CMX();
string[] fileNames = new string[] {
"Rectangle.cmx",
"Rectangle+Fill.cmx",
"Ellipse.cmx",
"Ellipse+fill.cmx",
"brushes.cmx",
"outlines.cmx",
"order.cmx",
"many_images.cmx",
};
foreach (string fileName in fileNames)
{
using (Image image = Image.Load(dataDir + fileName))
{
image.Save(
dataDir + fileName + ".docpage.png",
new PngOptions
{
VectorRasterizationOptions =
new CmxRasterizationOptions()
{
Positioning = PositioningTypes.DefinedByDocument,
SmoothingMode = SmoothingMode.AntiAlias
}
});
}
}
//ExEnd:CMXToPNGConversion
}
}
}
You can’t perform that action at this time.