On Sun, 16 Jan 2005, Laurence J. Lane wrote: > According to upstream, imlib2 does not use the alpha channel by > default on new images. The alpha channel has to be enabled > explicitly. (That's done with imlib_image_set_has_alpha() as far as > I can tell. And I see no mention of that function in > libimage-imlib2-perl-1.02/lib/Image/Imlib2.xs.)
What they should really do instead is then return values from query_pixel with the alpha channel set to opaque, which is 255, instead of just whatever random value the alpha channel is set to. There probably should also be an error if you attempt to draw with an alpha value set to an image that doesn't have an alpha channel. > The return value being tested is apparently garbage without an alpha > channel. I can't guess why it works with the earlier version of > imlib2. This seems to be the first version where they've actually bothered to "optimize" the drawing functions based on whether or not the image has an alpha channel. [That, and I really don't understand why the images would default to not having an alpha channel when you're allocating 32 bits per pixel anyway.] Don Armstrong -- <Clint> why the hell does kernel-source-2.6.3 depend on xfree86-common? <infinity> It... Doesn't? <Clint> good point http://www.donarmstrong.com http://rzlab.ucr.edu -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]