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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[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 - BMP/GIF/whatever to PDB converter

BMP/GIF/whatever to PDB converter

Discuss PocketC for Palm OS (including Desktop Edition)

Postby WauloK on Tue Mar 05, 2002 10:03 pm

Anyone know of a cheap (pref FREE!) program which will convert an image designed in Windows (eg BMP) to PDB so I can open it with OpenBmpDb.
Tia

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!
Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
Iron Filings v2.0 released.
Download a demo version at http://www.palmgear.com
Made with PocketC!
WauloK
 
Posts: 232
Joined: Tue Jan 15, 2002 2:41 am
Location: Australia

Postby jstadolnik on Tue Mar 05, 2002 10:09 pm

Use PilRC to convert .bmp files to .bin resources, and then use par to embed the .bin files in a database. Both tools are free.

You can also use the "c" switch on par to create a database (either a .prc or .pdb). See the par manual for help and examples.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby WauloK on Tue Mar 05, 2002 10:44 pm

Is there _anything_ this guy does NOT know??

<img src=icon_smile.gif border=0 align=middle>

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!
Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
Iron Filings v2.0 released.
Download a demo version at http://www.palmgear.com
Made with PocketC!
WauloK
 
Posts: 232
Joined: Tue Jan 15, 2002 2:41 am
Location: Australia

Postby raajkumars on Wed Mar 06, 2002 12:25 am

You can also use PInstall. You can not only use it convert images to Palm bitmap, but also to install text files as doc files. Personally, I think it is a real cool developer tool, as lets you to install prc/pdb files to Palm without going through the lengthy hotsync.

-Raaj
raajkumars
 
Posts: 83
Joined: Sun Oct 21, 2001 3:53 pm

Postby raajkumars on Wed Mar 06, 2002 12:26 am

raajkumars
 
Posts: 83
Joined: Sun Oct 21, 2001 3:53 pm

Postby jstadolnik on Wed Mar 06, 2002 2:14 am

PInstall is a great tool, however it is not suitable for turning bitmaps in to palm resources which OpenBmpDb can handle.

What PInstall does is take any one bitmap you select and wedge it into a little viewer application, which it then installs.

With PilRC you can convert as many bitmaps as you like into palm bitmap resources in one fell swoop, and then plug these into a single database. You can even create bitmap families (these are bitmap resources which have multiple bitmaps attached to them of different depths). For example, if you have a bitmap family resource with and ID of 5000, it can have a monochrome, 2 bit gray, 4 bit gray, and 8 bit color image bound inside it. You draw bitmap families as you would any other bitmap (FastBmp(x,y,5000)), the only difference is that the image corresponding to the current depth gets drawn. These are very cool.

Also, you can build resource forms with PilRC. It's a key tool for the palm developer (especially gcc and PocketC/PToolbox users).

One more thing, PilRC 2.9 now has a new -ro switch that allows you to dump all the resources to a single .prc file rather than multiple .bin files... significatly less messy. You can then use par to embed the resultant .prc into your applet .prc file.

Ok, I'm done. :)

Joe



The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby WauloK on Wed Mar 06, 2002 3:01 am

hehehe Go Joe Go Joe!

Damn. PilRC hey? Just after I registered RsrcEdit. Ah well handy to have one built into the PDA so I can program on the road ;)

That's the thing about Palm programs. You don't tend to mind paying for the registration compared with Windows programs which I'd rather just delete after expiry date.

Wonder if anyone would pay $5 for Iron Filings v2.0 heh.
I've added so many functions with the help of PTL. (PS: Joe.. I've sent you a pre-release version of IF v2.0 for all the help you've given me!)

According to weblogs, I've had over 1300 downloads since I released 1.2

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!
Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
Iron Filings v2.0 released.
Download a demo version at http://www.palmgear.com
Made with PocketC!
WauloK
 
Posts: 232
Joined: Tue Jan 15, 2002 2:41 am
Location: Australia

Postby delta on Wed Mar 06, 2002 3:49 am

Is there a way to convert gif, bmp into vector image and to PDB converter?

A vector image is an image with only lines and polygons.
delta
 
Posts: 53
Joined: Mon Dec 10, 2001 12:48 am

Postby jstadolnik on Wed Mar 06, 2002 3:59 am

The palmOS has no API for handling "vector" formats. You'd have to create the vector format yourself and write your own code to translate and draw it.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby delta on Wed Mar 06, 2002 4:49 am

well, since there is no way to convert vector files into PDB then i shall draw the vector lines and polygons on a piece of paper then scan it into gif and convert into PDB or PRC.

I am trying to do this is because i wanted to reduce the bitmap size.
delta
 
Posts: 53
Joined: Mon Dec 10, 2001 12:48 am

Postby delta on Wed Mar 06, 2002 5:53 am

How to use PilRC and par to convert a .gif file into .prc or .pdb?

There are so many files and folders when i downloaded the .zip package from the site i need a step by step guide on how to use it.

i am running on windows 98.
delta
 
Posts: 53
Joined: Mon Dec 10, 2001 12:48 am

Postby jstadolnik on Wed Mar 06, 2002 12:53 pm

Well, if you can't find the PilRC manual (located in the "PilRC/doc" directory - which only has 10 items in it), you really shouldn't be developing sofware.

The process involves creating a .rcp file with a text editor and then running the .rcp file through PilRC. See the "Resource Forms" subsection in the PToolbox documentation for a walkthrough on using PilRC... it's up to you though to figure out how to write the .rcp file.

---

Also, unless you write a native library to speed things up, I think a vector based approach is not viable in PocketC due to the language's slowness. It will be very sluggish. Unless you are willing the read a lot of documentation and do some serious experimentation on your own, I wouldn't even consider attempting a native library either.

You can compress bitmaps... again see the PilRC manual.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby awschwab on Wed Mar 06, 2002 3:22 pm

You can do vector graphics on the Palm: just use the PToolbox lines function, and then save your drawing as a bitmap with SaveBmp(). Adding graphics or text to a bitmap during runtime, saving the bitmap, hiding the original, and installing the modified bitmap into a form with FormBmp() can be a nice way to customize your program's appearance at runtime.

Since my PDA is monochrome, I don't find it very satisfying to make a lot of color bitmaps. But you can easily make a monochrome bitmap display in a color to match some screen object. For instance, if you want to match the titlebar color:
<pre id=code><font face=courier size=2 id=code>
t = GetPixel(2,0); // titlebar color
f = SetFore(t);
OpenBmpDB("#bwbmps"); // BWBMP=ID of resource bitmap
FastBmp(x,y, BWBMP); // draws in current foreground color
SetFore(f); // restore foreground color
// draw more stuff on your bitmap here.
OpenBmpDB("#TempBMP.prc");
SaveBmp(CBMP,x,y,witdth, height, -1,0);
</font id=code></pre id=code>

Now you can install bitmap ID CBMP into a form with FormBmp(CBMP,y,x)

Edited by - awschwab on 03/06/2002 09:29:32
awschwab
 
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby delta on Thu Mar 07, 2002 12:40 am

i am using one of the way:
get a .gif map from website then using a picture editor on desktop to edit away the colors to only lines and polygon.

save the edited .gif file and the last part is to convert the .gif file into .prc before loading into the palm.

i am stuck at the last part where using PilRC and par to convert the .gif into .prc
delta
 
Posts: 53
Joined: Mon Dec 10, 2001 12:48 am

Postby jstadolnik on Thu Mar 07, 2002 1:27 am

I would suggest searching the PilRC manual for "bitmap" and do some actual reading.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Next

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 4 guests

cron