On Sun, Nov 15, 2009 at 1:41 AM, Jack W <[email protected]> wrote: > Hi Ian, > > Thank you very much for your response! But what does *"ret_pitch"* stand > for and how to traverse the raw data? I did not find the description of > ret_pitch. Do you know any example? Thanks again. > > -Jack > > > > > --- On *Sat, 11/14/09, Ian Harrold <[email protected]>* wrote: > > > From: Ian Harrold <[email protected]> > Subject: Re: [directfb-users] how to change color on a pixel > To: "Jack W" <[email protected]> > Cc: [email protected] > Date: Saturday, November 14, 2009, 3:23 PM > > > > http://www.directfb.org/docs/DirectFB_Reference_1_3/IDirectFBSurface_Lock.html > > You'll need to "lock" the surface which will return the raw data. Then > traverse the data to the correct pixel. Then "unlock" the surface. > > http://www.directfb.org/docs/DirectFB_Reference_1_3/IDirectFBSurface_Unlock.html > > --Ian > > On Sat, Nov 14, 2009 at 10:48 AM, Jack W > <[email protected]<http://mc/[email protected]> > > wrote: > >> Hi, >> >> I created a surface by loading a jpg image. I am wondering how to change >> the color of a specified pixel? Thanks a lot for any help. >> >> -Jack >> >> >> _______________________________________________ >> directfb-users mailing list >> [email protected]<http://mc/[email protected]> >> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users >> >> > > -----Inline Attachment Follows----- > > > _______________________________________________ > directfb-users mailing list > [email protected]<http://mc/[email protected]> > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users > > > What is returned is an array. But generally... pixel [8][9]... i.e. row 8, column 9 would be at array position data[9+imagewidth*8] as an example.
pixel pitch should be the pixel byte alignment in memory. Someone can correct me if I am wrong.
_______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
