The following code does it:
// your original data assumed to be in a continous structure of gray.
// Preferably in a structure.
float *src_buf;
int img_width = 256;
int img_height = 256;
// You destination
GdkPixbuf *dst = gdk_pixbuf_new(...);
guint8 *dst_buf = gdk_pixbuf_get_data();
guint src_st
Thanks for reply.
Can you please elaborate more on Converting More than 8bit image to 8
bit image.
And, apart from GtkImageView, is there no other way of image scaling?
Thanks
Gorav
On 02/03/2010 12:02 PM, Dov Grobgeld wrote:
Even if your image has more than eight bits you can always con
Even if your image has more than eight bits you can always convert it to
8-bit according to a user setting defining the grey level max and min to be
used for the convertion (known as window and level in the medical image
community). That's exactly how I do it in my image viewer giv. The image is
he
On Tue, 2010-02-02 at 17:25 +0530, Gorav wrote:
> Hi
>
>
> I need to do some image manipulation using GTK, and I want to view some
> proprietary image formats. So, I can prepare RGB data. But, which widget
> and API to be use to draw pixels on screen.
>
>
> I used GtkImage using Pixbuf, but i