inTempStorage is just a buffer used while reading/decoding bitmaps from a
file or a stream. The total size of the file doesn't really matter. This
array is used to invoke this method:

http://developer.android.com/reference/java/io/InputStream.html#read(byte[],
int, int)

Changing the buffer size sometimes matters depending on the speed of your
network, etc. The default buffer size is 16kB.

Using this field will not help you avoid out of memory errors.

On Wed, Apr 25, 2012 at 9:53 PM, Justin Anderson <[email protected]>wrote:

> Sorry Jim, I don't know the answer... Maybe Dianne or Romain will come
> across this post and they can shed some light on the subject.
>
> And I just can't resist... I HAVE to comment on this... I find it
> extremely amusing that the random quote in the signature of your last email
> happened to be this:
>
> No, I'm not going to explain it.  If you can't figure it
>> out, you didn't want to know anyway...      --Larry Wall
>>
>
> When you just got finished asking this:
>
> Can someone please either explain it, or point me to a page that does?
>>
>
> That is just way too awesome...  :-)
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Wed, Apr 25, 2012 at 7:39 PM, Jim Graham <[email protected]> wrote:
>
>> On Wed, Apr 25, 2012 at 11:25:51AM -0600, Justin Anderson wrote:
>> > On Wed, Apr 25, 2012 at 11:15 AM, Jim Graham <[email protected]>
>> wrote:
>> >
>> > > While working on trying to squeeze in as much space for processing
>> > > bitmaps in my app, I noticed this method, and from what I've read,
>> > > believe it might help.  What I have not found, however, is a real (and
>> > > clear) description of what it does, and how to best use it.
>> > >
>> > > The dev guide page suggests using it to create about 15 kB of temp
>> > > space.  Examples I've seen from this list in the past suggest the
>> > > same, even for as much as 9 MB bitmaps.  15 kB temp space for 9 MB
>> > > bitmaps makes no sense to me, so I'm clearly missing something.
>>
>> > I don't know for sure, but I would assume that is because it doesn't
>> decode
>> > the entire 9 MB image at once...
>>
>> Ok, I could assume that as well (and I more or less did).  But I prefer
>> actual documentation over assumptions.  And that was only one part of my
>> question.  Every post I read where this was used involved using it to
>> avoid out of memory errors from creating huge bitmaps.  But the huge
>> bitmap is still being created, right?  So ultimately, how does this help
>> prevent that?  Does it process and then release (free, etc.) the memory
>> used by the byte[] array one chunk at a time?  Is that one reason why the
>> temp space size is set so low?  How much (in terms of the relative size
>> of the bitmaps and the data[] array) extra memory does this make
>> available---memory that I can use in processing the bitmap(s)?
>>
>> Or should I just *assume* that it'll do whatever I want it to do,
>> whenever I want it to do it?
>>
>> So once again, I ask:
>>
>> > > Can someone please either explain it, or point me to a page that
>> > > does?
>>
>> Thanks,
>>   --jim
>>
>> --
>> THE SCORE:  ME:  2  CANCER:  0
>> 73 DE N5IAL (/4)            MiSTie #49997      < Running FreeBSD 7.0 >
>> [email protected]                    ICBM/Hurr.: 30.44406N 86.59909W
>>
>>         No, I'm not going to explain it.  If you can't figure it
>>         out, you didn't want to know anyway...      --Larry Wall
>>
>> Android Apps Listing at http://www.jstrack.org/barcodes.html
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to