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

Reduced resolution after edit #46

Open
viseator opened this issue Nov 12, 2017 · 1 comment
Open

Reduced resolution after edit #46

viseator opened this issue Nov 12, 2017 · 1 comment
Labels

Comments

@viseator
Copy link
Contributor

Hello, I started a camera app project several days ago, in which I found your lib is really helpful.

But I found that the output image's resolution is reduced to the resolution of view (or the bitmap corresponding to it), which is out of my expectation. Is it a feature or bug?

I found the code may cause the problem:

return BitmapUtils.getSampledBitmap(params[0], imageWidth, imageHeight);

in which imageWidth and imageHeight was set by those code:

DisplayMetrics metrics = getResources().
imageWidth = metrics.widthPixels / 2;
imageHeight = metrics.heightPixels / 2;

After replace the code above with this:

return BitmapFactory.decodeFile(params[0]);

Things seems to work perfectly.

@siwangqishiq
Copy link
Owner

Yes it is a feature,You can't load a origin image , if you select a image with huge size will occur a Out Of Memory ,So This library set image's width and height ( reset sample value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants