当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
个人日记
C # Excel helper classes
[ACNOI2022]物品
02 es 集群搭建
【黑马早报】胡军代言悟空理财涉嫌欺诈,疑似涉及390亿元;涪陵榨菜回应榨菜吃出脚指甲; 鸿星尔克再捐1个亿;腾讯控股股价跌回5年前...
06 redis cluster structures
Financial products with high annualized returns
SQL函数 TO_CHAR(一)
请问数据库中报错信息如下,mongoshake 有什么配置的方式解决这种大消息问题吗?
浅谈大数据背景下数据库安全保障体系
今晚直播!
沈腾拯救暑期档
11 一发布就发布一系列系列
Xingtu has been short of disruptive products?Will this M38T from the Qingdao factory be a breakthrough?
关于2022年深圳市福田区支持高端服务业发展项目的申报通知
2022强网杯CTF---强网先锋 ASR wp
酷逼了 Pathetic Dog 第 304 场周赛
下载 | 谷歌科学家Kevin P. Murphy发布新书《概率机器学习:高级主题》
Pytorch|GAN在手写数字集上的复现
11 Publish a series as soon as it is released








