Re: displaying Bitmaps correctly

2009-04-04 Thread Roger Stringer

At 03:15 AM 4/4/2009, you wrote:

Subject: RE: displaying Bitmaps correctly
From: luis maldonado luis.maldon...@hotmail.com
Date: Fri, 3 Apr 2009 11:17:48 -0400

the change from BPP 8 to BPP 16 helped quite a bit, but the graphics 
are stil not as crips a regular PALM graphic and the colors are a 
bit grainy, the question then is:


How are those graphics created and with what tools if not with 
photoshop? I need to create a bunch of icons and over 200 64x64 
gadget graphics for my application.


Create 16-bit anti-aliased graphics.  That fuzziness tricks the eye 
and makes them appear more crisp and less grainy.

I'll take a pass on the tool recommendation, though many use Photoshop.


Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: displaying Bitmaps correctly

2009-04-04 Thread Doug Reeder
And, of course, if you don't already own Photoshop, Gimp can do most  
anything you need to do, though the learning curve is hard and the  
workflow isn't as efficient.



On Apr 4, 2009, at 10:22 AM, Roger Stringer wrote:


At 03:15 AM 4/4/2009, you wrote:

Subject: RE: displaying Bitmaps correctly
From: luis maldonado luis.maldon...@hotmail.com
Date: Fri, 3 Apr 2009 11:17:48 -0400

the change from BPP 8 to BPP 16 helped quite a bit, but the  
graphics are stil not as crips a regular PALM graphic and the  
colors are a bit grainy, the question then is:


How are those graphics created and with what tools if not with  
photoshop? I need to create a bunch of icons and over 200 64x64  
gadget graphics for my application.


Create 16-bit anti-aliased graphics.  That fuzziness tricks the eye  
and makes them appear more crisp and less grainy.
I'll take a pass on the tool recommendation, though many use  
Photoshop.



Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: displaying Bitmaps correctly

2009-04-03 Thread luis maldonado

Thanks Michael,

 

the change from BPP 8 to BPP 16 helped quite a bit, but the graphics are stil 
not as crips a regular PALM graphic and the colors are a bit grainy, the 
question then is:

 

How are those graphics created and with what tools if not with photoshop? I 
need to create a bunch of icons and over 200 64x64 gadget graphics for my 
application. 

 

Regards,

 

Luis


 
 Date: Thu, 2 Apr 2009 06:55:55 +0200
 From: michal.sel...@visicom.sk
 Subject: Re: displaying Bitmaps correctly
 To: palm-dev-forum@news.palmos.com
 
 
 luis maldonado wrote:
  Hello,
  
  BITMAP splashBM
  BEGIN
  BITMAP screen_saver.bmp BPP 8 DENSITY 2 COMPRESS TRANSPARENTINDEX 0
  END
  
 
 use BPP 16, conversion from truecolor to palette almost always looks bad.
 
 -- 
 For information on using the ACCESS Developer Forums, or to unsubscribe, 
 please see http://www.access-company.com/developers/forums/

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

displaying Bitmaps correctly

2009-04-01 Thread luis maldonado

Hello,
 
I'm desperatly looking for code samples on how to display bitmaps on TX.
 
I'm able to display a 24 color bitmap but the resolution is just bad.
 
I have several bitmaps I got from the web also 24 color and they display fine, 
but the ones I create with photoshop do not display very good as the colors are 
completly destroyed.
 
when I try to compare the structure of the bitmaps, there does not seem to be 
any difference reported by photoshop but one displays fine and the other does 
not.

 

So far I have had to settle for low res bitmap display but  I would like to 
update the application UI to use more modern bitmaps like the ones they use in 
the home screen and really be able to use the TX's high resolution screen.

 

I'm using cw 9.3 and pilcr for development tools


This is the code I'm using to display the bitmaps

 

void drawBitmap(UInt16 Bitmap, UInt16 X, UInt16 Y)
{
 MemHandle h;
 BitmapType* bmpP;
 Coord width, height;
 WinHandle winH = WinGetDrawWindow();
 WinDrawOperation oldMode;

 WinPushDrawState(); 
 h = DmGet1Resource(bitmapRsc, Bitmap);
 bmpP = (BitmapType*)MemHandleLock(h);
 oldMode = WinSetDrawMode(winPaint);
 WinPaintBitmap (bmpP, X, Y);
 MemHandleUnlock(h);
 DmReleaseResource(h);
 WinSetDrawMode(oldMode);
 WinPopDrawState(); 
}


and this is the resource code

 

BITMAP splashBM
BEGIN
 BITMAP screen_saver.bmp BPP 8 DENSITY 2 COMPRESS TRANSPARENTINDEX 0
END

 

Same code is used to display the Palm images I got from the web and the images 
I created with photoshop

 
Can anyone help help?
 
Thanks a bunch
 
Luis,
 


_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: displaying Bitmaps correctly

2009-04-01 Thread Michal Seliga

luis maldonado wrote:
 Hello,
  
 BITMAP splashBM
 BEGIN
  BITMAP screen_saver.bmp BPP 8 DENSITY 2 COMPRESS TRANSPARENTINDEX 0
 END
  

use BPP 16, conversion from truecolor to palette almost always looks bad.

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: Bitmaps distorted in PODS

2008-07-14 Thread Tam Hanna
Hi, 
The solution was:

Export the xrd file as a 24bit BMP file onto your desktop. Do NOT allow GIMP
to write into the file hyperlinked from the resource HTML file.

Then, open the resource HTML file in the resource editor. Open the bitmap
that you wish to edit, and click Import. Pick the temprorary file created
before and import the data. Voila - it works.

The reason why I fucked up was that I used GIMP to directly edit the bitmaps
as referenced by the resource HTML file. Once again - do NOT edit the
bitmaps in the /rsc folders!!

All the best
Tam Hanna

Subject: Re: Bitmaps distorted in PODS
From: Michal Seliga [EMAIL PROTECTED]
Date: Fri, 11 Jul 2008 20:25:44 +0200
X-Message-Number: 5

gimp saves good files, i am using it and i never had problem with bitmaps it

creates. gimp 1.2 i mean, i didn't used gimp 2.x so far



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RES: Bitmaps distorted in PODS

2008-07-11 Thread guimaraescruz
Hi, 

How can I unsubscribe this forum?

Thanks,

André 

