Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problems with bitmap recycle on JB. Colorspace option for decoding. #101

Closed
sherpya opened this issue Nov 13, 2012 · 1 comment
Closed

Comments

@sherpya
Copy link

sherpya commented Nov 13, 2012

I've encountered a problem (in my project) while doing createScaled + recycle old on jelly bean, so you may encounter similar problem in UniversalImageLoader/src/com/nostra13/universalimageloader/core/ImageDecoder.java

you should call recycle only if sourcebitmap != rescaledbitmap, since android sdk may return the same bitmap if the size is suitable. createScaledBitemp supposed to work this way but only implemented for real on jelly bean.

also I would suggest to add an option to decode using 565 colorspace, if you don't need transparency it uses half of the memory

@nostra13
Copy link
Owner

I've encountered a problem (in my project) while doing createScaled + recycle old on jelly bean, so you may encounter similar problem in UniversalImageLoader/src/com/nostra13/universalimageloader/core/ImageDecoder.java
you should call recycle only if sourcebitmap != rescaledbitmap, since android sdk may return the same bitmap if the size is suitable. createScaledBitemp supposed to work this way but only implemented for real on jelly bean.

Thanks! I'll consider it.

also I would suggest to add an option to decode using 565 colorspace, if you don't need transparency it uses half of the memory

Yes, I agree. It's really reasonable. I just thought about it.

@nostra13 nostra13 reopened this Nov 14, 2012
nostra13 added a commit that referenced this issue Nov 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants