Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

smack0007/ImageDotNet

Repository files navigation

The MIT License Actions Status NuGet Badge

ImageDotNet

A library for loading and saving images in .NET.

Goals

The goal of the library is to serve a purpose similar to stb_image and stb_image_write except written in C#. The goals include:

  • Loading images.
  • Writing images.
  • Converting between different pixel formats.

Example

// Load image.png and ensure the pixel format is Rgba32.
var image = Image.LoadPng("image.png").To<Rgba32>();

// Get a pointer to the image data and pass it to glTexImage2D.
using (var data = image.GetDataPointer())
{
	glTexImage2D(GL_TEXTURE_2D, 0, (int)GL_RGBA, image.Width, image.Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (void*)data.Pointer);
}

Credits

Thanks to:

About

Image library for reading and writing images in pure C#.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •