Re: gdk_draw_gray_image problem
- From: John Cupitt ng-london org uk
- To: pvosta unionbio-eu com
- Cc: gtk-list gnome org
- Subject: Re: gdk_draw_gray_image problem
- Date: Thu, 28 Feb 2002 15:34:46 -0000
Hiya, almost exactly that code works for me, so I guess the problem must
be somewhere else :-(
Does testrgb work OK? If it does, what's that code doing that you're not
doing?
Peter Van Osta wrote:
> I ahve problem with "gdk_draw_gray_image". The code to display a
> greyvalue image is shown below. If I take gdk_draw_gray_image" out of
> the loop or reduce the number of loops below 3, either a solid grey
> image window display is shown (0 loops ) or only the lower half of the
> image (2 loops) ?
>
> Anyone any information about what is going wrong ( the test code is
> somewhat modified for clarity)?
>
> Best regards,
>
> Peter
>
>
> void xyz_rgb_display (GtkWidget *drawing_area, image *im )
> {
>
> int *p = NULL;
> guchar buf[WIDTH * HEIGHT * 3];
> gint i = 0, j = 0;
> gboolean dither = 1;
>
> p = image_data( im );
>
> for (j = 0; j < WIDTH * HEIGHT; j++)
> buf[j] = *p++;;
>
> for( i = 0; i < 3; i++ ){
> gdk_draw_gray_image (drawing_area->window,
> drawing_area->style->white_gc,
> 0, 0, WIDTH, HEIGHT,
> dither ? GDK_RGB_DITHER_MAX :
> GDK_RGB_DITHER_NONE,
> buf, WIDTH);
> }
> }
==========================================================
Aelbert Cuyp 13 February - 12 May 2002
For information and tickets:
http://www.nationalgallery.org.uk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]