A PocketC native palm library offering native forms and assorted utilities

Postby beta890 on Tue Jun 18, 2002 4:26 pm

Hello, could some one help me whith bitmap's! Iam makeing a simple picture game and for now just as a test i need a bitmap to show up on the screen but iam having no luck! Here is a bit of the source:

index = 0;

} // end main

What's rong is no bitmap will show on the screen, by the way iam using art bitmap to draw my bitmaps and pocketc 4.3.0 and PToolbox 7.3.6! The bitmap's name is "space" iam now wondering if i typed it rong or did it rong in art bitmap? because it wont load!
spaceBMP? space.prc? space.pbb none of these work and it changes the file name in C:/Palm all the time ie: spaceBMP do in artbitmap and than i look n C:/Palm and its space_bmp?
could some one please type a working model of loading a bitmap , if you have artbitmap please could you use that please start from the little source i gave above. I tried everthing and no mater what i do nothing on the screen! I also tried FastBmp to draw the pic after the OpenBmpDb(); function and still nothing! Iam new to the c# launage so thats probley why<img src=icon_smile.gif border=0 align=middle>

Email: palm_3333@yahoo.com
Posts: 1
Joined: Tue Jun 18, 2002 3:48 pm
Location: United Kingdom

Postby awschwab on Tue Jun 18, 2002 7:26 pm

You may have had a problem with ArtBMP, but you definitely need to show the bitmap using FastBMP. This works fine with a bitmap made with ArtBMP. Use the name you gave artBmp when you open, or else a new empty bitmap file will be created.

In artBMP, you give it the filename when you create the BMP host. Then you insert the bitmap into the host file. You need to make sure to set your bitdepth (using SetDepth) to match the bit depth of your bitmap, unless you are using the default bitdepth, as I do below.

library "PToolboxLib"
FastBmp(20, 20, 0);
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby jonfeero_13 on Sat Jun 22, 2002 7:05 pm

Sorry i forgot my password for my other user name! Iam still haveing trouble whith bit maps! I need some kind of demo the one above dossent work no matter what i try, i need some help big time. Please read above to see my problem and yes sorry i forgot to mention i used FastBmp(); ! Please i need a good working sample of a bitmap done in art bitmap starting from the source above, useing the FastBmp(); and OpenBmpDb(); !
Thanks so much<img src=icon_smile_big.gif border=0 align=middle>

Posts: 5
Joined: Tue Sep 18, 2001 4:18 pm
Location: Canada

Postby jstadolnik on Sat Jun 22, 2002 9:18 pm

Well, the example that awschwab provided is a good one which does work. If it doesn't for you, there are two possilities:

1) Check the return value of OpenBmpDb(), if it's zero, your database could not be found, meaning that "spaceBMP" is not really the name of your bitmap database.

2) The other possibility is that the color depth (bits per pixel) of your bitmap is not the same as the current screen depth. Call SetDepth() with the appropriate color depth before calling graph_on().


The PToolboxLib guy.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest