A cross-platform LabVIEW library for loading, saving, and processing images.
What's New? - Features - Installation - Usage - Building - Comparison - License - Acknowledgments
- 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)
- 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
Ditheroption from Save GIF Image.vi and Save Animated GIF Image.vi- Image will always be dithered
- 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)
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.
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.
TBD
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.
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.
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.
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.
