rescaling for display



Hi,

I have built a GTK1.2 based application in which I want to display
images to the screen in an GdkDrawingArea. I have declared:

guchar my_img[MY_WIDTH * MY_HEIGHT * 3];

and I display the in the GDHDrawingArea with 'gdk_draw_rgb_image"

e.g.: gdk_draw_rgb_image (widget->window,
widget->style->fg_gc[GTK_STATE_NORMAL],
	0, 0, MY_WIDTH, MY_HEIGHT,
		GDK_RGB_DITHER_MAX, my_img, MY_WIDTH * 3);

This works fine for images that are of the size MY_WIDTH * MY_HEIGHT. Is
there a way to rescale images before displaying them ? In this way of
using a "guchar" type buffer, the "images" are read into a static
buffer, which is not very flexible.

Best regards,

Peter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]