Skip to content

Commit 791999e

Browse files
Structure
1 parent 9c6d8a5 commit 791999e

File tree

61 files changed

+1943
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1943
-0
lines changed

content/english/net/_index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Comprehensive Tutorials and Examples of Aspose.Imaging for .NET
3+
linktitle: Aspose.Imaging for .NET Tutorials
4+
type: docs
5+
weight: 10
6+
url: /net/
7+
description:
8+
is_root: true
9+
---
10+
11+
### [Image Composition](./image-composition/)
12+
13+
### [Image Creation](./image-creation/)
14+
15+
### [Basic Drawing](./basic-drawing/)
16+
17+
### [Advanced Drawing](./advanced-drawing/)
18+
19+
### [Image Transformation](./image-transformation/)
20+
21+
### [Vector Image Processing](./vector-image-processing/)
22+
23+
### [Text and Measurements](./text-and-measurements/)
24+
25+
### [Image Format Conversion](./image-format-conversion/)
26+
27+
### [DICOM Image Processing](./dicom-image-processing/)
28+
29+
### [Advanced Features](./advanced-features/)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Advanced Drawing
3+
linktitle: Advanced Drawing
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 23
8+
url: /net/advanced-drawing/
9+
---
10+
11+
## Advanced Drawing Tutorials
12+
### [Draw Using Graphics in Aspose.Imaging for .NET](./draw-using-graphics/)
13+
### [Draw Using GraphicsPath in Aspose.Imaging for .NET](./draw-using-graphicspath/)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Draw Using Graphics in Aspose.Imaging for .NET
3+
linktitle: Draw Using Graphics in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 10
8+
url: /net/advanced-drawing/draw-using-graphics/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example DrawingUsingGraphics");
16+
// The path to the documents directory.
17+
string dataDir = "Your Document Directory";
18+
// Create an instance of BmpOptions and set its various properties
19+
BmpOptions imageOptions = new BmpOptions();
20+
imageOptions.BitsPerPixel = 24;
21+
// Create an instance of FileCreateSource and assign it to Source property
22+
imageOptions.Source = new FileCreateSource(dataDir, false);
23+
using (var image = Image.Create(imageOptions, 500, 500))
24+
{
25+
var graphics = new Graphics(image);
26+
// Clear the image surface with white color and Create and initialize a Pen object with blue color
27+
graphics.Clear(Color.White);
28+
var pen = new Pen(Color.Blue);
29+
// Draw Ellipse by defining the bounding rectangle of width 150 and height 100 also Draw a polygon using the LinearGradientBrush
30+
graphics.DrawEllipse(pen, new Rectangle(10, 10, 150, 100));
31+
using (var linearGradientBrush = new LinearGradientBrush(image.Bounds, Color.Red, Color.White, 45f))
32+
{
33+
graphics.FillPolygon(
34+
linearGradientBrush,
35+
new[] { new Point(200, 200), new Point(400, 200), new Point(250, 350) });
36+
}
37+
image.Save();
38+
}
39+
Console.WriteLine("Finished example DrawingUsingGraphics");
40+
}
41+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Draw Using GraphicsPath in Aspose.Imaging for .NET
3+
linktitle: Draw Using GraphicsPath in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 11
8+
url: /net/advanced-drawing/draw-using-graphicspath/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example DrawingUsingGraphicsPath");
16+
// The path to the documents directory.
17+
string dataDir = "Your Document Directory";
18+
// Create an instance of BmpOptions and set its various properties
19+
BmpOptions ImageOptions = new BmpOptions();
20+
ImageOptions.BitsPerPixel = 24;
21+
// Create an instance of FileCreateSource and assign it to Source property
22+
ImageOptions.Source = new FileCreateSource(dataDir + "sample_1.bmp", false);
23+
// Create an instance of Image and initialize an instance of Graphics
24+
using (Image image = Image.Create(ImageOptions, 500, 500))
25+
{
26+
Graphics graphics = new Graphics(image);
27+
graphics.Clear(Color.White);
28+
// Create an instance of GraphicsPath and Instance of Figure, add EllipseShape, RectangleShape and TextShape to the figure
29+
GraphicsPath graphicspath = new GraphicsPath();
30+
Figure figure = new Figure();
31+
figure.AddShape(new EllipseShape(new RectangleF(0, 0, 499, 499)));
32+
figure.AddShape(new RectangleShape(new RectangleF(0, 0, 499, 499)));
33+
figure.AddShape(new TextShape("Aspose.Imaging", new RectangleF(170, 225, 170, 100), new Font("Arial", 20), StringFormat.GenericTypographic));
34+
graphicspath.AddFigures(new[] { figure });
35+
graphics.DrawPath(new Pen(Color.Blue), graphicspath);
36+
// Create an instance of HatchBrush and set its properties also Fill path by supplying the brush and GraphicsPath objects
37+
HatchBrush hatchbrush = new HatchBrush();
38+
hatchbrush.BackgroundColor = Color.Brown;
39+
hatchbrush.ForegroundColor = Color.Blue;
40+
hatchbrush.HatchStyle = HatchStyle.Vertical;
41+
graphics.FillPath(hatchbrush, graphicspath);
42+
image.Save();
43+
Console.WriteLine("Processing completed successfully.");
44+
}
45+
Console.WriteLine("Finished example DrawingUsingGraphicsPath");
46+
}
47+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Advanced Features
3+
linktitle: Advanced Features
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 29
8+
url: /net/advanced-features/
9+
---
10+
11+
## Advanced Features Tutorials
12+
### [Get Original Options in Aspose.Imaging for .NET](./get-original-options/)
13+
### [Convert APS to PSD in Aspose.Imaging for .NET](./convert-aps-to-psd/)
14+
### [Pantone Goe Coated Palette in Aspose.Imaging for .NET](./pantone-goe-coated-palette/)
15+
### [Support of CDR Format in Aspose.Imaging for .NET](./support-of-cdr-format/)
16+
### [BigTiff Load Example in Aspose.Imaging for .NET](./bigtiff-load-example/)
17+
### [BMP RLE4 in Aspose.Imaging for .NET](./bmp-rle4/)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: BigTiff Load Example in Aspose.Imaging for .NET
3+
linktitle: BigTiff Load Example in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 14
8+
url: /net/advanced-features/bigtiff-load-example/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example BigTiffLoadExample");
16+
string dataDir = "Your Document Directory";
17+
string fileName = "input-BigTiff.tif";
18+
string inputFilePath = Path.Combine(dataDir, fileName);
19+
string outputFilePath = Path.Combine(dataDir, "result.tiff");
20+
using (var image = Image.Load(inputFilePath) as BigTiffImage)
21+
{
22+
image.Save(outputFilePath, new BigTiffOptions(TiffExpectedFormat.TiffLzwRgba));
23+
}
24+
File.Delete(outputFilePath);
25+
Console.WriteLine("Finished example BigTiffLoadExample");
26+
}
27+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: BMP RLE4 in Aspose.Imaging for .NET
3+
linktitle: BMP RLE4 in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 15
8+
url: /net/advanced-features/bmp-rle4/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example BmpRLE4");
16+
string dataDir = "Your Document Directory";
17+
using (Image image = Image.Load(Path.Combine(dataDir,"Rle4.bmp")))
18+
{
19+
image.Save(
20+
System.IO.Path.Combine(dataDir, "output.bmp"),
21+
new BmpOptions()
22+
{
23+
Compression = BitmapCompression.Rle4,
24+
BitsPerPixel = 4,
25+
Palette = ColorPaletteHelper.Create4Bit()
26+
});
27+
}
28+
File.Delete(System.IO.Path.Combine(dataDir, "output.bmp"));
29+
Console.WriteLine("Finished example BmpRLE4");
30+
}
31+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Convert APS to PSD in Aspose.Imaging for .NET
3+
linktitle: Convert APS to PSD in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 11
8+
url: /net/advanced-features/convert-aps-to-psd/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example ApsToPsd");
16+
// The path to the documents directory.
17+
string dataDir = "Your Document Directory";
18+
string inputFileName = dataDir + "SimpleShapes.cdr";
19+
//Export vector image to PSD format keeping vector shapes
20+
//Aspose.Imaging allows to export vector image formats such as CDR, EMF, EPS, ODG, SVG, WMF to the PSD format,
21+
//while keeping vector properties of the original, utilizing PSD Shapes, Paths //and Vector Masks.
22+
//Currently, export of not very complex shapes is supported, whithout texture brushes or open shapes with stroke,
23+
//which will be improved in the upcoming releases.
24+
//Example
25+
//Export from the CDR format to the PSD format preserving vector
26+
//properties is as simple as the following snippet:
27+
using (Image image = Image.Load(inputFileName))
28+
{
29+
PsdOptions imageOptions = new PsdOptions()
30+
{
31+
VectorRasterizationOptions = new VectorRasterizationOptions(),
32+
VectorizationOptions = new PsdVectorizationOptions()
33+
{
34+
VectorDataCompositionMode = VectorDataCompositionMode.SeparateLayers
35+
}
36+
};
37+
imageOptions.VectorRasterizationOptions.PageWidth = image.Width;
38+
imageOptions.VectorRasterizationOptions.PageHeight = image.Height;
39+
image.Save(dataDir + "result.psd", imageOptions);
40+
}
41+
File.Delete(dataDir + "result.psd");
42+
Console.WriteLine("Finished example ApsToPsd");
43+
}
44+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Get Original Options in Aspose.Imaging for .NET
3+
linktitle: Get Original Options in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 10
8+
url: /net/advanced-features/get-original-options/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example GetOriginalOptions");
16+
string dataDir = "Your Document Directory";
17+
using (ApngImage image = (ApngImage)Image.Load(Path.Combine(dataDir, "SteamEngine.png")))
18+
{
19+
ApngOptions options = (ApngOptions)image.GetOriginalOptions();
20+
if (options.NumPlays != 0 || options.DefaultFrameTime != 10 || options.BitDepth != 8)
21+
{
22+
Console.WriteLine("Exist some errors in default options");
23+
}
24+
}
25+
Console.WriteLine("Finished example GetOriginalOptions");
26+
}
27+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Pantone Goe Coated Palette in Aspose.Imaging for .NET
3+
linktitle: Pantone Goe Coated Palette in Aspose.Imaging for .NET
4+
second_title: Aspose.Imaging .NET Image Processing API
5+
description:
6+
type: docs
7+
weight: 12
8+
url: /net/advanced-features/pantone-goe-coated-palette/
9+
---
10+
11+
## Complete Source Code
12+
```csharp
13+
public static void Run()
14+
{
15+
Console.WriteLine("Running example PantoneGoeCoatedPalette");
16+
// The path to the documents directory.
17+
string dataDir = "Your Document Directory";
18+
string inputFileName = dataDir + "test2.cdr";
19+
using (var image = (CdrImage)Image.Load(inputFileName))
20+
{
21+
image.Save(Path.Combine(dataDir,"result.png") , new PngOptions()
22+
{
23+
VectorRasterizationOptions = new CdrRasterizationOptions
24+
{
25+
Positioning = PositioningTypes.Relative
26+
}
27+
});
28+
}
29+
File.Delete(dataDir + "result.png");
30+
Console.WriteLine("Finished example PantoneGoeCoatedPalette");
31+
}
32+
```

0 commit comments

Comments
 (0)