当前位置:网站首页>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
边栏推荐
- 夸克网盘资源站
- Live tonight!
- 力扣每日一题-第45天-697. 数组的度
- Financial products with high annualized returns
- 05 doris 集群搭建
- 网上开户佣金万一靠谱吗,网上开户安全吗
- 阿里官方 Redis 开发规范
- [Dark Horse Morning Post] Hu Jun's endorsement of Wukong's financial management is suspected of fraud, which is suspected to involve 39 billion yuan; Fuling mustard responded that mustard ate toenails
- 【R语言】对图片进行裁剪 图片批量裁剪
- 08 spark 集群搭建
猜你喜欢
随机推荐
JumpServer堡垒机部署
实现mnist手写数字识别
力扣每日一题-第45天-697. 数组的度
Detailed explanation of the working principle of crystal oscillator
06 redis cluster structures
夸克网盘资源站
快速抽取resnet_v2_152中间的特征层
Path helper class for C#
云商店携手快报税,解锁财务服务新体验!
谁还敢买影视股?
好家伙,公司服务器直接热崩掉了!
ROS2支持技术:DDS简述
关于Mysql服务无法启动的问题
C#Excel帮助类
SQL函数 TO_CHAR(三)
金仓数据库KingbaseES安全指南--6.5. LDAP身份验证
第一次改开源中间件keycloak总个结
晶振工作原理详解
zabbix部署和简单使用
LeetCode Week 303








