Skip to content
/ zigimg Public
forked from zigimg/zigimg

Zig library for reading and writing different image formats

License

Notifications You must be signed in to change notification settings

tuhats/zigimg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.7.0+a1fb10b76).

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");

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

zig build test

Supported image formats

Image Format Read Write
ANIM
BMP ✔️ (Partial)
GIF
ICO
IILBM
JPEG
PAM
PBM ✔️
PCX ✔️
PGM ✔️ (Partial) ✔️ (Partial)
PNG ✔️
PPM ✔️ (Partial)
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)

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.

About

Zig library for reading and writing different image formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Zig 99.9%
  • AMPL 0.1%