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
fix 1059 Converting large image to pdf causes app to crash #1060
base: master
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit 3e5f12b and detected 0 issues on this pull request. View more on Code Climate. |
@deepoceansame Issue #1044 and #1059 are same issue but have different solutions through Pull Request #1055 and #1060. Two different PR for same issue can be described as below - PR #1055In this PR scale down feature of Picasso used to display small/scaled version of bitmap in targeted Imageview. PR #1060It compress the actual image itself. I am excited to know -PROs and CONs of showing scaled down version in Imageview but leaving the actual image as it is. |
I tried the picasso to do the filter enhancement part of issue #1044 with
and this causes NLP.
Picasso seems to call ImageView.setImageDrawable(null) first.
It sets drawable to null and call getBitmap of the null drawable. |
I also tried adding noPlaceholder() or placeholder(photoEditorView.getSource().getDrawable()) to avoid NLP
but the filter view only show the first image.(the two adds has same effect) |
PROs and CONs of showing scaled down version in Imageview but leaving the actual image as it is.pros of using picasso: writing less code PROs and CONs of compressing the actual image.pros: Easy to get bitmap and byteArray to create Image object for creating pdf. PROs and CONs of both solution if combined.pros: Compressing image can get bitmap and byteArray for creating pdf. |
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
If there are any UI change, please include the screenshots also.
Created a new method in ImageUtils called pathToByteStream and compress the image in the method. Then, use the byte stream to get itext.Image.
Fixes #1059
Type of change
Just put an x in the [] which are valid.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
./gradlew assembleDebug assembleRelease
./gradlew checkstyle
Checklist: