当前位置:网站首页>gtk显示4通道rgba图像
gtk显示4通道rgba图像
2022-08-01 17:10:00 【百口可乐__】
gdk_pixbuf_new_from_data读取读取未压缩的RGB数据并返回GdkPixbuf指针
原型:
GdkPixbuf *gdk_pixbuf_new_from_data(const guchar *data,
GdkColorspace colorspace, gboolean has_alpha,
int bits_per_sample, int width, int height, int rowstride,
GdkPixbufDestroyNotify destroy_fn,
gpointer destroy_fn_data);
data 指向图像数据区。这个数据区应该应该是按照从上到下、从左到右排列的像素点数据(不包含图像文件的头),并且每个象素点按照 RGB 的顺序排列(如果不是这样,需要首先调整好这些图像数据)。
colorspace 是固定的,为 GDK_COLORSPACE_RGB。
has_alpha 图像无 alpha 通道的话,可以代入 FALSE。
bits_per_sample 是固定的,为 8。
width, height 是图像的实际大小。
rowstride 是图像数据区中一行数据占有的内存大小(单位:字节)。和图像宽度 width 有这样的关系:rowstride >= width。由于内存对其的原因,有时 rowstride > width,这样,每行后面都多出一些没有使用到的内存空间。
You must calculate and pass in a rational row stride for the pixel buffer you’ve created. The pixel buffer is really only a one-dimensional ar
边栏推荐
- MySQL's maximum recommended number of rows is 2000w, is it reliable?
- The site is not found after the website is filed. You have not bound this domain name or IP to the corresponding site! The configuration file does not take effect!
- 2022年深圳市临床医学研究中心申请指南
- Vulnhub target drone: HARRYPOTTER_ NAGINI
- 棕榈油罐区数字化转型
- AntDB数据库亮相24届高速展,助力智慧高速创新应用
- 【R语言】线性混合模型进行重复测量设计分析
- 比对软件-blastN结果详解
- 工业制造行业的低代码开发平台思维架构图
- MySql 怎么查出符合条件的最新的数据行?
猜你喜欢
随机推荐
LeetCode第 303 场周赛
插入排序 优化插入排序
06 redis 集群搭建
SQL函数 TO_CHAR(三)
第一次改开源中间件keycloak总个结
今年最火爆的词:商业分析,看这一篇就够了!
参观首钢园
Winform的UI帮助类——部分组件会使用到DevExpress组件
C#中关于DevExpress的常用操作和帮助类项目工程内容说明
访问域名直接访问wordpress
DataTable Helper Class for C#
MySQL 慢查询
Unity ui点击事件只响应最上层ui的方式
zabbix部署和简单使用
Complete knapsack problem to find the number of combinations and permutations
The untiy Resources directory dynamically loads resources
金仓数据库 KDTS 迁移工具使用指南(3. 系统部署)
【黑马早报】胡军代言悟空理财涉嫌欺诈,疑似涉及390亿元;涪陵榨菜回应榨菜吃出脚指甲; 鸿星尔克再捐1个亿;腾讯控股股价跌回5年前...
Bugku-Misc-贝斯手
下载 | 谷歌科学家Kevin P. Murphy发布新书《概率机器学习:高级主题》