Coder Social home page Coder Social logo

zigimg's Introduction

Zig Image library

This is a work in progress library to create, process, read and write different image formats with Zig programming language.

License Issue Commit CI

Install & Build

This project assume current Zig master (0.10.0+) with stage2 self-hosted compiler.

Use zigimg in your project

How to add to your project:

  1. Clone this repository or add as a submodule
  2. Add to your build.zig
exe.addPackagePath("zigimg", "zigimg/zigimg.zig");

Test suite

To run the test suite, checkout the test suite and run

  1. Checkout zigimg
  2. Go back one folder and checkout the test suite
  3. Run the tests with zig build
zig build test

Supported image formats

Image Format Read Write
ANIM
BMP ✔️ (Partial)
GIF
ICO
IILBM
JPEG
PAM
PBM ✔️
PCX ✔️
PGM ✔️ (Partial) ✔️ (Partial)
PNG ✔️ ✔️ (Partial)
PPM ✔️ (Partial)
QOI ✔️ ✔️
TGA ✔️
TIFF
XBM
XPM

BMP - Bitmap

  • version 4 BMP
  • version 5 BMP
  • 24-bit RGB
  • 32 RGBA
  • Doesn't support any compression

PBM - Portable Bitmap format

  • Everything is supported

PCX - ZSoft Picture Exchange format

  • Support monochrome, 4 color, 16 color and 256 color indexed images
  • Support 24-bit RGB images

PGM - Portable Graymap format

  • Support 8-bit and 16-bit grayscale images
  • 16-bit ascii grayscale loading not tested

PNG - Portable Network Graphics

  • Support all pixel formats supported by PNG (grayscale, grayscale+alpha, indexed, truecolor, truecolor with alpha) in 8-bit or 16-bit.
  • Support the mininal chunks in order to decode the image.
  • Not all images in Png Test Suite is covered but should be good enough for now.

PPM - Portable Pixmap format

  • Support 24-bit RGB (8-bit per channel)
  • Missing 48-bit RGB (16-bit per channel)

QOI - Quite OK Image Format

TGA - Truevision TGA format

  • Supports uncompressed and compressed 8-bit grayscale, indexed with 16-bit colormap, truecolor with 24-bit or 32-bit bit depth.

zigimg's People

Contributors

alexnask avatar andrewrk avatar exonorid avatar guigui220d avatar igor84 avatar infinitybeond1 avatar joachimschmidt557 avatar leecannon avatar masterq32 avatar mlarouche avatar nektro avatar praschke avatar sin-ack avatar srekel avatar thejoshwolfe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.