推荐一个c++小巧开源且跨平台的图像解码库

该图像解码库仅仅三个文件。

图像处理封装:

spot.cpp

spot.h

解码库实现:

spot.c 

支持图片文件格式如下:

File formatReadWrite
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。

修改版下载:

https://files.cnblogs.com/files/tntmonks/Spot20150928_opi.7z

posted @ 2015-10-21 10:02  cpuimage  阅读(1935)  评论(0编辑  收藏  举报