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