So I'm using Bitmap.createScaledBitmap to scale and display in an imageview files that i have saved locally from my android application. I开发者_Python百科t seemed like it was working perfectly, Yet now it seems that for some reason only certain files are able to be scaled and others it crashes. When i try with what seems like larger files or maybe resolutions it breaks the code and my app crashes. Is there a reason for this or way to avoid it? or even a better way to scale files? Any advice would be great, let me know if you need any clarification.
You should post the stack trace that accompanies your crash whenever you're looking for help. But it sounds like you're running out of memory. Be sure to call Bitmap.recycle() on the current image before loading another one.
精彩评论