Skip to content

SolitudeSF/imageman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imageman

Rudimentary image manipulation framework.

Some things may or may not work correctly.

Check examples directory for short demonstration.

Why

To have some boilerplate for recreational programming with images. Manipulate. Images.

Projects using imageman

diffimg - image diffing tool and library.

blurhash - blurhash algorith implementation.

Installation

nimble install imageman

Backends

libjpeg(-turbo)

  • Activated with imagemanLibjpeg flag. Enabled by default.
  • SIMD accelerated JPEG encoder/decoder.
  • Dynamically linked. Requires dll/so/dylib at runtime.

libpng

  • Activated with imagemanLibpng flag. Enabled by default.
  • Fast PNG encoder/decoder (outperforms stb_image).
  • Dynamically linked. Requires dll/so/dylib of itself and zlib at runtime.

stb_image

  • Activated with imagemanStb flag. By default only enabled if libjpeg and libpng are disabled.
  • Supports reading and writing PNG, JPEG, BMP and TGA images but with limited control.
  • Header only - compiled in.

Features

  • Easy manipulation of individual pixel components
  • Image reading/writing
    • PNG using libpng
    • JPG using libjpeg(-turbo)
    • BMP
    • TGA
  • Color modes
    • ColorRGBU - 8bit uint 3 components
    • ColorRGBAU - 8bit uint 4 components
    • ColorRGBF - 32bit float 3 components
    • ColorRGBAF - 32bit float 4 components
    • ColorRGBF64 - 64bit float 3 components
    • ColorRGBAF64 - 64bit float 4 components
    • ColorHSL - 32bit float
    • ColorHSLuv - 64bit float, perceptually uniform, unlike normal HSL
    • ColorHPLuv - 64bit float RGB float components have valid range from 0 to 1. Hue range is 0..360. Saturation/Lightness range from 0 to 1.
  • Filtering
    • General convolutional kernel routine
      • Smoothing
      • Sharpening
      • Edge detection
      • Blur
    • Greyscale
    • Negative
    • Sepia
    • Quantization
  • Dithering
    • Some kernels
  • Resizing
    • Nearest neighbour
    • Bilinear
    • Trilinear
    • Bicubic
    • Lanczos
    • Catmull-Rom
    • Cubic Hermite
  • Drawing
    • Line
    • Circle
    • Ellipse
    • Bezier curve
  • Rotating
    • Vertically, Horizontally
    • Radial
  • Documentation

Examples

See examples directory.