Skip to content

VITechnologies/g-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G-Image

A cross-platform LabVIEW library for loading, saving, and processing images.

What's New? - Features - Installation - Usage - Building - Comparison - License - Acknowledgments

What's New?

  • Support for reading PCX images
  • Save GIF and animated GIF to memory (issue #3)
  • Support GIF and animated GIF transparency (issue #6)
    • Transparency taken from LabVIEW image mask or alpha channel
  • Set animated GIF loop count (issue #7)
Changed VIs
  • Indexed Color To True Color.vi renamed to To True Color.vi
    • VI supports converting 24-bit image + mask input to 32-bit ARGB output
  • True Color To Indexed Color.vi renamed to To Indexed Color.vi
  • Removed Dither option from Save GIF Image.vi and Save Animated GIF Image.vi
    • Image will always be dithered

Features

  • Load images from file or from memory in a range of formats, including:
    • PNG, JPEG, BMP, GIF, Animated GIF, TGA, SVG, PSD, HDR, PIC, PNM, QOI, PCX
  • Save images to file or to memory in a range of formats, including:
    • PNG, JPEG, BMP, GIF, Animated GIF, TGA, QOI
  • Basic image processing functions:
    • Resize
    • Rotate
    • Flip
    • Quantize (True Color to Indexed Color)

Installation

G-Image is published on vipm.io, and can be installed using VI Package Manager (VIPM). The packages are also available as github releases and can be installed manually using VIPM.

Usage

See the example VIs in Examples to load, save, and process images.

Unit tests are included and can be run individually, or with the AST Unit Tester.

Building

TBD

Comparison

Image Loading

In addition to loading the formats below from a file, G-Image supports loading images directly from memory.

Format G-Image LabVIEW Picture Functions
PNG ✔️¹ ✔️
JPEG ✔️ ✔️
BMP ✔️¹ ✔️³
GIF ✔️¹
Animated GIF ✔️¹
TGA ✔️
SVG ✔️²
PSD ✔️
HDR ✔️
PIC ✔️
PNM ✔️
QOI ✔️
PCX ✔️¹

¹ Indexed color images (8-bit and below) are supported, but are converted to 24-bit or 32-bit images. This may change in future updates.

² Only vector paths are supported.

³ 32-bit images are unsupported.

Image Saving

In addition to saving the formats below to a file, G-Image supports saving images directly in memory.

Format G-Image LabVIEW Picture Functions
PNG ✔️¹ ✔️
JPEG ✔️ ✔️
BMP ✔️¹ ✔️
GIF ✔️ ✔️²
Animated GIF ✔️
TGA ✔️
QOI ✔️

¹ Indexed color images (8-bit and below) are supported, but are converted to 24-bit or 32-bit images. This may change in future updates.

² The GIF save function isn't in the palette, but can be found in <vi.lib>\picture\gif.llb\Write GIF File.vi. Only 8-bit images are supported, and are not compressed with LZW compression.

License

This library is built using public domain image libraries where possible. As such, this library is also made available in the public domain. See LICENSE for details.

Not all libraries used by G-Image are public domain, but are licensed using open source permissive licenses.

Acknowledgments

This library uses the following open source libraries. Massive thanks to these authors.

Library Author License
stb_image.h Sean Barrett Unlicense / MIT
stb_image_write.h Sean Barrett Unlicense / MIT
stb_image_resize.h Sean Barrett Unlicense / MIT
miniz¹ Rich Geldreich Unlicense
gif-h Charlie Tangora Public Domain
nanosvg Mikko Mononen zlib
qoi Dominic Szablewski MIT
dr_pcx David Reid Public Domain
msf_gif notnullnotvoid Public Domain

¹ The linked version is public domain, and is the version used in G-Image. Newer versions of miniz are MIT licensed.

About

A LabVIEW image library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.7%
  • LabVIEW 4.7%
  • C++ 2.6%