gpt4 book ai didi

c - 使用 pixbuf 显示像素缓冲区

转载 作者:行者123 更新时间:2023-11-30 16:03:42 25 4
gpt4 key购买 nike

我有一个像素值缓冲区。是否可以使用 gtk 中的 pixbuf 将缓冲区显示为图像。我将使用c语言。

最佳答案

是的,看看这个函数:

gdk_pixbuf_new_from_data ()

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);

(在 docs 中)

关于c - 使用 pixbuf 显示像素缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3805771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com