namespace NVGIF - NVGIF C# Implementation¶
Source: csharp/NVGIF.cs
The C# implementation of NVGIF requires System.Drawing.Common. It is Windows‑specific, supports v1–v4, and can only decode NVGIF files.
Example usage: csharp/NVGIFTest.cs.
- class NVGIF¶
An NVGIF decoder. Supports v1–4.
Example
Decode an NVGIF and save it as PNG:
using System;
using System.Drawing; // for Bitmap
using System.Drawing.Imaging; // for ImageFormat
using System.IO;
class Program
{
static void Main(string[] args)
{
byte[] bytes = File.ReadAllBytes("../images/drawing.nvg4");
Bitmap bmp = NVGIF.NVGIF.Decode(bytes);
bmp.Save("decoded.png", ImageFormat.Png);
Console.WriteLine("NVGIF decoded!");
}
}