[Xcb] XCBImage

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Mon Mar 14 22:43:09 PST 2005

On Mon, 14 Mar 2005, Jamey Sharp wrote:

> On Tue, Mar 15, 2005 at 12:23:58AM +0100, Vincent Torri wrote:
> > i've attached an attempt. If you think it's good, could someone put it in
> > cvs ?
> It looked great, except for XCBImage_Destroy; so I removed the
> underscore. Also I updated the test apps for the API change.

yes, i was tired (and lazy: i copy/pasted)

> > It seems that my account is not created yet. Or else i have a wrong
> > password. So i can't commit.
> Huh, you're right: you and Jeremy still don't have accounts. I guess
> it's only been a week since we actually asked for them, but if the fd.o
> admins are going to limit root privileges they should at least respond
> to account creation requests.
> > I've also changed some declarations of variables, so that it respects ANSI
> > (C89) norm (no affectation during declaration)
> I don't understand. Variables are allowed to be initialized in their
> declarations under C89. I just tried compiling with "-ansi -pedantic",
> and aside from the "inline" keyword being disallowed there were no
> warnings or errors in xcb_image.c. (There were several warnings that we
> probably should fix in the test programs, though.)
> So I'm not committing this change right now. If you think it's important
> let's discuss it.

i've looked at the norm and there is no problem with that, actually. I
don't know where i've read/listen that.

anyway, i prefer separate declaration and initialization. I know that i've
read something about that, but i can't remember what it is.

for the test programs, i'm writing a small app that should load a png
file, display it in a window and create a new small window that displays a
zoom of a part of the image around the mouse pointer. That should be
enough to show how to use (put/get)image and (put/get)pixel. I'll try to
use shm also.

> I notice you also changed GetPixel and PutPixel to take INT16s instead
> of ints for the x and y coordinates. I think that's probably a bad idea.
> People might want to deal with images larger than 64k pixels wide or
> tall. So I'm not committing it yet either, but I'll happily listen to
> arguments.

yes, you're right. Using INT32 is enough ? (i try to use only X defined
type at most as posible)

> > > Have you had a chance to look over my changes to XCBImage? I think if
> > > you look at get_pixel_generic and put_pixel_generic you'll know about as
> > > much as I do about how XYPixmap image formats work.
> >
> > Yes, i had. I don't understand very well, but, he, i'm tired right now.
> Get some sleep, man. :-)

Done :)


More information about the xcb mailing list