user562237
user562237

Reputation: 785

how to reduce memory occupied by bitmap in android

how to reduce memory occupied by bitmap in android. will options.insamplesize of bitmap reduce the memory consumed by bitmap

Upvotes: 0

Views: 1161

Answers (2)

Kocus
Kocus

Reputation: 1613

Yes, opt.inSampleSize with proper scale will reduce memory consumption if used in BitmapFactory.

Also, you should set opt.inPurgeable = true to allow bitmaps to be purged.

And finally, you should call bmp.recycle() when you don't need the bitmap anymore.

Upvotes: 1

user644458
user644458

Reputation:

Use Util class that Contain the Virtual SD card Memory to Store the Image. . .

Upvotes: 0

Related Questions