This is a cross-platform rendering engine for drawing text and graphics. It is based on SkiaSharp and exposes an object model similar to, and interoperable with, classes from GcImaging.
Install
| Product | Versions |
|---|---|
| .NET Standard | |
| Other |
README
GrapeCity Documents for Imaging - Skia
This library is a cross-platform rendering engine for drawing text and graphics. It is based on SkiaSharp and exposes an object model similar to, and interoperable with, classes from GcImaging.
The main classes in this library are GcSkiaBitmap, GcSkiaImage, and GcSkiaGraphics, and can be used instead of their counterparts from GcImaging.
GcSkiaBitmap represents a bitmap in CPU memory. It works similar to GcBitmap, but internally encapsulates an instance of SKBitmap object from SkiaSharp. GcSkiaBitmap can load and save images in JPEG, PNG, and WEBP formats. A GcSkiaBitmap can be converted to a GcBitmap or GcSkiaImage, and vice versa. To draw on a GcSkiaBitmap, call the CreateGraphics() method which returns an instance of the associated GcSkiaGraphics that can be used for drawing.
GcSkiaImage represents an immutable image based on SKImage. It is a lightweight version of GcSkiaBitmap which does not support modifications. A GcSkiaImage can be loaded and saved to the same formats as GcSkiaBitmap. It can also be converted to GcBitmap or GcSkiaBitmap. Both GcSkiaImage and GcSkiaBitmap implement the IImage interface and so can be rendered on an instance of any class derived from GcGraphics.
GcSkiaGraphics is the drawing class derived from GcGraphics. An instance of GcSkiaGraphics can be created directly or from a GcSkiaBitmap. If the GcSkiaGraphics instance was created from a GcSkiaBitmap, it can be disposed when all drawing is done. If the GcSkiaGraphics instance was created directly, ToSkiaImage() or ToGcBitmap() methods can be called on it to get a snapshot of the current drawing.
If drawing text to multiple instances of GcSkiaGraphics make sure to create a single SkiaFontCache object and assign it to the FontCache property of all those instances.
This library is compatible with .NET 7, .NET 6, .NET Core 3.1, .NET Standard 2.x, .NET Framework 4.6.1 or higher.
All features are fully supported on Windows, macOS and Linux.
Resources
- GcImaging Live Demos
- Getting Started
- License Information
- Licensing FAQ
- How to get Trial Keys
- Online Documentation
- Offline Documentation (PDF)
GrapeCity Document APIs
- Documents for PDF
- Documents for Word
- Documents for Imaging
- Documents for Excel, .NET
- Documents for Excel, Java
GrapeCity Document JavsScript Viewers
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.