Skip to content

[iOS] images show blurred #195

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

Closed
Burgov opened this issue Jun 11, 2018 · 8 comments
Closed

[iOS] images show blurred #195

Burgov opened this issue Jun 11, 2018 · 8 comments

Comments

@Burgov
Copy link

Burgov commented Jun 11, 2018

All images show blurred in iOS, exactly as described here: nek023/QBImagePicker#86 (except I'm not doing multiselect, not sure if it's relevant). Since this lib is using that library, I suspect it's the same issue, but I don't understand the described workaround over there.

All iOS phones are affected (didn't try Android).
NS 4.0.2
plugin latest version.

How can I resolve this problem?

@Burgov
Copy link
Author

Burgov commented Jun 12, 2018

Possibly also related: nek023/QBImagePicker#115

@lini
Copy link
Contributor

lini commented Jun 15, 2018

Hi,
Can you give me some more information about this issue so I can try to reproduce it with the image picker plugin? I tried using an iOS 11 device (real and simulator) with the demo app from this repository and all images looked sharp as thumbnails during the selection. If you can isolate the issue in a sample project, please send a link. Also, specify the iOS version/device model where you observe the blurred thumbnails.

@Burgov
Copy link
Author

Burgov commented Jun 15, 2018

Hi @lini, thanks for looking into this.

This issue appears to be hitting all iPhone devices. Tested with a range between 6 and 8 (didn't try X)

I'll try to see if i can isolate the issue or otherwise try and organize access to our repo so you can run that (will be next week)

@anki247
Copy link

anki247 commented Jul 8, 2018

Packege.json
"@angular/core": "~5.2.0",
"nativescript-imagepicker": "^6.0.2",

Usage:

loadPhoto(callback: (selection: ImageAsset[]) => void) {
    this.context = imagepicker.create({
      mode: 'single', // use "multiple" for multiple selection
      mediaType: imagepicker.ImagePickerMediaType.Image
    });

    this.context
      .authorize()
      .then(() => this.context.present())
      .then(callback)
      .catch((ex) => {
        ...
      });
  }

Blurred
blurred

What I also noticed is, that if I would reuse the this.context without creation on the second time, then the images are sharp, but then you can not navigate back to root album

@anki247
Copy link

anki247 commented Jul 24, 2018

Finally I was able to locate the problem, but I still have no idea how to solve it.
The above described blurred effect appears if you using the RadSideDrawer plugin 😕
"nativescript-ui-sidedrawer": "^4.1.1",
I really can not explain why. I created a demo repo here to illustrate.
In app/app.component.ts you can switch between the two template version, the one without the side-drawer works as expected. (Images are sharp)
Is there any workaround for that? I really need to solve this issue as soon as possible.
tnx in advance
@lini Do you need more information?

@anki247
Copy link

anki247 commented Jul 29, 2018

At least for me I found the solution/mistake I made.
You can check it out here

@JakubPawlak
Copy link
Contributor

I have the same problem in iOS. In my case, I've found that the problem is related to TabView and multiple page router outlets (I'm using Angular) in the root app component. Here is the minimal project on git I made to reproduce the issue.
https://github.com/JakubPawlak/nativescript-blurry-imagepicker.git
If there is no page router outlet (just comment it in app.component.html), only TabViews, a viewController of undefined error is thrown, otherwise plugin is started properly but images in the gallery are blurred.

JakubPawlak added a commit to JakubPawlak/nativescript-imagepicker that referenced this issue Sep 7, 2018
fix for displaying blurred images in image picker when the root view of the app is any layout nesting TabView

related to NativeScript#195
@ghost ghost added the new PR label Sep 7, 2018
@ghost ghost removed the new PR label Sep 12, 2018
@Burgov
Copy link
Author

Burgov commented Sep 13, 2018

Thanks for the fix @zbranzov and @JakubPawlak!

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

4 participants