A IndexColorModel is used to represent the color table of a GIF image.

    // Get GIF image
Image image = new ImageIcon("image.gif").getImage(); // Get the color model; this method is implemented in
// e662 取的图像的色彩模型
IndexColorModel colorModel = (IndexColorModel)getColorModel(image); // Get transparent pixel
int trans = colorModel.getTransparentPixel();
if (trans == -1) {
// There is no transparent pixel
} // Get the number of colors
int numColors = colorModel.getMapSize();
Related Examples

最新文章

  1. VS2013开启滚动条缩略图和双击选中高亮,效果杠杠滴!
  2. 从DataGridView导出Excel
  3. Cassandra 配制 cassandra.yaml
  4. Func 委托
  5. DeDeCMS中如何实现下拉菜单
  6. git archive
  7. Python 解LeetCode:654. Maximum Binary Tree
  8. Linux学习之CentOS(十六)-----内存置换空间(swap)之建置(转)
  9. 使用python对py文件程序代码复用度检查
  10. Android利用Intent与其他应用交互
  11. 解决在ubuntu上启动的django项目在windows进行访问无法访问的问题
  12. css的几个小技巧
  13. PE就是市盈率的缩写 PB是平均市净率的缩写
  14. python之装饰器(decorator)
  15. Java 多态 ——一个案例 彻底搞懂它
  16. 2017-2018-2 20155303『网络对抗技术』Exp8:Web基础
  17. this指针和const成员函数
  18. Linux系统中切换用户身份su与sudo的用法与实例
  19. Hive基础之排序
  20. Apache-一个IP多个主机域名

热门文章

  1. python中logging模块的使用
  2. DOA——ESPRIT算法
  3. JavaScript使用小技巧
  4. php长链接
  5. ps抠图
  6. Apache2.2配置小结.
  7. [na]wireshark添加显示ip.id列
  8. python 开发在线音乐播放器-简易版
  9. [转帖]cocos2D-X源码分析之从cocos2D-X学习OpenGL(3)----BATCH_COMMAND
  10. iphone6主板注释