Hi, folks!

Aaron Ardiri wrote:

but i am not able to do it. Can anybody help me out in storing bitmap to datbase and read it to display image. I am using gcc, pilrc, prc tools. OR is there any

in your .rcp file - declare a bitmap resource:
[...]
  DmGetResource
  MemHandleLock
  WinDrawBitmap
  MemHandleUnlock
  DmReleaseResource

I'm writing a Japanese trainer and looked for a method to display large images of kanji (kanji are the Chinese characters used in Japanese). I tried the Way Of The Resource and created a large (7000 Tbmp records) resource database with a Java app but found out that displaying the images was /ridiculously/ slow on PalmOS 3.1 even if the resource database is opened at program start. So I modified the Java app and created a "normal" database with image records that didn't contain the image headers. In the app I created the image on the fly and copied the image data from the database into the dynamically created image. This method was /way/ faster. In fact, while you had to wait for the image half a second with the resource method, the display of the dynamically created image was much faster - even though the algorithm for the resource method is O(1) (as seen above) and O(n*m) for the dynamical version because you have to copy the data. I guess the lookup is more expensive for resources. A side effect is reduced database size (in my case: 2,1 MB vs. 2.9 MB). Of course you have to use the resource method if you have images of variable size.


Matthias

--
Upcoming GPL'd PalmOS Japanese trainer: http://hotaru.sf.net


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to