-Mensagem original-
De: Ryan Rix [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 10 de julho de 2008 22:28
Para: Palm Developer Forum
Assunto: Re: Bitmaps distorted in PODS


On Thursday 10 July 2008 06:19:06 pm Dmitry Grinberg wrote:
 16-bit image?
 compiled in little-endian mode?
 pilrc bug
Doesn't pilrc compiled from cvs source fix this?

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/

__
Faça ligações para outros computadores com o novo Yahoo! Messenger 
http://br.beta.messenger.yahoo.com/ 


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Bitmaps distorted in PODS

2008-07-11 Thread Christopher Stamper
http://www.access-company.com/developers/forums/ to unsubscribe.

On Fri, Jul 11, 2008 at 9:57 AM, guimaraescruz [EMAIL PROTECTED]
wrote:

 Hi,

 How can I unsubscribe this forum?

 Thanks,

 André

 -Mensagem original-
 De: Ryan Rix [mailto:[EMAIL PROTECTED]
 Enviada em: quinta-feira, 10 de julho de 2008 22:28
 Para: Palm Developer Forum
 Assunto: Re: Bitmaps distorted in PODS


 On Thursday 10 July 2008 06:19:06 pm Dmitry Grinberg wrote:
  16-bit image?
  compiled in little-endian mode?
  pilrc bug
 Doesn't pilrc compiled from cvs source fix this?

 --
 For information on using the ACCESS Developer Forums, or to unsubscribe,
 please see http://www.access-company.com/developers/forums/

 __
 Faça ligações para outros computadores com o novo Yahoo! Messenger
 http://br.beta.messenger.yahoo.com/


 --
 For information on using the ACCESS Developer Forums, or to unsubscribe,
 please see http://www.access-company.com/developers/forums/




-- 
Christopher Stamper

Email: [EMAIL PROTECTED]
Web: http://tinyurl.com/2ooncg
gTalk: http://tinyurl.com/6e359r
Skype: cdstamper

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: Bitmaps distorted in PODS

2008-07-11 Thread Tam Hanna

Hi Dmitry,
I know that it is a 24bit bitmap - but can't find a way to transform it in
GIMP.

Cant you recommend something?

All the best
Tam Hanna

Subject: Re: Bitmaps distorted in PODS
From: Dmitry Grinberg [EMAIL PROTECTED]
Date: Thu, 10 Jul 2008 18:19:06 -0700
X-Message-Number: 7

16-bit image?
compiled in little-endian mode?
pilrc bug

16-bit image?
on os 5.2.1 or lower device?
set 16 bit screen depth

non-24bit windows-style source bitmap?
fix it


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Bitmaps distorted in PODS

2008-07-11 Thread Michal Seliga
gimp saves good files, i am using it and i never had problem with bitmaps it 
creates. gimp 1.2 i mean, i didn't used gimp 2.x so far


Tam Hanna wrote:

Hi Dmitry,
I know that it is a 24bit bitmap - but can't find a way to transform it in
GIMP.

Cant you recommend something?

All the best
Tam Hanna

Subject: Re: Bitmaps distorted in PODS
From: Dmitry Grinberg [EMAIL PROTECTED]
Date: Thu, 10 Jul 2008 18:19:06 -0700
X-Message-Number: 7

16-bit image?
compiled in little-endian mode?
pilrc bug

16-bit image?
on os 5.2.1 or lower device?
set 16 bit screen depth

non-24bit windows-style source bitmap?
fix it




--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Bitmaps distorted in PODS

2008-07-10 Thread Tam Hanna
Dear Colleagues,
I have just made a not lovely discovery when trying to import existing xcf
(GIMP) images into my PODS-based project.

I created a structure of 16bit bitmaps in order to get the files saved into
the hard drive. Then, I opened GIMP and copied the XCF pixel info into the
BMP file and saved it in bitmap format. So far so good - the program gets
built. However, when running the PRC (and when looking at the bitmaps in
resource editor), the colors are totally distorted. Opening the bitmap in
GIMP reveals correct colors...

Anyone of you have any ideas?

All the best
Tam Hanna 


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Bitmaps distorted in PODS

2008-07-10 Thread Dmitry Grinberg
16-bit image?
compiled in little-endian mode?
pilrc bug

16-bit image?
on os 5.2.1 or lower device?
set 16 bit screen depth

non-24bit windows-style source bitmap?
fix it

On 7/10/08, Tam Hanna [EMAIL PROTECTED] wrote:
 Dear Colleagues,
  I have just made a not lovely discovery when trying to import existing xcf
  (GIMP) images into my PODS-based project.

  I created a structure of 16bit bitmaps in order to get the files saved into
  the hard drive. Then, I opened GIMP and copied the XCF pixel info into the
  BMP file and saved it in bitmap format. So far so good - the program gets
  built. However, when running the PRC (and when looking at the bitmaps in
  resource editor), the colors are totally distorted. Opening the bitmap in
  GIMP reveals correct colors...

  Anyone of you have any ideas?

  All the best
  Tam Hanna



  --
  For information on using the ACCESS Developer Forums, or to unsubscribe, 
 please see http://www.access-company.com/developers/forums/



-- 

Best Regards,
Dmitry Grinberg
(847) 226 9295

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Bitmaps distorted in PODS

2008-07-10 Thread Ryan Rix

On Thursday 10 July 2008 06:19:06 pm Dmitry Grinberg wrote:
 16-bit image?
 compiled in little-endian mode?
 pilrc bug
Doesn't pilrc compiled from cvs source fix this?

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Constructor is corrupting my small BW bitmaps

2008-05-29 Thread Chris DiPierro
Ok, got it. I had used that update a while back, then I read that there
was a NEWER Constructor (what I had downloaded). Apparently not. Would be
nice of Palm's site was consitent.

For reference, 1.5b6 is dated 3/9/00, should have checked that first I
suppose.

It seems to have fixed the problem though and I suppose that's what
matters in the end.

But (for my own sanity) ... ATTENTION PALM SITE MAINTAINERS: Please update
the Constructor version that's listed as an update in the Pavillion to
match the ACTUAL latest version.


 Subject: RE: Constructor is corrupting my small BW bitmaps
 From: Heather Tufts [EMAIL PROTECTED]
 Date: Thu, 27 Jul 2000 10:30:57 -0500
 X-Message-Number: 26
 
 If you're on Windows, the latest is 1.5b7 which is part of Update 1 to the
 3.5 SDK found at http://www.palmos.com/dev/tech/tools/sdk35.cgi/.  Out of
 curiosity -- what is the date on 1.5b6?
 -hkmlt



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Constructor is corrupting my small BW bitmaps

2008-05-29 Thread Chris DiPierro
Um, and where might I find this?
In the Provider Pavillion, the latest listed is:
http://www.palmos.com/dev/pavilion.cgi/devseed/sdk35.html

Which says 1.5b5 (though it's really 1.5b6 ... I downloaded it
yesterday!)



 Subject: Re: Constructor is corrupting my small BW bitmaps
 From: HowY [EMAIL PROTECTED]
 Date: Wed, 26 Jul 2000 13:56:03 -0400
 X-Message-Number: 54
 
  If I make a 4x7 BW bitmap in Constructor (the new new new updated version
  1.5b6), it will create it corrupted. Instead of my drawing it turns it
 
 aHHH  the new constructor is 1.5b7 @ 2,360kb



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Constructor is corrupting my small BW bitmaps

2008-05-29 Thread HowY
 If I make a 4x7 BW bitmap in Constructor (the new new new updated version
 1.5b6), it will create it corrupted. Instead of my drawing it turns it

aHHH  the new constructor is 1.5b7 @ 2,360kb





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Constructor is corrupting my small BW bitmaps

2008-05-29 Thread Chris DiPierro
If I make a 4x7 BW bitmap in Constructor (the new new new updated version
1.5b6), it will create it corrupted. Instead of my drawing it turns it
into a random configuration of colored pixels. When CW tries to compile
the resource, it gets the following error:

Link Error: Unexpected Error #32: Unknown OpCode 0xAC5B in PICT 1500.
Compilation halted

What's going on?





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: scrolling bitmaps?

2008-05-29 Thread Garth Watkins
A good way to work with bitmaps, is to store the images in an offscreen
window.
Also keep in mind, that offscreen window dimensions,(as well as others I
suppose), can be larger than the physical dimensions of the screen.
So create an offscreen window with dimensions to hold all your images, and
tile your bitmaps onto this offscreen window.
Now you can copy the appropriate rectangular portions from your offscreen
window, to the window associated with your 'Main Form'.
To scroll your image, use WinScrollRectangle. This API tells you which
portion of your window is vacant due to scrolling. Fill in the vacant part
of your scrolled rectangle by copying from the appropriate region in your
offscreen window.
You can use the scrollbar logic to help you scroll your window.

If anyone is keen, I'll post some code to illustrate what I'm talking about.

Although this method is not very efficient, it's easy.
Also it will suffice if your prepared not to tear ring with the offscreen
window size.

To find out more about offscreen window's, bitmaps etc, search the FAQ for
Games, Animation on the palm website.

Regards
Garth Watkins

- Original Message -
From: Timothy Hilton [EMAIL PROTECTED]
Newsgroups: palm-dev-forum
To: Palm Developer Forum palm-dev-forum@news.palmos.com
Sent: Monday, July 10, 2000 5:09 PM
Subject: scrolling bitmaps?


 hi,

 I am new to palm development, so please excuse me if this question is
 naive.  I would like to display several bitmaps on a form.  Each bitmap
 alone will fit on the screen, but the total size of the bitmaps is
 larger than the 160 pixel screen height.  I would like to be able to use
 a scroll bar to view all of the images on the same form.  My
 understanding is that a scroll bar must be attached to some sort of
 container object (a field, table, list, etc.).  A scrollable table of
 bitmaps would provide the kind of functionality I would like, but it
 seems as though tables are not allowed to contain bitmaps.  Is there a
 good way to implement scrolling capability for bitmaps, or do I need to
 use some sort of previous/next button navigation scheme with multiple
 forms?  Thanks.

 -Tim Hilton


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




-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


scrolling bitmaps?

2008-05-29 Thread Timothy Hilton
hi,

I am new to palm development, so please excuse me if this question is
naive.  I would like to display several bitmaps on a form.  Each bitmap
alone will fit on the screen, but the total size of the bitmaps is
larger than the 160 pixel screen height.  I would like to be able to use
a scroll bar to view all of the images on the same form.  My
understanding is that a scroll bar must be attached to some sort of
container object (a field, table, list, etc.).  A scrollable table of
bitmaps would provide the kind of functionality I would like, but it
seems as though tables are not allowed to contain bitmaps.  Is there a
good way to implement scrolling capability for bitmaps, or do I need to
use some sort of previous/next button navigation scheme with multiple
forms?  Thanks.

-Tim Hilton



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Newbie q: POSE under Linux, Bitmaps et c

2008-05-29 Thread Anders Holtsberg


I hope this is the correct place to ask.

How can I import my rom image to POSE under Linux?
I finally got POSE to compile and it shows up with pictures
and everything on screen. But:

1) Why did it take several hours to compile? (Should I have
   looked for an RPM-package instead?)

2) Why does it crash if I switch to other than default version
   and memsize in the menu?

3) How can I import the ROM-image? The docs say that if a
   file ends with .ROM then it is imported. I copied the
   ROM file (from my Palm V via cradle  Rom-transfer and
   Windows version of POSE that I have working). Did that work? 
   NO! Why? What am I doing wrong?

4) And how do I hot sync on Linux? At first I have to put something
   in the linux.conf file I guess, just to have the serial port
   working, and then a hot sync program. How and where? (red hat
   Linux 6.1 didn't even configure the printer, that took some time)

5) And while I have your attention: what is the correct way of
   drawing dynamically generated bitmaps? I can make a bitmap (using
   older technology that OS3.5 so that it works everywhere) by 
   simply allocating memory (BitmapType + data in one chunk)
   then fill it in and then use WinDrawBitmap(p, x, y) and then 
   free it. Is this the right way or must the object live afterwards,
   ie should I only MemHandleUnlock it? But WinDrawBitmap takes a
   pointer so it might not even have a handle. Or is the approach 
   completely wrong for drawing dynamically generated bitmaps on 
   screen? Should I make a static dummy picture of the same size
   in the form and then overwrite it with some system call?

Please have mercy, I am a newbie on this ...

Best wishes

Anders Holtsberg




-- 
__
Anders HoltsbergMatematisk statistik   Telefon 046-2224953 
[EMAIL PROTECTED]Matematikcentrum   Telefax 046-2224998
www.maths.lth.seLunds universitet  Box 118, 22100 Lund


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


New constructor: Bitmaps changing color?

2008-05-28 Thread Chris Wilper
Hi,

Can anyone help with this?  When I modify a bitmap, 
I choose about 4 different colors from the nifty 
little color chooser thingy on the bitmap editor.
Then I re-open the bitmap for further editing and 
my colors change to shades of blue! (with black/white 
mixed in).

I checked the Color menu and I *do* have 8-bit selected.

Anyone else seen this?

Thanks,
Chris Wilper



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Color bitmaps?

