tbyxyz

统计

留言簿

阅读排行榜

评论排行榜

不错的C++图像库DevIL

在使用CxImage显示gif文件时,发现CxImage解一个299帧的gif动画,在debug的时候花了好几时秒,
CxImage
在处理gif时效率太低了。
在网上搜索了一些,支持比较强的图像库:
imageMagick--
非常强大,在MFC中不好用,要把图片显示到窗口非常麻烦,至少目前没有发现在Windows窗口中显示的方法,还得加一堆乱七八糟的dll

还是DevIL比较好使一点,感觉DevIL封装的不是很好,全局变量太多,多线程操作极不安全。用C++在封装一下,可能就好使一点。

附:

DevIL Feature List

Supports loading of:

  • .bmp
  • .cut
  • .dcx
  • .dds
  • .ico
  • .gif
  • .jpg
  • .lbm
  • .lif
  • .mdl
  • .pcd
  • .pcx
  • .pic
  • .png
  • .pnm
  • .psd
  • .psp
  • .raw
  • .sgi
  • .tga
  • .tif
  • .wal
  • .act
  • .pal
  • .hdr
  • Doom graphics

Supports saving of:

  • .bmp
  • .dds
  • .jpg
  • .pcx
  • .png
  • .pnm
  • .raw
  • .sgi
  • .tga
  • .tif
  • .pal
  • .hdr

Library Features

  • Portable, supports Windows, Mac OS X and *nix.
  • OpenGL-style syntax.
  • Use of image names instead of ugly pointers.
  • Loading from files, file streams or memory "lumps".
  • Direct access to data through ilGetData() and ilSetData().
  • Support for luminance, rgb(a), bgr(a) and colour-indexed images.
  • Support for 3 different numbers of bits per channel.
  • Conversion between all formats and datatypes (including palettes).
  • User-defined automatic conversions if desired when loading images.
  • Automatic conversion when saving images if needed.
  • Automatic conversion of colour-indexed images to truecolour images if desired.
  • Controllable compression when saving.
  • Maintains a state stack that can be pushed and popped.
  • Full support for 3d texture volumes (3d images).
  • Validation of images.
  • Support for layers.
  • Support for mipmaps.
  • Support for animations.
  • User-specified clear colour.
  • Can load a default image if loading fails.
  • User-specified hints.
  • Use of key colours.
  • Support for overlaying an image on top of another.
  • Allows the user to specify their own loading and saving callbacks, even overriding the default ones.
  • Support for user-specified read and write functions.
  • Delphi support.
  • Visual Basic support.
  • Linux support.
  • Can pick and choose which features will be used to create smaller dlls.
  • Choose whether to use the Intel Jpeg Library or libjpeg.
  • A whole host of effects and filters to apply to images, such as embossing and edge detection.
  • Images can be resized or even be put on a larger background (enlarged canvas).
  • OpenGL, Allegro, Windows GDI and DirectX API support.

 


posted on 2008-01-15 17:17 hosea 阅读(4648) 评论(5)  编辑 收藏 引用

评论

# re: 不错的C++图像库DevIL 2008-01-15 18:10 tmp

比freeImage如何?  回复  更多评论   

# re: 不错的C++图像库DevIL 2008-01-15 18:32 键盘的咏叹调

在jpg上devil 不如freeimage,
不过devil 更加偏重于游戏设计使用,
包括保存图片的字节序,接口设计上比freeimage更好用些  回复  更多评论   

# re: 不错的C++图像库DevIL 2008-01-16 22:37 空明流转

FreeImage很强大。
而且FreeImage也非常好用。不存在接口不好用的问题啊。  回复  更多评论   

# re: 不错的C++图像库DevIL[未登录] 2008-01-18 13:14 kevin

ogre在纹理处理上已经抛弃devil改用freeimage了  回复  更多评论   

# re: 不错的C++图像库DevIL 2011-10-26 16:10 程序员他爷爷!!

@kevin
不应该是抛弃,而是和DevIL协议不同吧。。。
要调查清楚哦~

@键盘的咏叹调
对于Jpg来讲,DevIL可以使用IJL,为什么说jpg上DevIL不如FreeImage呢??说不通啊。


DevIL比较简洁,C接口的。

不用和别人比较什么,各有优缺点,只是DevIL相对多些。哈哈

  回复  更多评论   


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理