From 6170040350a7776a1434b9488b8d37307549f398 Mon Sep 17 00:00:00 2001 From: JimBobSquarePants Date: Sat, 2 Dec 2023 21:56:25 +0000 Subject: [PATCH] deploy: SixLabors/sixlabors.com@afa7d5101c5043dc5921829714281c9e98fcca2d --- products/imagesharp-drawing/index.html | 76 +++++++++++++++++++++++--- products/imagesharp/index.html | 28 +++++----- 2 files changed, 84 insertions(+), 20 deletions(-) diff --git a/products/imagesharp-drawing/index.html b/products/imagesharp-drawing/index.html index 22c3a0e..9b60c86 100644 --- a/products/imagesharp-drawing/index.html +++ b/products/imagesharp-drawing/index.html @@ -200,6 +200,13 @@

+
+
+

+ Revolutionize your graphics with ImageSharp.Drawing, the ideal solution for dynamic design and development. It blends intuitive design with powerful functionality, making it perfect for developers seeking precision and ease. Embrace the art of simplicity with ImageSharp.Drawing +

+
+

Install anywhere

@@ -208,7 +215,7 @@

Install anywhere

anywhere that supports .NET Standard 2.0+.NET 6+, ImageSharp.Drawing can be used in device, cloud, and embedded/IoT scenarios.

@@ -225,11 +232,15 @@

Install anywhere

-

An API for everyone

+

Powerfully Simple:
An API for Everyone

+

+ Experience the unmatched combination of power and simplicity with ImageSharp.Drawing. + Engineered for peak developer experience, its API redefines ease of use, offering unparalleled flexibility + and extensibility. +

- ImageSharp.Drawings's API is unparalleled for it's ease of use; designed - from the ground up to be flexible and extensible. - Easily draw complex shapes with our intuitive commands. + Master the art of drawing complex shapes effortlessly with our intuitive command suite. + ImageSharp.Drawing is where simplicity meets sophistication, making advanced graphics accessible to all.

@@ -239,7 +250,7 @@

An API for everyone

using SixLabors.ImageSharp.Processing; using Image image = new Image<Rgba32>(100, 100); -var star = new Star(50, 50, 5, 20, 45); +Star star = new(50, 50, 5, 20, 45); PointF[] points = star.Points.ToArray(); Color[] colors = { @@ -247,7 +258,7 @@

An API for everyone

Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple }; -var brush = new PathGradientBrush(points, colors, Color.White); +PathGradientBrush brush = new(points, colors, Color.White); image.Mutate(x => x.Fill(brush)); image.Save("star.png"); @@ -256,7 +267,58 @@

An API for everyone

+
+
+
+
+

Revolutionizing Text Graphics

+

+ With its cutting-edge text rendering, ImageSharp.Drawing leads the .NET ecosystem. + Its mastery of bi-directional (BIDI) text seamlessly integrates diverse scripts, essential for global reach. + The library boasts advanced rich text features like underlining, overlining, strikethrough, with custom brushes, elevating + text styling to new heights. Its versatility shines with both vertical and horizontal text support, catering to any design need. +

+

+ This makes it a transformative tool for high-impact visuals, ensuring crisp, clear typography across all platforms and resolutions. +

+

+
+
+
using SixLabors.Fonts;
+using SixLabors.Fonts.Unicode;
+using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Drawing.Processing;
+
+Font font = CreateFont("OpenSans-Regular.ttf", 36);
+Font fallback = CreateFont("NotoSansKR-Regular.otf", 36);
 
+const string text = "한국어 hangugeo";
+RichTextOptions textOptions = new(font)
+{
+    FallbackFontFamilies = new[] { fallback.Family },
+    LayoutMode = LayoutMode.VerticalLeftRight,
+    TextRuns = new[]
+    {
+        new RichTextRun()
+        {
+            Start = 0,
+            End = text.GetGraphemeCount(),
+            TextDecorations = TextDecorations.Underline
+        }
+    }
+};
+
+FontRectangle bounds = TextMeasurer.MeasureSize(text, textOptions);
+using Image<Rgba32> img = new((int)Math.Ceiling(bounds.Width), (int)Math.Ceiling(bounds.Height));
+img.Mutate(x => x.Fill(Color.White).DrawText(textOptions, text, Brushes.Solid(Color.Black)));
+
+img.Save("rich-text.png");
+
+
+
+
+
diff --git a/products/imagesharp/index.html b/products/imagesharp/index.html index 4b4336e..526ff77 100644 --- a/products/imagesharp/index.html +++ b/products/imagesharp/index.html @@ -4,7 +4,7 @@ Six Labors : ImageSharp - + ImageSharp

- A modern, fully featured, fully managed, cross-platform, 2D graphics library for.NET. + A modern, fully featured, fully managed, cross-platform, 2D graphics library for .NET.

@@ -199,6 +199,13 @@

+
+
+

+ Boost your projects with ImageSharp, the ultimate image processing tool for the modern .NET development stack. Its powerful, agile, and user-friendly features accelerate your workflow, ensuring seamless integration and top-notch performance. +

+
+

Install anywhere

@@ -237,7 +244,7 @@

An API for everyone

using SixLabors.ImageSharp;
 using SixLabors.ImageSharp.Processing;
 
-using var image = Image.Load("original.jpg");
+using Image image = Image.Load("original.jpg");
 image.Mutate(x => x.Resize(image.Width / 2, image.Height / 2));
 image.Save("result.jpg");
@@ -256,11 +263,11 @@

A powerful feature set

  • - Complete support for jpeg, bmp, gif, pbm, png, tga, tiff, and webp with more + Complete support for jpeg, bmp, gif, pbm, png, tga, tiff, webp, and qoi with more formats on the way.
  • Supports over 25 different pixel formats.
  • -
  • Metadata editing support (IPTC EXIF).
  • +
  • Metadata editing support (IPTC EXIF, XMP).
  • Colorspace transforms (RGB/CMYK/Grayscale/CIELab and many more). @@ -277,17 +284,12 @@

    A powerful feature set

    using SixLabors.ImageSharp.Formats.Gif;
     using SixLabors.ImageSharp.Metadata;
     
    -const int frameDelay = 42;
    -const int colorTableLength = 128;
    -const GifDisposalMethod disposalMethod = GifDisposalMethod.RestoreToBackground;
    -
    -using var image = await Image.LoadAsync("original.gif");
    +using Image image = await Image.LoadAsync("original.gif");
     foreach (ImageFrame frame in image.Frames)
     {
       GifFrameMetadata metaData = frame.Metadata.GetGifMetadata();
    -  metaData.FrameDelay = frameDelay;
    -  metaData.ColorTableLength = colorTableLength;
    -  metaData.DisposalMethod = disposalMethod;
    +  metaData.FrameDelay = 42;
    +  metaData.DisposalMethod = GifDisposalMethod.RestoreToBackground;
     }
     
     await image.SaveAsync("result.gif");