Re: [Tuxpaint-devel] some more investigation on grass plugin
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Alessandro P. <apa...@gm...> - 2007-12-12 16:39:44
|
2007/12/12, Albert Cahalan <aca...@gm...>: > On Dec 11, 2007 12:24 PM, Alessandro Pasotti <apa...@gm...> wrote: > > 2007/12/11, Albert Cahalan <aca...@gm...>: > > > On Dec 10, 2007 10:53 AM, Alessandro Pasotti <apa...@gm...> wrote: > > > > > > > the api passes to the plugin a getpixel function pointer chosen from > > > > the getpixels pool with the canvas color depth, which could be > > > > different from the color depth of the image. > > > > > > > > Since I'm running the test in a Xephyr maemo SDK emulator, the color > > > > depth is probably lower than a standard true color X display. > > > > > > Maybe we need two getpixel functions. Maybe we need to go > > > back to the old way, where the getpixel function looks at the > > > surface to determine the type. > > > > Thanks Albert for the insight, so do you agree that we have a bug here? > > Sure. Do we have a bug tracking system and should I file this bug? [...] > > The strange thing is that the previous version .17 is working fine on > > this device (just a bit slow with grass tool). > > Probably you changed VIDEO_BPP. No, everything is the same SDK and same color depth. > > Maybe VIDEO_BPP should always be 32. > That's 8:8:8 with padding for alignment. > Lots of things can be simplified this way. > BTW I managed to make it work (quick and dirty hack): in grass.c #include "../../src/pixels.h" then adjusted magic makefile to link pixels.o and used getpixel32 on grass image instead of the getpixel passed by the plugin api. I'm complete newbie in SDL, but perhaps a good solution would be to have a generic getpixel function wrapper and let this function decide which getpixelXX function to call depending on the image type, is this possible? What do you think? -- Alessandro Pasotti w3: www.itopen.it |