Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Bitmap trouble

Bitmap trouble

Discuss PocketC for Palm OS (including Desktop Edition)

Postby JohnM on Sat Apr 16, 2005 12:46 pm

Hello, me and a friend are making an RPG with PocketC, and I was doing a few tests. I tried to use @bmp to load a bitmap, and came up with the error "Invalid bmp depth", even though I KNOW they were both 8 bit color. What's the problem?

Oh, by the way, I'm using the demo version, because I haven't had time to buy the full version (yes I'm going to). I dunno if this is the problem or not.

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby dewey on Sat Apr 16, 2005 4:03 pm

That error means that you have specified an invalid depth in the bitmap string. If you can't figure out the problem, post the bmp string that it is complaining about.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby JohnM on Sun Apr 17, 2005 1:02 am

This is my source code so far:


//Bitmap Test

@cid "TEST";
@name "@bmp";
@dbname "@bmpdb";
@category "Unfiled";
@ver ".001";
@licon1 "large1.bmp";
@sicon1 "small1.bmp";
@bmp "1200, 16, blue.bmp";

main()
{
// Nothing here yet...
}

-----

I made an image with Fireworks, and exported it as a 256 color (8 bit) image, as 160x160 resolution, and put used the code "@bmp "1200, 8, blue.bmp";", but that didn't work, so I exported it as 16, and kept switchin depths. I have tried 1 bit, 2 bits, 4 bits, 8 bits, and 16 bits, and still no luck..

What happens, is I press the compile button, and compile as a stand-alone .prc, and an error message pops up, and tells me about the invalid bitmap depth.

Can anyone post some sample code that I can use to get it right? I just can't seem to get it to work right. I've tried just about everything...:(

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby JohnM on Sun Apr 17, 2005 1:06 am

btw, I can e-mail the whole project to you, if you want me to..

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby exit_head on Sun Apr 17, 2005 6:47 am

you have to specify a 1 bit image too,

@bmp "1200, 1, blue.bmp, 16, blue.bmp";

you cant just add it without a 1 bit image. i you want to do this. us pilrc
exit_head
 
Posts: 64
Joined: Tue May 04, 2004 3:50 am
Location: USA

Postby JohnM on Sun Apr 17, 2005 11:07 am

Ah, well, thanks for your help. I'll try it this afternoon.:)

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby dewey on Sun Apr 17, 2005 2:10 pm

The bitmap string format is very strict - be sure to remove the extra space between the comma and the depth.

@bmp "1200,1,blue.bmp,16,blue.bmp";

Another tip - the bit depth of the source .bmp file doesn't need to match the bit depth you've specified. In fact, the current compiler has a bug in which a 16-bit source bitmap will cause it to crash. This has been fixed for PocketC 7.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby JohnM on Tue Apr 26, 2005 1:12 pm

Ok, thanks. I got the bitmap problem to work, but now I have a few other questions...

1) Is true 16-bit color possible on PocketC (or does an external library or something support it). If not, when will PocketC 7 be released?
2) Is there a free, MIDI to WAV converter. I make MIDI music, but need WAV for exit_head's library.
3) I have another problem. I tried doing 1 big, 320x320 bitmap, and it said that it was too large (over 64k), so I put it into 4 seperate, 160x160 bitmaps. I used the bitmapr() function to display all for of them, but only 1 of them shows up in the top-right corner...

---

@cid "TEST";
@name "@bmp";
@dbname "@bmpdb";
@category "Unfiled";
@ver ".001";
@licon1 "large1.bmp";
@sicon1 "small1.bmp";
@bmp "1200,1,hiresb.bmp,16h,hires1.bmp";
@bmp "1201,1,hiresb.bmp,16h,hires2.bmp";
@bmp "1202,1,hiresb.bmp,16h,hires3.bmp";
@bmp "1203,1,hiresb.bmp,16h,hires4.bmp";

main()
{
clear();
clearg();
graph_on();
bitmapr(1200,0,0);
bitmapr(1201,160,0);
bitmapr(1202,0,160);
bitmapr(1203,160,160);
wait();
wait();
exit();
}

----

Any help would be appreciated. Thanks :)
Edit: By the way, I did buy the full version of PocketC, and I love it :D
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby JohnM on Tue Apr 26, 2005 6:13 pm

Just so you know, I figured out the hires part.. it's still drawing in 'emulated' pixels, so I should have put 80s instead of 160s when drawing the bitmaps.. I got that worked out. But I still need 16 bit color and the MIDI to WAV and mp3 thing...

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby dewey on Wed Apr 27, 2005 5:10 am

1) 16-bit color was supported in 6.6. It's just that the .bmp file on your computer needed to be 24-bit or the compiler would crash. PocketC 7 is out.
2) I am sure there is :), but this is outside my expertise.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby JohnM on Wed Apr 27, 2005 4:13 pm

Awesome, it's out :D

Anyway, I loaded a 24 bit bitmap image, 320x320 pixels, as 16 double-density like this:

@bmp "1200,1,hiresb.bmp,16h,hires_1.bmp";
@bmp "1201,1,hiresb.bmp,16h,hires_2.bmp";
@bmp "1202,1,hiresb.bmp,16h,hires_3.bmp";
@bmp "1203,1,hiresb.bmp,16h,hires_4.bmp";

and then displayed it like this:

bitmapr(1200,0,0);
bitmapr(1201,80,0);
bitmapr(1202,0,80);
bitmapr(1203,80,80);

and after doing all the coding and stuff, I compiled it. When I installed it on my PDA, it didn't look like true 16 bit color, but rather a textured 8 bit color, trying to give the appearence of 16 bit color. Is this what I get, or am I doing something wrong?

http://www.bergmansoftware.com/tests/hires.prc < That's the compiled program.
http://www.bergmansoftware.com/tests/hires.bmp < That's the original 24-bit bitmap image (before I sliced it)

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby Mikael on Wed Apr 27, 2005 5:30 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">2) Is there a free, MIDI to WAV converter? I make MIDI music, but need WAV for exit_head's library.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I don't know if this is any help to you.

MIDInight Express - available at:

http://www.polyhedric.com/software/mn/download.html

It is a freeware player which features a MIDI to .wav renderer.

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby dewey on Thu Apr 28, 2005 2:43 am

I installed hires.prc on the T5 simulator. It did look dithered on first run, but that was because the simulator was in 256 color mode. When I changed it to 16-bit, the app looked perfect.

Is it possible either that your PDA doesn't support 16-bit color, or it is in 256 color mode? What PDA do you have?
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby JohnM on Sun May 01, 2005 10:26 am

Zire 72 from PalmOne.. which does support hires and 16-bit color. Anyway, I haven't tried it on the simulator yet. I'll do that now

Thanks for the MIDI to WAV thing.. that works perfect :D
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA

Postby JohnM on Sun May 01, 2005 10:48 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by JohnM</i>
<br />I haven't tried it on the simulator yet. I'll do that now<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

First, I tried it on the simulator, and it was perfectly clear 16 bit color, so then I decided to check my code again. Then I remember setcolordepth().. and decided to try it. It worked, and I have 16 bit color with PocketC.. thanks for you help, guys ;)

- Bergman Software
- Bergman Software
JohnM
 
Posts: 15
Joined: Sat Apr 16, 2005 12:43 pm
Location: USA


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 2 guests

cron