We recommend a small, open-source and cross-platform image decoding library and an open-source image decoding library.
The image decoding library contains only three files.
Image processing encapsulation:
Spot. cpp
Spot. h
Decoding library implementation:
Spot. c
The supported image file formats are as follows:
File format |
Read |
Write |
BMP files |
Yes |
Yes |
CRN files |
Yes |
No |
DDS DXT1/2/3/4/5 files |
Yes |
Yes |
GIF files |
Yes |
No |
HDR files |
Yes |
No |
JPG files (progressive) |
Yes |
No |
JPG files |
Yes |
Yes |
KTX (ETC1) files |
Yes * |
Yes * |
KTX (PVRTC) files |
Yes * |
No |
PIC files |
Yes |
No |
PKM (ETC1) files |
Yes |
Yes |
PNG files |
Yes |
Yes |
PNM (PPM/PGM) files |
Yes |
No |
PSD files |
Yes |
No |
PUG files |
Yes |
Yes |
PVR2 (PVRTC) files |
Yes * |
No |
PVR3 (ETC1) files |
Yes * |
No |
PVR3 (PVRTC) files |
Yes * |
Yes * |
SVG files (rasterized) |
Yes |
No |
TGA files |
Yes |
Yes |
WEBP files |
Yes |
Yes |
Authorization protocol:
- Spot (ZLIB license ).
- Crn2dds by r-lyeh, SpartanJ and Evan Parker (Public Domain ).
- Crnlib, by Rich Geldreich (ZLIB license ).
- DDS writer by Jonathan Dummer (Public Domain ).
- Etc1utils by Google Inc (Apache 2.0 license ).
- Etcpak by Bartosz Taudul (BSD-3 license ).
- Jpge by Rich Geldreich (Public Domain ).
- Libwebp by Google Inc (BSD license ).
- Lodepng by Lode Vandevenne (ZLIB license ).
- Nanosvg by Mikko Mononen (ZLIB license ).
- Pngrim alpha bleeding algorithm by F-Genesis (Public Domain ).
- Pug (Public Domain ).
- Pvrtccompressor by Jeffrey Lim (BSD-3 license ).
- Rg_etc1 by Rich Geldreich (ZLIB license ).
- Soil2 by Martin Lucas Golini and Jonathan Dummer (Public Domain ).
- Stb_image by Sean Barrett (Public Domain ).
- Unifont (ZLIB license ).
Project address:
Https://github.com/r-lyeh/spot
Because the image loaded by the decoder library will convert the hsla Color Gamut by default, I have optimized it and corrected some of the decoding library bugs.
Download the modified version:
Http://files.cnblogs.com/files/tntmonks/Spot20150928_opi.7z