Re: More problems with gdk-pixbuf [UPDATE]



> > Now I've got this test code. What it ought to output is a window with
> > a 4 by 4 grid of the xpm in title_xpm. Instead, the resulting image
> > is somewhat garbled. If someone could compile it with
> 
> >                         gdk_pixbuf_copy_area(title, 0, 0,
> >                                              gdk_pixbuf_get_width(title),
> >                                              gdk_pixbuf_get_height(title),
> >                                              display, i * 8, j * 8);
> 
> I've isolated the problem to this function. Apparently, if the x and y
> coordinate on the destination pixbuf is not (0, 0), the copy messes up
> and garbles what gets copies onto the destination pixbuf. I've tried both
> 0.6.0 and 0.7.0 of gdk-pixbuf. Has anyone else noticed this?

I did some more experimenting: I replaced the copy_area function with
its contents in the source, which is:

                        gdk_pixbuf_scale(title, display,
                                         i * 8, j * 8,
                                         gdk_pixbuf_get_width(title),
                                         gdk_pixbuf_get_height(title),
                                         i * 8, j * 8, 1, 1,
                                         GDK_INTERP_NEAREST);

Of course, it produced the same garbled output. Then I replaced
GDK_INTERP_NEAREST with the other possible options, namely TILES,
BILINEAR, and HYPER, I got different results. Namely, in everything but
the NEAREST mode, nothing but the top left copy of title appeared. And
in NEAREST mode I got the usual garble.

Help!

	= L

/-------------------------------------------------------------------\
|   LOBAN AMAAN RAHMAN  <-- anagram of -->  AHA! AN ABNORMAL MAN!   |
|  MSC #763, Caltech, Pasadena, CA 91126, USA. Tel: 1-626-395-1407  |
|     loban@earthling.net, loban@caltech.edu, http://i.am/loban     |
\-------------------------------------------------------------------/




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