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

Decrease image quality when get OutOfMemoryError exception #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sanduluca
Copy link

If set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. The sample size is the number of pixels in either dimension that correspond to a single pixel in the decoded bitmap. For example, inSampleSize == 4 returns an image that is 1/4 the width/height of the original.

Reference:
https://stackoverflow.com/questions/8442316/bitmap-is-returning-null-from-bitmapfactory-decodefilefilename

Fixes: #34 (maybe)

If set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory. The sample size is the number of pixels in either dimension that correspond to a single pixel in the decoded bitmap. For example, inSampleSize == 4 returns an image that is 1/4 the width/height of the original.

Reference: 
https://stackoverflow.com/questions/8442316/bitmap-is-returning-null-from-bitmapfactory-decodefilefilename
- added type annotation
- fixed Unresolved reference: new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: ImageUtil.getImageMatrixFromFilePath
1 participant