(keitai-l) Re: images on the scratchpad

From: Blake Winton <blake_at_phantomfiber.com>
Date: 03/12/04
Message-ID: <000401c4083d$f3b4b4b0$6401a8c0@phantomfiber.com>
Are you sure about that?  Because I'm fairly sure that gifs can
contain null bytes.  Fortunately, gifs also have a header that
tells them what the size of the image should be, so getImage()
can just read data until it's filled up the image.

Basically, I'm trying to say that I'm doing the same thing as
you, César, and it works on the emulator.

(Okay, I'm doing something a little more complicated, but
 similar.  I've created a RecordStore class which handles
 the location of the images in the scratchpad, and I then
 get them by type and id, but the resulting code is very
 similar.)

Later,
Blake.


> -----Original Message-----
> From: keitai-l-bounce@appelsiini.net 
> [mailto:keitai-l-bounce@appelsiini.net] On Behalf Of info@esbeez.com
> Sent: Thursday, March 11, 2004 9:18 PM
> To: keitai-l@appelsiini.net
> Subject: (keitai-l) Re: images on the scratchpad
> 
> 
> Hi,
> 
> MediaManager#getImage() will read all bytes from the
> pos=5222 till it reaches a null.
> 
> Just ensure that you leave atleast one byte between two
> images while storing into the scratchpad to read only
> one image at a time.
> 
> -SB.
> 
> 
> 
> On Thu, 11 Mar 2004 21:26:24 +0100, César Fernández
> wrote:
> 
> > 
> > Hello all,
> > 
> > I had an application that use some images whose total
> > size is greater than 30k. To avoid this problem I store
> > the images on the server as .gif files. I want my
> > application to download them. I can do this, but in 
> > order to avoid downloading the images each time the
> > application executes I want to store them in the scratch
> > pad the first time the application executes, and get the
> > images from the scratch pad after the first execution.
> > The problem is, how to get the images from the scratch
> > pad after theyre stored?  Suppose I save 10 gifs on the
> > scratch pad. I know the size of each gif, so I can use
> > this information to get each image, like this
> > 
> > MediaImage mi =
> > MediaManager.getImage("scratchpad:///0;pos=5222");
> > 
> > But I am not sure of what is stored at mi.  Only one
> > image or all the bytes after position 5222 ??? Because
> > if only the image saved at position 5222 is stored at
> > mi, the problem is solved, but I am not sure if things
> > are done this wa or mi gets all the bytes in the scratch
> > pad after position 5222.
Received on Fri Mar 12 16:26:09 2004