Hi everyone,
wouldn't it be nice if some of who have already solved the bitmap processing problem to give us newbies a bit of help and show use some sample code that: 1) gets the ENTIRE header 2) the BITMAP bits 3) show the BITMAP on the device. 4) differences between low res and hi res bitmaps.... the OS has been deemed as a deas OS and we're still asking for help on how to display BITMAPS.... searching the web is no help..... anywho, just a thought.... Luis > Date: Fri, 27 Feb 2009 08:49:12 +0100 > From: michal.sel...@visicom.sk > Subject: Re: Copying Tbmp/tAIB resources -- not working? > To: palm-dev-forum@news.palmos.com > > the safest would be to use BmpGetSizes to obtain size of header and size of > data > so you will know how much you need to store. and as others wrote, you are > caching only (incomplete) header in your code, use BmpGetBits to get data > > Ryan Rix wrote: > > Hey guys, > > > > I am writing code to dynamically draw icons for an application launcher. > > I am using a linked list to store all of the entries of the launcher, > > which include both tAIB resource bitmaps (which are just BitmapType > > written to a resource, right?) and generic BitmapTypes, all stored as > > pointers in my node structure as a BitmapPtr icon. > > > > When I attempt to copy the resource to a static location in memory using > > > > newLink->icon=MemPtrNew( sizeof(BitmapType)); > > DmOpenRef ref=DmOpenDatabase(cn,id,dmModeReadWrite); > > MemHandle h = DmGetResource( 'tAIB', 1000 ); > > if(h){ > > BitmapPtr oldIcon = MemHandleLock(h); > > MemMove(newLink->icon, oldIcon, sizeof(BitmapType)); > > MemHandleUnlock(h); > > }else{ > > newLink->icon=NULL; > > } > > DmReleaseResource(h) > > > > I usually get crap written to the BitmapPtr and when I draw it with > > WinDrawBitmap I usually get either a crash or just crap drawn to the > > screen, I've yet to get a working icon. > > Does anyone have a clue why my code keeps crapping out like this? > > > > -- > > Thanks and best regards, > > Ryan Rix > > TamsPalm - The PalmOS Blog > > (623)-239-1103 <-- Grand Central, baby! > > > > Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica > > Sheffey - Class of 2009, Rest in peace. > > -- > For information on using the ACCESS Developer Forums, or to unsubscribe, > please see http://www.access-company.com/developers/forums/ _________________________________________________________________ Windows Liveā¢ Contacts: Organize your contact list. http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009 -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/