Reading Windows bitmap files with PLUA

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading Windows bitmap files with PLUA

rosebudxx_98
I have been experimenting with the code to read Windows bitmaps into a
buffer and then to write it as a Palm stream file.  The samples work
just fine on my Zire 71 but the buffer.read statements seem very slow--
about 15 secs on a 320 by 320 256bit color image.  The buffer.get that
I use after that seems to work just fine, I even put a delay in my
loop to allow me to see the picture being built in blocks of 80 by 80
bits.  I just noticed some comments about the same problem but with
the simulator, not sure if it is related or not.  As far as I can
tell, the buffer.read statement seems to be the villian.
I would like to take this opportunity to thank Marcio for an elegant
programming language and in particular the Aquario program; it is
simply elegant.  I am still working to completely understand
metatables but it is forcing me to read the Lua book in more detail.

Bob

Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

migueletto-2
Hi,

--- In [hidden email], "rosebudxx_98" <blewis9505@...> wrote:
>
> I have been experimenting with the code to read Windows bitmaps into a
> buffer and then to write it as a Palm stream file.  The samples work
> just fine on my Zire 71 but the buffer.read statements seem very slow--
> about 15 secs on a 320 by 320 256bit color image.

Are you reading the bitmap from a memory card ? There are some really
slow cards out there.
(I assume you are reading 8-bit, 256 colors).

Just as a comparison, a Tungsten C reads a 320x320 bitmap from a
SanDisk SD card in about 2 seconds.

Regards,
Marcio.


Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

rmodesi
Marcio,
Actually my question is with the Palm Simulator (not emulator). I
don't seem to be able to get the simulator to read a .prc file that
is looking for a Sandisk.
Thanks again.
Ron

--- In [hidden email], "migueletto" <migueletto@...> wrote:
>
> Hi,
>
> --- In [hidden email], "rosebudxx_98" <blewis9505@> wrote:
> >
> > I have been experimenting with the code to read Windows bitmaps
into a
> > buffer and then to write it as a Palm stream file.  The samples
work
> > just fine on my Zire 71 but the buffer.read statements seem very
slow--
> > about 15 secs on a 320 by 320 256bit color image.
>
> Are you reading the bitmap from a memory card ? There are some
really
> slow cards out there.
> (I assume you are reading 8-bit, 256 colors).
>
> Just as a comparison, a Tungsten C reads a 320x320 bitmap from a
> SanDisk SD card in about 2 seconds.
>
> Regards,
> Marcio.
>


Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

migueletto-2
Hi,

--- In [hidden email], "ron.modesitt" <rmodesi@...> wrote:
> Actually my question is with the Palm Simulator (not emulator). I
> don't seem to be able to get the simulator to read a .prc file that
> is looking for a Sandisk.

What do you mean by "get the simulator to read a .prc file that is
looking for a Sandisk" ??

Regards,
Marcio.

Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

rosebudxx_98
In reply to this post by migueletto-2
--- In [hidden email], "migueletto" <migueletto@...> wrote:
>
> Hi,
>
> --- In [hidden email], "rosebudxx_98" <blewis9505@> wrote:
> >
> > I have been experimenting with the code to read Windows bitmaps
into a
> > buffer and then to write it as a Palm stream file.  The samples
work
> > just fine on my Zire 71 but the buffer.read statements seem very
slow--
> > about 15 secs on a 320 by 320 256bit color image.
>
> Are you reading the bitmap from a memory card ? There are some
really
> slow cards out there.
> (I assume you are reading 8-bit, 256 colors).
>
> Just as a comparison, a Tungsten C reads a 320x320 bitmap from a
> SanDisk SD card in about 2 seconds.
>
> Regards,
> Marcio.
>I am using a 128MB Sandisk card and I can't get better than about 15
seconds from the card and about when I do a buffer.read from the
stream file--Using a Zire 71

Thanks,
Bob


Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

rmodesi
In reply to this post by migueletto-2
Marcio,
Sorry for the confusion with my wording. Let me explain a little better.
I would like to simulate a sandisk operation using the simulator. I
can't seem to come up with a folder name on the PC that the simulator
recognizes. I may be assuming too much but it would seem to me that
since the simulator is to ease the programmers task that the ability to
simulate a sandisk would be available.
Many thanks again.

Ron
--- In [hidden email], "migueletto" <migueletto@...> wrote:

>
> Hi,
>
> --- In [hidden email], "ron.modesitt" <rmodesi@> wrote:
> > Actually my question is with the Palm Simulator (not emulator). I
> > don't seem to be able to get the simulator to read a .prc file that
> > is looking for a Sandisk.
>
> What do you mean by "get the simulator to read a .prc file that is
> looking for a Sandisk" ??
>
> Regards,
> Marcio.
>


Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

migueletto-2
In reply to this post by rosebudxx_98
Hi,

--- In [hidden email], "rosebudxx_98" <blewis9505@...> wrote:

> I am using a 128MB Sandisk card and I can't get better than about 15
> seconds from the card and about when I do a buffer.read from the
> stream file--Using a Zire 71

This confirms that the performance of buffer.read() depends on the CPU
power and memory card speed. Some combinations allow loading in 2
seconds, others do not.

Regards,
Marcio.

Reply | Threaded
Open this post in threaded view
|

Re: Reading Windows bitmap files with PLUA

migueletto-2
In reply to this post by rmodesi
Hi,

--- In [hidden email], "ron.modesitt" <rmodesi@...> wrote:

> I would like to simulate a sandisk operation using the simulator. I
> can't seem to come up with a folder name on the PC that the simulator
> recognizes. I may be assuming too much but it would seem to me that
> since the simulator is to ease the programmers task that the ability to
> simulate a sandisk would be available.

It seems you want to use memory card operations on a simulator.

Experimenting with the many available simulators in the past, I have
come to the conclusion that not all of them support memory cards (I do
not know if this is a bug or a "feature").

You have to check some simulators until you find one that works.
Usually there is a directory named "Card1" inside the simulator
directory (but I have seen simulators that create a Card1 directory
and even so does not support it).

Regards,
Marcio.