推薦一個c++小巧開源且跨平台的圖像解碼庫,開源圖像解碼庫
該圖像解碼庫僅僅三個文件。
圖像處理封裝:
spot.cpp
spot.h
解碼庫實現:
spot.c
支持圖片文件格式如下:
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
授權協議:
- 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).
該項目地址:
https://github.com/r-lyeh/spot
由於該解碼庫加載圖像默認會轉換hsla色域,故本人對其進行了優化,並且修正了一部分解碼庫的bug。
修改版下載:
http://files.cnblogs.com/files/tntmonks/Spot20150928_opi.7z