aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1416

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1416  Resources... How it works?

23/05/2006 @ 16:46
by Adi Corrales

Anonymous



Here I go again ;)

Ok, I know I can find the answer in the Palm Source page, but I want to know If somebody can explain this to me as If I was 5 years old (actually, i'm 29 ;) )

How the resources files works (for images)? Here is what i got: I'm trying to put a background Image in a form, with all the fix labels in it, in order to not have a lot of objects. I have my jpg, 16 bits 300x300, etc. I Use Tbmpedit to create the resource, and with Bird, I put in my app resource file. I compile my form with Vizibasic, and It works fine.

Now, I have a lot of qestions of troubles I got in the way to get it: First, In Tbmpedit, the app thel me that the picture was bigger than 65K so I suggest me to reduce size or compress. My jpg is just 7k! Why is TBmpedit Telling me is bigger?

Well, I found that if I compress the image, I can create the resources, But there is three or four optios to compress... I have no idea what do every one...Can Anybody please explaine me? Wich is better for images?

In the end the final form compiled with nothing but the image and some labels is aprox 250k. Bigger than Izibasic itself! Is there anyway toreduce the size? (because if I continue adding things, I'll finish with a 10Mb app, isn't it?)

So, as you can see, I just understand NOTHING about the resources files. I'm just following a test and error to get the results, but If somebody know where can I find some tutorial or something, I would appreciate a lot the help.

Thanks and see you around!
  Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 1
--------
23/05/2006 @ 17:44
by bh77a

Anonymous

visitor
Hi Adi,

Here is what I can contribute... hopefully this will be of use to you:

- jpg is a "lossy" format meaning that alot of the image data is stripped, which is why a jpg might be 7 kb but the same image might be 400 kb as a bitmap... Palm uses a type of bitmap (I think)

- no single resources can exceed 65 kb (actually not true as Alex Pruss, developer of mySkin, was ably to bypass this but he is much smarter than I), but for practical purposes this is true

- instead of using 16 bit, try using 8 bit when you can... this will reduce the size greatly and most of the time the difference isn't able to be noticed

- use single density bitmaps (72 dpi) when possible as this will decrease the size as well

- by default the os uses the 160x160 coordinate system and hi-density (320x320/hi res) is only enabled at certain moments

- a simple white bitmap of 72 dpi, 160 x 160 pixels is approximately 25000 kb on my TX (created with BIRD)

- use smaller dimension-wise images and tile them next to each other, this will allow for 16 bit and 320x320 when needed... this is how skinning programs such as ZLauncher, PocketTunes, SilverScreen all work

Hope that this is of use to you. If you have any questions, please post and I can answer better this evening...

bh77a (another 29 year old iziBasic user)

Write to bh77a   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 2
--------
23/05/2006 @ 19:30
by aldweb

Anonymous

visitor
Hello,

I think that a good way to get to understand something about Palm resources and especially all about images (bitmaps) is to read Pilrc's documentation, as this tool does the same thing as BIRD (or RsrcEdit, or TbmpEdit for images only) in text script files.
So, maybe start by reading here: http://tangentsoft.net/palmfaq/articles/tutorial/#5.4

Then, Palm also offers quite a good information (but isn't it too complete... so becoming hard to read?) on this page: http://www.palmos.com/dev/support/docs/palmos/PalmOSCompanion/UserInterface.html#1010236

And, finally, if you have difficulties to go to sleep at night, read Palm's official documentation here: http://www.palmos.com/dev/support/docs/palmos/PalmOSReference/Bitmap.html

Cheers,
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 3
--------
23/05/2006 @ 21:30
by Adi Corrales

Anonymous

visitor
mmmmm, Well, I tryed to use a 160x160 Image (150x150 actually) But It appears to small in my screen... How can I do that the 160x160 fill the the 320x320 screen in my T5? Is there a flag or something that tell to Vizibasic that the image should use all the screen?...

Also, I'm tryed to use 8 bits Single density, but TbmpEdit crash every time I tryed to save it... I will send a report to the author, but for now, I'm afraid I'm sticked with Double density. I will try to modify my original image to see if that helps. I will try to use bmp's instead jpg's...

I don't care about a big resolution or so, because is just a Background, so I don't care if is not a perfect image. I will read all that you recomend and try to understand this... Thanks

  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 4
--------
24/05/2006 @ 22:26
by aldweb

Anonymous

visitor
Well, I tryed to use a 160x160 Image (150x150 actually) But It appears to small in my screen... How can I do that the 160x160 fill the the 320x320 screen in my T5? Is there a flag or something that tell to Vizibasic that the image should use all the screen?...

Read the documentation I suggested you. You will see that a bitmap resource should include the image for the different resolutions you want to address. Then the IMAGE instruction will know how to manage the bitmap resource and display the adequate one.

So, what happened there to you is that you designed a 150x150 image for high-res, not a 150x150 for low-res, this is why it appears so small.

Cheers,
aldweb


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 5
--------
24/05/2006 @ 22:29
by aldweb

Anonymous

visitor
And also to help you, you have this post from our good friend bh77a that he forwarded to me by e-mail because my anti-spam/-hackers/-idiots system stopped him from posting by mistake.

Hi Adi,

I have tried the following steps on my TX with 320x480 screen (like t5)
and the image fills the screen. This will not fill the DIA area, but
Khertan has code for it so that it can be managed
(http://www.khertan.net). If you need help with dia management, post and
I can post my skeleton code that works Khertan's code into an actual
application. Anyways, here are the steps for you to try...

- open BIRD
- tap Database List (menu)
- tap New Database
- name = yourappname.rsrc
- creator id = same as your app
- type = rsrc
- make sure resource db is clicked
- click ok

- double click on it in the list at the left to open (quickly)
- tap new
- select bitmap
- tap new
- set properties as
- w=160
- h = 145
- dpi = 72
- d = 8
- tap ok

- double click 8-72 in list at left
- draw image that fills area... scroll to make sure something fills all
corners
- tap done
- tap ok

- click on tbmp 1000 in list
- tap on id field... change to 110
- tap apply
- tap done

- open vizibasic
- change project headings to
--- your app name
--- crid = same as rsrc file
--- resource... tap + and type rsrc file name
--- save

- insert image
id 1
x position 1
y position 25
x width 160
y height 145
tap ok

- compile

This should give you a simple app that displays the bitmap that you
created, filling most of the screen. If this doesn't work for you, please
post and I will see what can be done.

Regards,
bh77a


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 6
--------
25/05/2006 @ 02:20
by bh77a

Anonymous

visitor
Hi Aldweb,

Thank you for posting the information from my message :)

Hi Adi,

Hope that you get this alright. If you would like, I can upload my rsrc, vizibasic file and compiled prc so that you can examine them.

Regards,
bh77a
Write to bh77a   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n 7
--------
01/06/2006 @ 03:19
by Adi Corrales

Anonymous

visitor
Ups! I'm a little short of time this weeks (You know, some times you have to spend your time in that thinks that make you earn some money to buy that wonderful apps as izibasic ;) ) And I have no time to test this, but I'll try as soon as I can... I let you know wath happen....
  Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^