2008-05-28 Thread Ben Gottlieb
Okay, more color questions: is it possible to just splash an 8-bit 
bitmap to the screen, without having to do it color by color (ie, 
with gray scale, I can preface a bitmap name with /-2/ to tell 
Constructor to handle it as a 2-bit bitmap, but the same trick 
doesn't work with /-8/.) Any pointers?



Thanks,
Ben

++
Ben Gottlieb   Stand Alone, Inc.
v: 773-477-2492 f: 773-477-2579
[EMAIL PROTECTED]  www.standalone.com
++
   Best Application: Control Bar (PalmSource '99)


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: /-c/ Compression of bitmaps

2008-05-28 Thread Steve Achelis
Ah ha!  The /-c/ (etc.) is used if the bitmap isn't in a family.  For
example, if I have a 2-bit (4 gray) bitmap and reference it directly, it'll
show up as 1-bit (black and white) unless I begin the name with /-2/.
However, if that image is in a family and is specified as 2-bits, then it'll
show up in grays regardless of the name.

In my app, the graphics are either black and white, or are supplied in a
family (with bw, gray, and color).  However, I had an occasion where the
same gray image would be displayed on all platforms (3.0+).  I had to use
the /-2/ naming convention or put this single image in a family (putting it
in a family cost 3k in prc file size).

Steve Achelis (talking to himself, and in third-person no less)

Steve Achelis [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 I'm using Constructor 1.5b7.  I see the docs say I should name my bitmaps
 special if they are multi-bit.  E.g., begin the resource name with /-c/
for
 compression.  However, I've tried with and without the /-c/ and the file
 size is identical.  If I set the compression to Run Length Encoding in the
 bitmap family, the file is significantly smaller...  Anyone know if the
/-c/
 was for earlier versions.









-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


/-c/ Compression of bitmaps

2008-05-28 Thread Steve Achelis
I'm using Constructor 1.5b7.  I see the docs say I should name my bitmaps
special if they are multi-bit.  E.g., begin the resource name with /-c/ for
compression.  However, I've tried with and without the /-c/ and the file
size is identical.  If I set the compression to Run Length Encoding in the
bitmap family, the file is significantly smaller...  Anyone know if the /-c/
was for earlier versions.





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps

2008-05-28 Thread Alex Pakhotin
If you don't need a color conversion it's even more simple.
You need something like this:

void DrawBitmap(BitmapType *bmp)
{
UInt16 err;
BitmapType *myBmp;
UInt8 *src, *dst;
Int16 i;

myBmp = BmpCreate( bmp-width, bmp-height, 4, NULL, err );
if ( err != errNone )
return;
src = (UInt8*) BmpGetBits( bmp );
dst = (UInt8*) BmpGetBits( myBmp );

// convert from 8 bit to 4 bit grayscale
for ( i = 0; i  bmp-width * bmp-height / 2; i++ )
{
UInt8 b, bHi, bLo;
b = *src++;
bHi = b  4; // 8bit - 4bit - we ignore 4 low bits
b = *src++;
bLo = b  4;

*dst++ = (bHi4) | bLo;
}
WinDrawBitmap( myBmp, 0, 0 );
BmpDelete( myBmp );
}

Very simple isn't it? What's the problem?

If the original bitmap has 0 value as black and 255 as white (standard
grayscale format) you need to invert it (just use ~(b4) in conversion).
For color original bitmap you should get RGB from the palette for every
pixel and convert to grayscale using formula like I wrote in my previous
letter.

Good luck,
Alex

PS. It's for PalmOS 3.5 of course. For earlier versions you have to write
your own Bmp() functions. But it's not difficult.

- Original Message -
From: Hans Han
Sent: Monday, November 13, 2000 12:38 PM
Subject: Re: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps


 Hi,

 For preformance reason, I want write on the  Bitmap data area of  an
 offscreen window directly while I receive the bitmap from network.  The
 pixel size of  window is 4 , so how to covert the 8-bits grayscale values
to
 4-bits index value? Wait for help.

 Regrads

 Hans
 - Original Message -
 From: Hans Han
 Sent: Friday, November 10, 2000 4:12 PM
 Subject: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps


  Hi All,
 
 
  I wonder how to convert 8-bits bitmaps to 4-bits Grayscale bitmaps.Any
 tips
  or sourcecode are welcome.
 
  Thanks
 
  Hans





-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Displaying selfmade bitmaps on PalmOS 3.5

2008-05-28 Thread chanc
Hi Thomas

Thanks for your help.
I'm looking at creating bitmaps at runtime though based on the results
computed in the program (i.e., dynamic, nonstatic bitmaps)



thomas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

 Hi,

 I'm using code warrior. The first step is to draw bitmap in constructor
(you can
 also copy/paste it).
 Then you notice the bitmap Id of the ressource and :

 void GraphFunctions_drawBitmap(UInt16 bitmapId, UInt16 X, UInt16 Y){

 VoidHand bmpHandle;
 BitmapPtr tmpBitmap;

  bmpHandle = DmGetResource('Tbmp', bitmapId);
  tmpBitmap = (BitmapPtr) MemHandleLock(application, bmpHandle);
  WinDrawBitmap(tmpBitmap, X, Y);
  MemHandleUnlock(bmpHandle);
  DmReleaseResource(bmpHandle);
 }

 hope that will help...

 [EMAIL PROTECTED] a écrit :

  Hi
 
  I still can't seem to render selfmade bitmaps to the emulator.  I've
looked
  through the archives and tried the examples, but the image is still not
  appearing.  The display stays white in the emulator.
 
  What's odd is that when I get to the memset below, I start to overwrite
  memory.  Doesn't BmpGetBits give me a pointer to the bitmap's data area
that
  I can then manipulate at will?
 
  Here's what I am doing:
 
pBmp = BmpCreate(width,height,8,NULL,error);
if (pBmp) {
 win = WinCreateBitmapWindow(pBmp, error);
}
 
   ptr = (unsigned char *)BmpGetBits(pBmp);
 
   for (i=0;iheight;i++) {
memset(ptr, i, width);
ptr += width;
   }
 
   WinSetDrawWindow(win);
   WinPaintBitmap(pBmp,0,0);
 
   BmpDelete(pBmp);








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Displaying selfmade bitmaps on PalmOS 3.5

2008-05-28 Thread thomas
Hi,

I'm using code warrior. The first step is to draw bitmap in constructor (you can
also copy/paste it).
Then you notice the bitmap Id of the ressource and :

void GraphFunctions_drawBitmap(UInt16 bitmapId, UInt16 X, UInt16 Y){

VoidHand bmpHandle;
BitmapPtr tmpBitmap;

 bmpHandle = DmGetResource('Tbmp', bitmapId);
 tmpBitmap = (BitmapPtr) MemHandleLock(application, bmpHandle);
 WinDrawBitmap(tmpBitmap, X, Y);
 MemHandleUnlock(bmpHandle);
 DmReleaseResource(bmpHandle);
}

hope that will help...

[EMAIL PROTECTED] a écrit :

 Hi

 I still can't seem to render selfmade bitmaps to the emulator.  I've looked
 through the archives and tried the examples, but the image is still not
 appearing.  The display stays white in the emulator.

 What's odd is that when I get to the memset below, I start to overwrite
 memory.  Doesn't BmpGetBits give me a pointer to the bitmap's data area that
 I can then manipulate at will?

 Here's what I am doing:

   pBmp = BmpCreate(width,height,8,NULL,error);
   if (pBmp) {
win = WinCreateBitmapWindow(pBmp, error);
   }

  ptr = (unsigned char *)BmpGetBits(pBmp);

  for (i=0;iheight;i++) {
   memset(ptr, i, width);
   ptr += width;
  }

  WinSetDrawWindow(win);
  WinPaintBitmap(pBmp,0,0);

  BmpDelete(pBmp);



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps

2008-05-28 Thread Richard M. Hartman
Darn, gamma was where I was going next g

Actually, that might explain why somebody else had
different constants.  Default gamma is different on
Macs and PCs.  Images made on one system would
probably need different constants from images made
on the other system.

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!


Tom Zerucha wrote in message [EMAIL PROTECTED]...

On Mon, Nov 13, 2000 at 01:31:57PM -0800, Richard M. Hartman wrote:
 It would help if we knew what the constants represented ...

 -Richard M. Hartman
 [EMAIL PROTECTED]

The constants represent the relative luminance of each color.  If the
same number of photons hit your cone cells, they will appear brigher
or dimmer based on color.  That is one reason a green laser pointer
can go two miles where an equally powered red one only goes 1000
yards.  (Your night vision is more sensitive to blue than red, but you
don't see color, so I am not talking about this - in the day on a
white wall...).

The numbers represent the mixing proportions of red, green, and blue
to produce white.  Though the differences may depend on the
temprature of the white, normally given in degrees kelvin.  A body
heated to that temprature will give off that proportion - 6000k is
much bluer than 3000k.

Most monitors have such settings and there are pages and pages of
things on the internet about this (don't get me started about Gamma
correction - I didn't do it for PiNGer and don't want to).

 Tom Zerucha wrote in message [EMAIL PROTECTED]...
 
 On Fri, Nov 10, 2000 at 04:53:17PM -0800, Alex Pakhotin wrote:
  Hi Hans,
 
  gray = 0.299*r + 0.587*g + 0.114*b
 
 I think the equation I use has slightly different constants.
 
 I do this for PiNGer (the viewer for ZBoxZ - GPL OpenSource
 palmboxer.sourceforge.net) to display color PNG and GIF files on
 grayscale palms.
 
 



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

--








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Displaying selfmade bitmaps on PalmOS 3.5

2008-05-28 Thread chanc
Hi

I still can't seem to render selfmade bitmaps to the emulator.  I've looked
through the archives and tried the examples, but the image is still not
appearing.  The display stays white in the emulator.

What's odd is that when I get to the memset below, I start to overwrite
memory.  Doesn't BmpGetBits give me a pointer to the bitmap's data area that
I can then manipulate at will?


Here's what I am doing:


  pBmp = BmpCreate(width,height,8,NULL,error);
  if (pBmp) {
   win = WinCreateBitmapWindow(pBmp, error);
  }

 ptr = (unsigned char *)BmpGetBits(pBmp);


 for (i=0;iheight;i++) {
  memset(ptr, i, width);
  ptr += width;
 }

 WinSetDrawWindow(win);
 WinPaintBitmap(pBmp,0,0);

 BmpDelete(pBmp);






-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps

2008-05-28 Thread Richard M. Hartman
It would help if we knew what the constants represented ...

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!


Tom Zerucha wrote in message [EMAIL PROTECTED]...

On Fri, Nov 10, 2000 at 04:53:17PM -0800, Alex Pakhotin wrote:
 Hi Hans,

 gray = 0.299*r + 0.587*g + 0.114*b

I think the equation I use has slightly different constants.

I do this for PiNGer (the viewer for ZBoxZ - GPL OpenSource
palmboxer.sourceforge.net) to display color PNG and GIF files on
grayscale palms.







-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: How to convert a 8-bits bitmaps to 4-bits Grayscale bitmaps

2008-05-28 Thread Alex Pakhotin
Hi Hans,

gray = 0.299*r + 0.587*g + 0.114*b

Create your own grayscale bitmap and use this formula for every pixel of the
original bitmap.

Alex.




-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Color Bitmaps

2008-05-28 Thread Jamie Macleod
You can do it in the constructor.  Go to Palm.com and look in the knowledge
base.  They have a good article on how to do it.

Jamie
mikel anderson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Re:color Bitmaps

 I am new to Palm Programming, programming in total actually, and I can't
 draw color bitmaps in Constructor, so could someone tell me, in begginers
 terms, how to do color bitmaps.  I think this would have to be done in the
 actual code, and I'm okay with that, an example would be nice to.

 Mikel Anderson
 CEO Impact Studios






 ___
 Say Bye to Slow Internet!
 http://www.home.com/xinbox/signup.html








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Bitmaps

2008-05-28 Thread Luca
or you could create one version of the app that runs the appropriate code
depending on the OS version .


Nesse, Rustin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 In a message dated 10/31/00 3:08:19 PM Mountain Standard Time,
 [EMAIL PROTECTED]
 writes:
 
   In my app I need to have a variable number of 32x32 pixel
 bitmaps. I
 can't
limit my user base to those with =3.5, but there is no
 bitmap API for
  below
there. Any suggestions?
 
   What do you mean?  Bitmaps are a recognized datatype back
 to PalmOS 1.0
  AFAIK.
 
 Sorry I wasn't precise enough...they need to be dynamic bitmaps,
 made/edited/deleted at runtime.
 
 ( }#^} Ritz
 






-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: displaying singular bitmaps in several locations HELP!

2008-05-28 Thread Rick Gadbois


all set thank you!


-Original Message-
From: Kelly J Perkins [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 26, 2000 3:18 PM
To: Palm Developer Forum
Subject: Re: displaying singular bitmaps in several locations HELP!


This is what I use for drawing bitmaps and it works.

 Handle   resH;
 BitmapPtr  resP;
 FormPtr frm;
 int  x;
 int  y;

 frm = FrmGetActiveForm();

 // get a handle to the resource
 resH = DmGetResource( bitmapRsc, FrontBodyBitmap);
 ErrFatalDisplayIf( !resH, Missing bitmap );
 resP = MemHandleLock(resH);

 // draw the bitmap
 WinDrawBitmap (resP, x, y);

 // release the memory handle
 MemPtrUnlock(resP);
 DmReleaseResource( resH );

In my case, the bitmaps are not on the form, they are just in the resource
file.

Hope that helps.

Rick Gadbois [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]


 If I display an empty form and then try to display the already drawn
bitmap
 using, for example:

WinDrawBitmap((BitmapPtr)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,FrontBody
 Bitmap)),10,10);
 I get an object not in form error.
 If I use a Form Bitmap, that doesn't show at all.
 Is there some setup I am missing?  or something else I might be doing
wrong?


 -Original Message-
 From: Ben Combee [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 26, 2000 11:37 AM
 To: Palm Developer Forum
 Subject: Re: displaying singular bitmaps in several locations HELP!


 Rick Gadbois [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  I have a need to display an ever changing variation of 6 simple bitmaps
in
  36 locations dynamically.
  I would like to do this with 6 bitmaps, displaying for example, bitmap1

in
 3
  locations, bitmap 2 in 5 locations, bitmap3 in 0 locations etc...all at
  once.
  In the past for single bitmaps, I have drawn them with constructor, then
  used FrmHideObject/ShowObject, but that it is only good if I draw 216
  bitmaps(36 locations times 6 bitmaps)yuck.

 Draw your 6 bitmaps in Constructor, then use WinDrawBitmap to directly
draw
 them into the screen window.  You'll need to be sure to handle
 frmUpdateEvents to redraw things, but its a lot easier than relying on the
 form manager to draw/undraw everything.




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





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


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: displaying singular bitmaps in several locations HELP!

2008-05-28 Thread Kelly J Perkins
This is what I use for drawing bitmaps and it works.

 Handle   resH;
 BitmapPtr  resP;
 FormPtr frm;
 int  x;
 int  y;

 frm = FrmGetActiveForm();

 // get a handle to the resource
 resH = DmGetResource( bitmapRsc, FrontBodyBitmap);
 ErrFatalDisplayIf( !resH, Missing bitmap );
 resP = MemHandleLock(resH);

 // draw the bitmap
 WinDrawBitmap (resP, x, y);

 // release the memory handle
 MemPtrUnlock(resP);
 DmReleaseResource( resH );

In my case, the bitmaps are not on the form, they are just in the resource
file.

Hope that helps.

Rick Gadbois [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]


 If I display an empty form and then try to display the already drawn
bitmap
 using, for example:

WinDrawBitmap((BitmapPtr)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,FrontBody
 Bitmap)),10,10);
 I get an object not in form error.
 If I use a Form Bitmap, that doesn't show at all.
 Is there some setup I am missing?  or something else I might be doing
wrong?


 -Original Message-
 From: Ben Combee [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 26, 2000 11:37 AM
 To: Palm Developer Forum
 Subject: Re: displaying singular bitmaps in several locations HELP!


 Rick Gadbois [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  I have a need to display an ever changing variation of 6 simple bitmaps
in
  36 locations dynamically.
  I would like to do this with 6 bitmaps, displaying for example, bitmap1

in
 3
  locations, bitmap 2 in 5 locations, bitmap3 in 0 locations etc...all at
  once.
  In the past for single bitmaps, I have drawn them with constructor, then
  used FrmHideObject/ShowObject, but that it is only good if I draw 216
  bitmaps(36 locations times 6 bitmaps)yuck.

 Draw your 6 bitmaps in Constructor, then use WinDrawBitmap to directly
draw
 them into the screen window.  You'll need to be sure to handle
 frmUpdateEvents to redraw things, but its a lot easier than relying on the
 form manager to draw/undraw everything.




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







-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Problem greyscale bitmaps in Constructor 1.5

2008-05-28 Thread Kelly J Perkins
Did you set the screen depth in your app as well? If not, try this for Palm
OS 3.5 code:

This is in my AppStart code:

   UInt32   newDepth = 2; // = 1, 2, 4, 8 - 2 is for 4 color, 4 is for 16
grays

  error = WinScreenMode(winScreenModeSet, NULL, NULL,newDepth, NULL);

It is a different call for pre-3.5 code. Let me know if you need that too.
Don't forget to set it back to the default on AppStop also.

   err = WinScreenMode(winScreenModeSetToDefaults, NULL, NULL,NULL, NULL);

Hope that helps!

Kelly

Matt Becker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 I see to have a problem with constructor.  I draw a bitmap or import a
bitmap
 into constructor, and when I compile and test the app, all my grey tones
 convert to black.  Im using a PalmVx ROM.  I set the color depth to 2bit
in
 constructor for the image.  Thanks in advance for your help..

 Matt









-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


RE: displaying singular bitmaps in several locations HELP!

2008-05-28 Thread Rick Gadbois

If I display an empty form and then try to display the already drawn bitmap
using, for example: 
WinDrawBitmap((BitmapPtr)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,FrontBody
Bitmap)),10,10);
I get an object not in form error.
If I use a Form Bitmap, that doesn't show at all.
Is there some setup I am missing?  or something else I might be doing wrong?


-Original Message-
From: Ben Combee [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 26, 2000 11:37 AM
To: Palm Developer Forum
Subject: Re: displaying singular bitmaps in several locations HELP!


Rick Gadbois [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 I have a need to display an ever changing variation of 6 simple bitmaps in
 36 locations dynamically.
 I would like to do this with 6 bitmaps, displaying for example, bitmap1 in
3
 locations, bitmap 2 in 5 locations, bitmap3 in 0 locations etc...all at
 once.
 In the past for single bitmaps, I have drawn them with constructor, then
 used FrmHideObject/ShowObject, but that it is only good if I draw 216
 bitmaps(36 locations times 6 bitmaps)yuck.

Draw your 6 bitmaps in Constructor, then use WinDrawBitmap to directly draw
them into the screen window.  You'll need to be sure to handle
frmUpdateEvents to redraw things, but its a lot easier than relying on the
form manager to draw/undraw everything.




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


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


displaying singular bitmaps in several locations HELP!

2008-05-28 Thread Rick Gadbois
I have a need to display an ever changing variation of 6 simple bitmaps in
36 locations dynamically.
I would like to do this with 6 bitmaps, displaying for example, bitmap1 in 3
locations, bitmap 2 in 5 locations, bitmap3 in 0 locations etc...all at
once.
In the past for single bitmaps, I have drawn them with constructor, then
used FrmHideObject/ShowObject, but that it is only good if I draw 216
bitmaps(36 locations times 6 bitmaps)yuck.

Would someone PLEASE point me in the right direction as to what
functions/examples to use to do this?
CW6,NT,Palm3.5.




-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: transferring and displaying bitmaps images

2008-05-28 Thread Heather Gazdik
Along with the above question:

Is the .bmp file format the only format supported in the Palm??  I will be
using on CW environment.
What is the compression like??

heather
Jeff Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 using CW 6.0 on Windows NT

 Hello all,

 I would like to upload bitmaps, via a .pdb file, display the bitmaps. I
 know how to get the data to the the device, but I'm a little confused
about
 how to get a BitmapPtr to it.

 Should I include all the BitmapType header information in the .pdb file?

 Should I create another DB file on the device with appropriate headers
 followed by image data and get a pointer to that?

 If someone has an example of how to do this I'd really appreciate seeing
it.


 Thanks in advance,

 -jeff

 I'm looking into displaying bitmaps on the Palm?  Does anyone know of a
 good reference to get started on this, or a tutorial? Any
 suggestions?   Things like storage, file formats, etc.








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: displaying bitmaps

2008-05-28 Thread UCS308
But I think the question is worth asking again because there few answer and
no concrete examples. I have built a simple splash screen using the CWarrior
Constructor.  I have images that are 1bpp, 2bpp, 4bpp and 8bpp colour. I
created a bit map family, and, on none of the devices does the bitmap
display correctly.

I started to work with WinScreenMode but it fails to return values for
anything other than Color and Height on the Emulators.

So I think this is a very poorly documented subject and significantly
impacts the building of professional applications for the Palm. If any body
does have examples or tips on how to achieve this I think it would fit well
in  any FAQ'S, and be a useful addition to this forum.

Garry


Bulent Gecer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Have you searched the archive?  This question has been asked lots of
 times...
 Check out http://www.egroups.com/group/palm-dev-forum

 /Bulent


 Jeff Davey [EMAIL PROTECTED] skrev i
 diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
 
  Hello all,
 
  I'm looking into displaying bitmaps on the Palm?  Does anyone know of a
  good reference to get started on this, or a tutorial? Any
  suggestions?   Things like storage, file formats, etc.
 
 
  TIA,
 
  -jeff
 
 
 









-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


SV: displaying bitmaps

2008-05-28 Thread Bulent Gecer
Have you searched the archive?  This question has been asked lots of
times...
Check out http://www.egroups.com/group/palm-dev-forum

/Bulent


Jeff Davey [EMAIL PROTECTED] skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]

 Hello all,

 I'm looking into displaying bitmaps on the Palm?  Does anyone know of a
 good reference to get started on this, or a tutorial? Any
 suggestions?   Things like storage, file formats, etc.


 TIA,

 -jeff








-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Unexpected Error #32 - color bitmaps

2008-05-28 Thread Ole
One alternative is www.vfdide.com

HTH
Ole

Richard Hartman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Is there a GUI form-builder that saves as PilRC code?







-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Unexpected Error #32 - color bitmaps

2008-05-28 Thread Richard Hartman
Is there a GUI form-builder that saves as PilRC code?

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!


Tilo Christ wrote in message [EMAIL PROTECTED]...

Hi!

You can save yourself a lot of pain if you are using the PILRC-plugin and
PILRC instead of Constructor. Instead of painstakingly
pasting all your images into the Constructor and then doing dozens of
mouseclicks to make them member of a bitmap-family and set
their properties right you just say

BITMAPFAMILY ID myFamily bitmap1bpp.bmp bitmap2bpp.bmp bitmap4bpp.bmp
bitmap8bpp.bmp

in a plain ASCII file. And it will read your images from your hard drive,
provided they are in Windows BMP format. You can also mix
resources you create with PilRC and resources you create with Constructor.
Just do your Bitmapfamilies with PilRC and your forms
with Constructor. Works great!
You can find both PilRC and the download link to the CodeWarrior PilRC
plugin at http://www.ardiri.com

Cheers,
Tilo










-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Disappering bitmaps-not in form

2008-05-28 Thread Pilot Pogrammer
I'm using the bitmaps in the same form...

Richard Anderson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Ensure you are not trying to use the FormPtr/ID for one form on another.
ie
 if you try and FrmShow on two different forms with the same pointer you
get
 this error. You can easily get around this by using GetActiveForm before
the
 call. I had this problem when I had a generic display function which was
 used on multiple forms.

 Rik

  -Original Message-
  From: Pilot Pogrammer [SMTP:[EMAIL PROTECTED]
  Sent: 29 August 2000 15:22
  To: Palm Developer Forum
  Subject: Disappering bitmaps-not in form
 
  I have a form with multiple bitmaps. When starting the app I show some
  bitmaps, but under runtime I want to switch to another(they are at the
  same
  position). When I switch back to the first one I get a message objet
not
  in
  form.
 
  I use the API  FrmShow/HideObject() with the bitmap resource ID...
  I also get a pointer to my form by using FrmGetFormPtr(MyForm);
 
  What's wrong?? I have no clue..
 
 
 
 
  --
  For information on using the Palm Developer Forums, or to unsubscribe,
  please see http://www.palmos.com/dev/tech/support/forums/







-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Disappering bitmaps-not in form

2008-05-28 Thread Pilot Pogrammer
I have a form with multiple bitmaps. When starting the app I show some
bitmaps, but under runtime I want to switch to another(they are at the same
position). When I switch back to the first one I get a message objet not in
form.

I use the API  FrmShow/HideObject() with the bitmap resource ID...
I also get a pointer to my form by using FrmGetFormPtr(MyForm);

What's wrong?? I have no clue..






-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Unexpected Error #32 - color bitmaps

2008-05-28 Thread chongwm
Would this be the same PilRC as the one that's available on Neil Rhodes'
website (http://www.calliopeinc.com/devcorner.htm) -- PilRC CodeWarrior
plugin?


Tilo Christ wrote:
 You can save yourself a lot of pain if you are using the PILRC-plugin and 
 PILRC instead of Constructor.


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Unexpected Error #32 - color bitmaps

2008-05-28 Thread chongwm
I've looked through the archives at escribe, and this Error #32 thing
has been discussed in April, however mine is of a different
circumstance.

The codewarrior R6 linker gives me the following:

Link Error   : Unexpected Error #32. 
Name options syntax error in resource: PICT  #2320
Unexpected Error #32. 
Name options syntax error in resource: PICT  #2330

It should be because I named PICT#2320 as /-c-4/Logo 4bit
and PICT#2330 as /-c-8/Logo 8bit

I suppose this is wrong. Now, with Constructor 1.5b7 does one still need
to use the /-c-1/ type of naming for a compressed black/white bitmap?
If so, how does one name a 4 bit and 8bit image?

Is there a step-by-step howto for using bitmap families? I've looked
through the KB and the Constructor doc, and I've tried messing around
Constructor, but I've never managed to get a color bitmap from a bitmap
family to appear in POSE with the color ROM. The only image I managed to
get up is the 1 bit one (among the other bitdepth in the bitmap family),
and only when it has the same resourceID as the bitmap family.


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Help! Calling app bitmaps replaced by Palm FileBrowser's

2008-03-04 Thread Luc Le Blanc
I tried using the FileBrowser API (when available) to open a file on the SD 
card. But upon returning from the FileBrowserLibShowOpenDialog call, my bitmaps 
2000 and 2100 get replaced by icons that just appeared in the FileBrowser form. 
Is there any cleanup I must do? I tried opening/closing the FileBrowser library 
before/after each call, to no avail. I dont care renumbering these 2 bitmaps if 
that's all it takes, but can there be other resources overwritten by this API?

If Palm ever decides to make this library available for download, may I suggest 
adding a New Folder button, like the menu item (only) available in the Files 
app.


Luc Le Blanc
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread Ben Combee
On 10/11/07, JSeb [EMAIL PROTECTED] wrote:
 Maybe I'm missing something, but it seems CtlSetGraphics accepts only Tbmp 
 resources. I cannot put an icon (tAIB) resource in there...

Icon and bitmap resources are the same thing in Palm OS, they just
have different resource types.

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread Lionscribe
JSeb wrote:
I felt it would be more elegant to be at least able to specify its position in 
the resource file
Well, you can put a gadget in the resource,
 and then draw the icon it the gadget's bounds.
If you wnt more fun, make it an extended gadget.
Lionscribe

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread JSeb
I agree with Phreak: as I wrote in the original post, there is no way I will 
including TWICE the same .BMP in my resources (maybe I'm not so radical 
anymore).

I now expect that the only remaining solution is to do the conversion from 
icon to bitmap programmatically. That I was able to do (find the application 
icon's handler, get a pointer to a bitmap from that handler).

I then used WinDrawBitmap to display the bitmap. What I didn't like about that 
solution is that the position of the bitmap is specified in the code. I felt it 
would be more elegant to be at least able to specify its position in the 
resource file (well, I would have hoped to do EVERYTHING in the resource file), 
hence my interest in Miro's suggestion to use CtlSetGraphics() on a graphical 
button.

I guess I am confused by my newbiness: I would have expected CtlSetGraphics() 
to take a bitmap pointer, instead of a resource ID.

I am spending an inordinate amount of time on that, but I feel I am learning 
something!

Thanks for your answers.
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread Ben Combee
Yes, but just duplicate the bitmap if it's not too large, including it
twice in your file.

On 10/12/07, JSeb [EMAIL PROTECTED] wrote:
 Okay, but when I use

CtlSetGraphics(pMyGraphicButton, kMY_BMP, NULL);

 it works fine (kMY_BMP is the resource ID of some bitmap). But if I use 
 instead kMY_ICON, the resource ID for my application icon (1000), it doesn't 
 work --- nor did I expect it to. I don't get my icon in the graphical button.

 An ID is just an integer, right? I assume that if a function expects a tBMP 
 ID, it checks for the ID in a bitmap resource table, which has to be separate 
 from the icon resource table (since the same ID can be used for a bitmap and 
 an icon).

 So in my case, kMY_ICON is simply not known as a bitmap ID!

 Do I get this right?

 I appreciate your help!
 --
 For information on using the ACCESS Developer Forums, or to unsubscribe, 
 please see http://www.access-company.com/developers/forums/


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread JSeb
Okay, but when I use

   CtlSetGraphics(pMyGraphicButton, kMY_BMP, NULL);

it works fine (kMY_BMP is the resource ID of some bitmap). But if I use instead 
kMY_ICON, the resource ID for my application icon (1000), it doesn't work --- 
nor did I expect it to. I don't get my icon in the graphical button.

An ID is just an integer, right? I assume that if a function expects a tBMP ID, 
it checks for the ID in a bitmap resource table, which has to be separate from 
the icon resource table (since the same ID can be used for a bitmap and an 
icon).

So in my case, kMY_ICON is simply not known as a bitmap ID!

Do I get this right?

I appreciate your help!
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-12 Thread Phreak OnALeash
Hi,

Personally, including a file twice in a resource is less elegant than doing
it programatically...
At least it takes less memory that way :-)

It also leads to better looking resource files.

~Ryan


On 10/12/07, Ben Combee [EMAIL PROTECTED] wrote:

 Yes, but just duplicate the bitmap if it's not too large, including it
 twice in your file.


---
/*PhreakOnALeash*/
My heart is human, my blood is boiling, my brain IBM

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Re: Icons and Bitmaps

2007-10-11 Thread Miro Pomsar
Just put there a disabled graphical button with no frame and call 
CtlSetGraphics().

If you want to display a BitmapPtr the only way is to do it yourself :)

Regards,
   Miro

JSeb wrote:

Hi, newbie here.

I want to display the application icon on my about form.

Wait! Read on! I'm not _that_ a newbie!

I am able to do that programmatically: find the application icon's handler, get 
a pointer to a bitmap from that, and WinDrawBitmap the bitmap (I don't have the 
code handy, so you'll have to forgive my lack of details).

So everything works fine. Except I've been looking to do that in a more elegant 
way. By that I mean: directly in the resource file.

If I want to include a bitmap on a form, it seems the only way is through 
FORMBITMAP. This means I can use the bitmaps I define in the resource file, but 
not the icons, right?

So if I want to display the application icon on a form, I have to define it 
TWICE: once as a bitmap (to be used on the form), and once as an icon (to be 
used as the... icon).

Did I understand correctly? Well, there is no way I will including TWICE the 
same .bmp for two different purposes! even if that't just a few hundred bytes!

Is there a better way? in particular, is it possible, in the resource file, to 
make a bitmap refer to an icon?

Your help is much appreciated.
  



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Icons and Bitmaps

2007-10-11 Thread JSeb
Thanks for the help. I like the idea.

Maybe I'm missing something, but it seems CtlSetGraphics accepts only Tbmp 
resources. I cannot put an icon (tAIB) resource in there...

Thanks! 
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Icons and Bitmaps

2007-10-10 Thread JSeb
Hi, newbie here.

I want to display the application icon on my about form.

Wait! Read on! I'm not _that_ a newbie!

I am able to do that programmatically: find the application icon's handler, get 
a pointer to a bitmap from that, and WinDrawBitmap the bitmap (I don't have the 
code handy, so you'll have to forgive my lack of details).

So everything works fine. Except I've been looking to do that in a more elegant 
way. By that I mean: directly in the resource file.

If I want to include a bitmap on a form, it seems the only way is through 
FORMBITMAP. This means I can use the bitmaps I define in the resource file, but 
not the icons, right?

So if I want to display the application icon on a form, I have to define it 
TWICE: once as a bitmap (to be used on the form), and once as an icon (to be 
used as the... icon).

Did I understand correctly? Well, there is no way I will including TWICE the 
same .bmp for two different purposes! even if that't just a few hundred bytes!

Is there a better way? in particular, is it possible, in the resource file, to 
make a bitmap refer to an icon?

Your help is much appreciated.
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-18 Thread parimala
PnoJpegLib functions (PnoJpeg2Resize and PnoJpeg2Resample) didn't give the 
expected scaled down version of the image I passed to them, instead they 
returned the image pointer that was input.  

Image Library does look complicated. I'm checking it out. Thanks!



pnojpeglib can resize image both to smaller and to bigger, i am sure about it
because i used it. try pnoJpeg2Reszie and pnoJpeg2Resample functions.

on newer devices you can use builtin image library to scale images too, but it
can scale images only from bigger to smaller and its not as good (it know more
features but i don't like way how it works - using temporary files etc., also
api is much more complicated). see palmOnePhoto.h in palm sdk for details
(download at pluggedin.palmone.com)
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-18 Thread parimala
Thanks for your reply! I was in search of some functions in some built-in 
library that does this job fairly well. If all else fails, this will come handy!




scaling from 320x320 to 80x80 is just 4-1 scaling. it is not hard to implement.

for(row){
for(col){
read(16 pixels from src image at coords [row*4,col*4])
separate the 16 pixels into rgb parts
average all rgb parts
write one pixel to destination image at coord [row,col]
}
}

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-17 Thread parimala
Thanks for your reply. Pnojpeglib contains functions for scaling 'up' an image. 
I couldn't find any for scaling it down. 

I found one or two scalers for Palm that did promise scaling down a bmp. But 
they were either outdated or shareware! Are there freewares that work for Palm 
OS 5? 



i guess the fastest way would be to implement some scaler (there is lot of
sources for them on internet, just search), or use resize functions from 
pnojpeglib


[EMAIL PROTECTED] wrote:
 The application I'm developing requires that a full screen size 
bitmap be reduced to a thumbnail, that is, from 320 x 320 to 80 x 80 (double 
density).

 I've tried creating an offscreen window and drawing the bitmap on it and then 
 copying the offscreen window contents to the double density active window 
 with kBitmapScalingOff option and the size then reduces to 160 x 160. How can 
 it be reduced further?

 There's a Media application which does a remarkable job at reducing images to 
 thumbnails.
 
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-17 Thread parimala
Thanks for your reply. I'll give either of these a go!


If you want to do it fast, use the nearest neighbor algorithm. If you
want to do it well, use the bilinear algorithm.

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-17 Thread Michal Seliga
pnojpeglib can resize image both to smaller and to bigger, i am sure about it
because i used it. try pnoJpeg2Reszie and pnoJpeg2Resample functions.

on newer devices you can use builtin image library to scale images too, but it
can scale images only from bigger to smaller and its not as good (it know more
features but i don't like way how it works - using temporary files etc., also
api is much more complicated). see palmOnePhoto.h in palm sdk for details
(download at pluggedin.palmone.com)

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Creating thumbnails of full screen size bitmaps

2007-04-16 Thread parimala
The application I'm developing requires that a full screen size bitmap be 
reduced to a thumbnail, that is, from 320 x 320 to 80 x 80 (double density). 

I've tried creating an offscreen window and drawing the bitmap on it and then 
copying the offscreen window contents to the double density active window with 
kBitmapScalingOff option and the size then reduces to 160 x 160. How can it be 
reduced further? 

There's a Media application which does a remarkable job at reducing images to 
thumbnails. 
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-16 Thread Michal Seliga
i guess the fastest way would be to implement some scaler (there is lot of
sources for them on internet, just search), or use resize functions from 
pnojpeglib

[EMAIL PROTECTED] wrote:
 The application I'm developing requires that a full screen size bitmap be 
 reduced to a thumbnail, that is, from 320 x 320 to 80 x 80 (double density). 
 
 I've tried creating an offscreen window and drawing the bitmap on it and then 
 copying the offscreen window contents to the double density active window 
 with kBitmapScalingOff option and the size then reduces to 160 x 160. How can 
 it be reduced further? 
 
 There's a Media application which does a remarkable job at reducing images to 
 thumbnails. 
 

-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Re: Creating thumbnails of full screen size bitmaps

2007-04-16 Thread P. Douglas Reeder
If you want to do it fast, use the nearest neighbor algorithm.  If you 
want to do it well, use the bilinear algorithm.



--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


Changing bitmaps on selection/deselection

2007-03-29 Thread kaushik15
Hi,
I have some graphic push button in Form.Now what i want when the focus is 
on some push button , it should be changed to other image.For this i have 
created two push button but i am not able to roll them on selection and 
deselection.I am using CtlSetGraphics function.Please help.I will be grateful 
to you all.

regards
kapil
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


re: Changing bitmaps on selection/deselection

2007-03-29 Thread Durgesh Trivedi
Just put them 1 over the other and hide on the click to each other .i think its 
th best way to do that 
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


re: Changing bitmaps on selection/deselection

2007-03-29 Thread Bismi
If instead of push button you can put graphic button then you can make direct 
settings in your resource file as per your requirements.
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/


re: FTP of bitmaps

2007-01-30 Thread Alexander R. Pruss
Look at NVBackup source code, specifically ftp.c.

www.sf.net/projects/handypalmstuff

You can use all the code from there you want as it's under a BSD license.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


FTP of bitmaps

2007-01-23 Thread Darin Horton
I have downloaded the signature++ sample program that I found on the palm
site. We have an existing application written that downloads text
information from the palm to a windows server via FTP (this FTP program was
also downloaded from a sample found on the palm site). We need to use FTP
because some of our customers have the device at their customers office, so
the hot sync program isn't available - just a modem.

 

I am looking for an FTP program that can transfer the bitmap created by the
signature program.

 

The main jest of the FTP program is:

 

for( i=0; i  totalCnt; i++, recordNum++)

{

printf( . );//One dot for each record read

recordH = DmQueryNextInCategory( dbP, recordNum, 0
);

if( recordH == NULL )

{

done = true;

}

else

{

src = (PackedItemPtr) MemHandleLock(
recordH );

if( src != NULL )

{

item = (UnpackedItemPtr)
MemPtrNew( sizeof( UnpackedItem));

//item-locnID =
(src-itemID);

//item-itemID =
(src-itemID)+StrLen( (src-itemID)) + 1;

//item-qty = (src-itemID)
+ StrLen( (src-itemID )) + 1 +

//
StrLen( item-itemID) +1;

//StrPrintF( outBuf,
%s,%s,%s,%s,%s\n, item-locnID, item-itemID, item-qty, po, date );



UnpackRecord( item, src);

if( StrCompare( cust,
item-custID ) == 0 )

{

StrPrintF(
outBuf, %s,%s,%s,%s,%s,%s\n, item-locnID, item-itemID, item-qty, po,
date, item-custID );

NetUWriteN(
sock, (UInt8 *)outBuf, StrLen(outBuf));

totalBytes +=
sizeof(outBuf);

}

MemPtrFree( (MemHandle) item
);

}

MemHandleUnlock( recordH );

}

}

 

So, instead of doing a StrPrintF I would need to use something that puts the
binary data over the FTP. Any ideas?

 

Thanks in advance.

 

Darin


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

Re: High res Bitmaps

2006-10-03 Thread Roger Stringer

IMHO - Use Constructor.
While the Codewarrior default is pilRC, it fully supports 
Constructor, and that has a better GUI


Roger   (sorry Aaron!)


At 04:15 AM 10/3/2006, you wrote:

Subject: Re: High res Bitmaps
From: Aaron Ardiri [EMAIL PROTECTED]
Date: Mon, 2 Oct 2006 13:38:25 +0200
X-Message-Number: 3

On 10/2/06, Flavio Renga [EMAIL PROTECTED] wrote:
 Or is better to use Constructor for Palm OS?
 Have I to modify the system DEPTH, or only the bitmap DEPTH?

use PilRC

codewarrior R9 does not use constructor anymore; it actually used
PilRC to generate the resources. you can edit .rcp files yourself;
but, there are also a number of tools out there to help you with a GUI
approach. the most up-to-date method is via text file editing.


Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)


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


Re: High res Bitmaps

2006-10-02 Thread Aaron Ardiri

On 10/1/06, Flavio Renga [EMAIL PROTECTED] wrote:

Does anyone know how to insert high res (deep color) bitmaps in an application?
I'm using Falch.net Developer Studio, but only BITMAPCOLOR seems to work:
BITMAPCOLOR16K, BITMAPCOLOR24K and BITMAPCOLOR32K doesn't
display anything on Falch.net virtual device.
Thanks all!


are you using the DEPTH option inside the BITMAPCOLOR tags?
you can define 72dpi or 144dpi (hires). falch.net utilities are no longer
supported; so, any new tags that were added to PilRC may not actually
appear in their virtual device.

--
// Aaron Ardiri

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


Re: High res Bitmaps

2006-10-02 Thread Flavio Renga
Thanks!
So you suggest me to use PilRC?
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: High res Bitmaps

2006-10-02 Thread Flavio Renga
Or is better to use Constructor for Palm OS?
Have I to modify the system DEPTH, or only the bitmap DEPTH?
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: High res Bitmaps

2006-10-02 Thread Aaron Ardiri

On 10/2/06, Flavio Renga [EMAIL PROTECTED] wrote:

Or is better to use Constructor for Palm OS?
Have I to modify the system DEPTH, or only the bitmap DEPTH?


use PilRC

codewarrior R9 does not use constructor anymore; it actually used
PilRC to generate the resources. you can edit .rcp files yourself;
but, there are also a number of tools out there to help you with a GUI
approach. the most up-to-date method is via text file editing.

--
// Aaron Ardiri

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


High res Bitmaps

2006-10-01 Thread Flavio Renga
Does anyone know how to insert high res (deep color) bitmaps in an application? 
I'm using Falch.net Developer Studio, but only BITMAPCOLOR seems to work: 
BITMAPCOLOR16K, BITMAPCOLOR24K and BITMAPCOLOR32K doesn't display anything on 
Falch.net virtual device.
Thanks all!

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


Re: Bitmaps in Resuorce???

2006-07-23 Thread kaineu
thanks for the help. it worked. I tried using WinCreateBitmapWindow instead of 
WinCreateOffscreenWindow and it worked.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Bitmaps in Resuorce???

2006-07-20 Thread kaineu
I'm trying to retrieve the data of Bitmap files in the Resource. how do I do 
that?? I'm not sure what to use. I was able to get the pointer to the 
BitmapType using DmGetResource, but after that I don't know how to access the 
bytes of the image. What do I need to do? I need the data of the bitmap to 
display the bitmap pixel by pixel on screen.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Bitmaps in Resuorce???

2006-07-20 Thread Neil Whitworth

[EMAIL PROTECTED] wrote:

I'm trying to retrieve the data of Bitmap files in the Resource. how do I do 
that?? I'm not sure what to use. I was able to get the pointer to the 
BitmapType using DmGetResource, but after that I don't know how to access the 
bytes of the image. What do I need to do? I need the data of the bitmap to 
display the bitmap pixel by pixel on screen.



You could draw the bitmap to an offscreen window (using 
WinCreateOffscreenWindow + WinSetDrawWindow + WinDrawBitmap) then use 
WinGetPixel/WinGetPixelRGB to get the individual pixels.


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


Storing bitmaps for game background efficiently

2006-06-21 Thread Tam Hanna
Hi Ppl,
long time no write.

Anyways, I now have a problem. For my game, I have 10 backgrounds that are
in 16bit BMP format(approximately 300k big each). When adding them to PODS
with best compression, they get reduced to like 150 kb each.

Do you think that a 2 MB game is still ok, or do you think that that is too
big? 

Is there any way to save space efficiently? Does PODS compress the bitmaps
well, or can the Palm OS 5 do better? 

I already thought of a few methods, but each of those would be extremely
heavy(like zipping up the little blocks with Zlib)

Best regards and thanks for any help
Tam Hanna


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


Re: Storing bitmaps for game background efficiently

2006-06-21 Thread Aaron Ardiri

On 6/21/06, Tam Hanna [EMAIL PROTECTED] wrote:

Hi Ppl,
long time no write.

Anyways, I now have a problem. For my game, I have 10 backgrounds that are
in 16bit BMP format(approximately 300k big each). When adding them to PODS
with best compression, they get reduced to like 150 kb each.

Do you think that a 2 MB game is still ok, or do you think that that is too
big?


yes. it is way too big - unless the game itself is also big. artwork can be
easily reduced in size. the code is the only true thing that can be problem
some to compress.

for bitmaps - you can try using a palette based format (8bit) and then convert
to 16bit in real time? mix compression and encoding together to get the best
formats. for example; in lemmings - we have images that are 640x160 in size.
these images compress to anywhere between 2kb and 15kb each.

you need to treat images as a data resource; avoid using Tbmp resources;
as they tend to be required to be stored as the bitmap itself (bad compression)


I already thought of a few methods, but each of those would be extremely
heavy(like zipping up the little blocks with Zlib)


you are thinking in the right direction - write the code in arm - not
heavy anymore

--
// Aaron Ardiri

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


Using Form Bitmaps

2006-05-09 Thread Jay Ts
I have a form to which I've tried to add a form
bitmap, with the intent that it is supposed to
appear as a background, with other things, including
labels, fields, and buttons (with bitmaps) appearing
in front of it.

But what happens is that all of those end up hidden,
with the form bitmap appearing in front of them, and
that's all I see until I explicitly cause one of the
gadgets to update.

I am using the PODS Resource Editor, and there doesn't
seem to be any way using it to specify layering of
the visual appearance (order of drawing) of things
in the form when it first appears (as a result of
a FrmDrawForm() call).  And I could find nothing having
to do with that in the .xrd file, either.

Is there any way at all (maybe using CodeWarrior?) to
properly handle this?

Jay Ts
-- 
Every child is an artist. The problem is
how to remain an artist once he grows up.
- Pablo Picasso

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


Re: Using Form Bitmaps

2006-05-09 Thread Douglas Handy
Jay Ts,

I am using the PODS Resource Editor, and there doesn't
seem to be any way using it to specify layering of
the visual appearance (order of drawing) of things
in the form when it first appears (as a result of
a FrmDrawForm() call).  And I could find nothing having
to do with that in the .xrd file, either.

I think you'll find that different Palm OS versions layer overlapping form
objects differently.  That is, pre-OS5 devices will use a different order than
OS5 devices.  So to my knowledge, to get the effect you want you can't just let
FrmDrawForm do the drawing for you.

Doug

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


Re: Using Form Bitmaps

2006-05-09 Thread Michal Seliga
AFAIK all versions draw in same order - and its order in which controls are
stored in form structure. soif you have 2 controls on same place later
definition will be drawn later so it will overlap previous one

but its not enough. i played with it some time ago and i had problems with
fields, they didn't looked nice because they erased screen, so there was bitmap
with ugly white rectangles where field was with labels, lists, buttons and
others there wasn't any problem. unfortunately i needed editable fields too so i
gave up whole idea

Douglas Handy wrote:
 Jay Ts,
 
 I am using the PODS Resource Editor, and there doesn't
 seem to be any way using it to specify layering of
 the visual appearance (order of drawing) of things
 in the form when it first appears (as a result of
 a FrmDrawForm() call).  And I could find nothing having
 to do with that in the .xrd file, either.
 
 I think you'll find that different Palm OS versions layer overlapping form
 objects differently.  That is, pre-OS5 devices will use a different order than
 OS5 devices.  So to my knowledge, to get the effect you want you can't just 
 let
 FrmDrawForm do the drawing for you.
 
 Doug
 

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


Re: Using Form Bitmaps

2006-05-09 Thread Jay Ts
Michal Seliga wrote:
 AFAIK all versions draw in same order - and its order in which controls are
 stored in form structure. soif you have 2 controls on same place later
 definition will be drawn later so it will overlap previous one

OK, maybe if I rearrange the order of the definitions in the
AppResources.xrd file, it will change the drawing order.
I'll try it.

 i played with it some time ago and i had problems with
 fields, they didn't looked nice because they erased screen, so there was 
 bitmap
 with ugly white rectangles where field was

I wonder if this is the same as a problem I'm having.  On newer devices,
sometimes fields aren't drawn properly, and the border area around them
(about 2 pixels on all 4 sides) shows through (acts transparent) to
show the form behind it.  This happened when I used FrmDoDialog() to
put up a very simple form with one editable field and an OK button.

This does not occur on older devices (T|E or Zire {21|31|71}), but
I've seen it on the Z22(?), TX and LifeDrive (and probably others).
The behavior of my LifeDrive (actual device) matches what I'm seeing
on the LifeDrive simulator, so it's not just a simulator bug.

While running Gremlins on the simulators, I noticed it happens even
with some of Palm's own software, so I'm pretty sure it isn't just me.
In fact, it looks like a bug in the recent releases of Garnet 5.x.

Jay Ts

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


Re: Using Form Bitmaps

2006-05-09 Thread Regis St-Gelais
Michal Seliga [EMAIL PROTECTED] a écrit dans le message de news: 
[EMAIL PROTECTED]
 AFAIK all versions draw in same order - and its order in which controls 
 are
 stored in form structure. soif you have 2 controls on same place later
 definition will be drawn later so it will overlap previous one

Not true.
I don't recall which version but some versions draw in revers order of the 
controls in the form structure.

-- 
Regis St-Gelais
www.laubrass.com 



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


Re: Using Form Bitmaps

2006-05-09 Thread Jay Ts
Regis St-Gelais wrote:
 Michal Seliga a ?crit dans le message de news: 
  AFAIK all versions draw in same order - and its order in which controls 
  are
  stored in form structure. soif you have 2 controls on same place later
  definition will be drawn later so it will overlap previous one
 
 Not true.
 I don't recall which version but some versions draw in revers order of the 
 controls in the form structure.

Oh, now don't tell me that! :)

I got things to work by editing my AppResources.xrd file, and putting
the definition of the form bitmap prior to the objects that need to
be displayed in front.  It works perfectly on all the simulators
I've tried so far!

Hopefully, the backwards-drawing versions will all be prior to Palm
OS 4, because there are no devices from that historical time period I
feel I need to support.

Jay Ts
-- 
The foundation of all mental illness is
the avoidance of legitimate suffering.
- Carl Jung

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


Re: Using Form Bitmaps

2006-05-09 Thread Douglas Handy
Jay Ts,

Hopefully, the backwards-drawing versions will all be prior to Palm
OS 4, because there are no devices from that historical time period I
feel I need to support.

My recollection was that it was OS5 when it switched, not OS4.  And that
originally the objects drew in object index order (which I believe is the
sequence the objects are defined in the resource file).

But that when it changted it started going in reverse index order.  In the back
of my mind, I was thinking this may be a by-product of the OS5 conversion of the
m68k resources to the native resources.  

But maybe it was OS4 when it switched.  What I do remember for sure is that at
some point it started acting exactly backwards, so you couldn't use the resource
sequence to consistently control the behavior on all devices.

Doug

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


bitmaps supporting 160x160 and 320x320 displays

2006-03-24 Thread L
I imported a bitmap of 320x320 that had 24-bit colors, to an 16-bit RGB 1X 
160x160, is there a way not to lose so much resolution when scaling the bitmap 
downto 160x160 1X? What is the best ways to achieve high resolution and similar 
colors? 

Are all 16-bit RGB files supported by any 160x160 display?

What is usually the way things ship within an prc file to support multiple 
displays?

Many thanks,

Luis


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


Re: bitmaps supporting 160x160 and 320x320 displays

2006-03-24 Thread Ben Combee
Look at bitmap families -- this is a way to have multiple resolution
vesions of a bitmap within a single resource.  They're supported by
the RSRC, RCP, and XRD formats.

On 3/24/06, L [EMAIL PROTECTED] wrote:
 I imported a bitmap of 320x320 that had 24-bit colors, to an 16-bit RGB 1X 
 160x160, is there a way not to lose so much resolution when scaling the 
 bitmap downto 160x160 1X? What is the best ways to achieve high resolution 
 and similar colors?

 Are all 16-bit RGB files supported by any 160x160 display?

 What is usually the way things ship within an prc file to support multiple 
 displays?

 Many thanks,

 Luis


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


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


re: 1-bit bitmaps and backgrounds

2006-02-27 Thread Thomas Okken
This is documented behavior; read the entries on WinDrawBitmap() and 
WinDrawOperation in the PalmOS Programmer's API reference.
The easiest solution is to write a little convenience function, like this --

void DrawMonoBitmap(BitmapType *bm, Coord x, Coord y) {
RGBColorType savedBG, savedFG);
RGBColorType black, white;
black.r = black.g = black.b = 0;
white.r = white.g = white.b = 0;
WinSetBackColorRGB(white, savedBG);
WinSetForeColorRGB(black, savedFG);
WinDrawBitmap(bm, x, y);
WinSetBackColorRGB(savedBG, NULL);
WinSetForeColorRGB(savedFG, NULL);
}

Hope this helps,

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


Re: 1-bit bitmaps and backgrounds

2006-02-27 Thread Thomas L . Christensen
On Mon, 27 Feb 2006 11:10:22 -, Thomas Okken
[EMAIL PROTECTED] wrote:

This is documented behavior; read the entries on WinDrawBitmap() 
and WinDrawOperation in the PalmOS Programmer's API reference.

Thanks for the hint. I must say I don't understand the point in doing
so. Well, there are so many things I don't understand...  ;-)

The easiest solution is to write a little convenience function, like this --

Thanks...



Thomas




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


Re: 1-bit bitmaps and backgrounds

2006-02-27 Thread Jerome Chapdelaine

Hi!

1-bit bitmaps are not black and white... they are foreground and 
background colors. Here's a quote from the WinSetDrawMode() / 
WinDrawModes enumeration taken from PalmOS Reference:

--
1-bit sources (bitmap, text, and patterns) that don’t have a
color table are given a color table where entry 0 is the backColor
and entry 1 is the foreColor (textColor for text).
--

Jerome



Thomas L. Christensen wrote:

Hi

I am making a simple card game using OnBoardC and have I discovered a
strange thing. I use WinSetBackColor to make a green background in the
window. Then I draw a 8-bit bitmap image of a white card. I then draw
a 1-bit bitmap on top of that card - and then the green background
color is used as background in the 1-bit bitmap! Setting or removing
transparency in the 1-bit bitmap (using RsrcEdit or PRCEdit) doesn't
change anything. http:/hjem.get2net.dk/lindblad/temp/test.gif

Is this documented behavior? Should 1-bit bitmaps inherit the
background color set by WinSetBackColor? I have fixed it by using
2-bit bitmaps, but... ???

Thomas



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


1-bit bitmaps and backgrounds

2006-02-26 Thread Thomas L . Christensen
Hi

I am making a simple card game using OnBoardC and have I discovered a
strange thing. I use WinSetBackColor to make a green background in the
window. Then I draw a 8-bit bitmap image of a white card. I then draw
a 1-bit bitmap on top of that card - and then the green background
color is used as background in the 1-bit bitmap! Setting or removing
transparency in the 1-bit bitmap (using RsrcEdit or PRCEdit) doesn't
change anything. http:/hjem.get2net.dk/lindblad/temp/test.gif

Is this documented behavior? Should 1-bit bitmaps inherit the
background color set by WinSetBackColor? I have fixed it by using
2-bit bitmaps, but... ???

Thomas

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


Re: Drawing bitmaps with DIA

2006-01-12 Thread Aaron Ardiri
[cross posted] on PEF, better to have answer here:

On 1/12/06, Shimon Shnitzer [EMAIL PROTECTED] wrote:
 I have a bitmap (160x160) I use as a background for my app.
 Now with DIA my screen opens to 160x240 or 240x160, and I
 need to to fill the screen with a bitmap.

 I found if I use a 240x240 bitmap as a resource, it works, but -
 the bitmap is twice in size, and I dont want to bloat my app
 this way. What I thought I will do is use the old 160x160 bitmap,
 and expand it if needed o 240x240 programatically.
 Is there a way you guys are aware of to do it ?

you can implement your own scaling algorithm to go from
160x160 - 240x240. the concept is that you'll make a
2x2 grid a 3x3 one. thats the basis for your scaling.

you can try this:

[A][B]
[C][D]

becomes
[A][E][B]
[G][X][H]
[C][F][D]

E = avg(A+B)
F = avg(C+D)
G = avg(A+C)
H = avg(B+D)
X = avg(E+F)

you can write scalers quite quickly; obviously, there are better techniques.
however, faster = lower quality, slower = better quality. it really depends on
the bitmap as well.

--
// Aaron Ardiri

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


Re: Bitmaps and painting

2005-12-29 Thread krzysztof . malinski
Hi!
 I just need to paint something from a table to a screen and i think that a 
bitmap is the best way. What do you think about it ?
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


Re: Re: Bitmaps and painting

2005-12-29 Thread
Hola, gracias por escribirme, te contestaré a la mayor brevedad !!!


Jose

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


Bitmaps and painting

2005-12-28 Thread krzysztof . malinski
Hi All!
I have created some bitmaps and i don't know how can i paint into it. I want to 
create some animation based on generated bitmaps. Can any one help me with this?

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


Re: Bitmaps and painting

2005-12-28 Thread Logan Shaw

[EMAIL PROTECTED] wrote:

I have created some bitmaps and i don't know how can i paint into it.
I want to create some animation based on generated bitmaps. Can any
one help me with this?


The easiest way to draw into a bitmap is to call WinCreateBitmapWindow().
That will give you a WinHandle back which refers to the bitmap.
Then, you can call WinSetDrawWindow() with that WinHandle, and after
that all your WinDrawChars(), WinDrawRectangle(), WinDrawLine(),
WinDrawBitmap(), etc. routines will draw into the bitmap.

If you want to modify the bitmap directly, you can do that too.  But
in that case, it is best to create it with the BitmapRsrc routines
that you can get from the palmos.com developer knowledgebase.  The
reason for this is that when you call the BitmapRsrc routines, you get
back a bitmap that is in a well-defined format, and that makes it safe
to draw into it.  If you just call BmpCreate(), there are no guarantees
about the format of the bitmap that comes back, and the only thing
that's safe is to use the system's functions to modify such a bitmap.

  - Logan

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


Stretch / squeeze bitmaps?

2005-09-13 Thread Paul Reger

Hi,

Is there a way to stretch or squeeze a bitmap with 'good' quality results?

On Microsoft, there is something called StretchBLT() that I believe supports 
this.

I believe I need a 3,5,7 Tap Filter.  Does anyone know where I can get one of 
these?

THanks,


__
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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


  1   2   3   4   5   6   7   >