Giter Site home page Giter Site logo

Comments (16)

daveshirman avatar daveshirman commented on August 18, 2024 5

@sarriaroman Hi there, nice to see you here. Firstly, thanks for the plugin in the first place. I understand what you're saying but:

  1. Users are not generally interested in submitting pull-requests for these plugins. We use them precisely because we don't want to spend the time ourselves coding these things, so we can get on with our apps. That's why we appreciate them so much.

  2. Reducing the size of the image is not the answer. The answer is to figure out why it crashes and avoid it. A 200kb image is nothing compared to standard photos of 1MB and upwards.

  3. Totally understand that you're busy with work, as are all we, which is why we choose excellent plugins to help us get on with our work too. But this issue was raised 7 months ago and this is the first time you've said anything here, so forgive any of us for feeling disillusioned.

Hopefully you'll be able to help us out. Why don't you set up a donation button or something on your webpage. I'm sure many of us would gladly help you out in return for your time maintaining the plugin code. FREE BEER!

from photoviewer.

iamkinetic avatar iamkinetic commented on August 18, 2024 2

As an temporary [or not] and quick alternative, i've used another module:

  • npm install --save ionic-img-viewer

Then I use the imageviewer directive in the img :

  • <img class="selected-picture" [src]="base64url" imageViewer>

When you touch the image, it opens the image in a fullscreen view.

This is where I found that solution : https://ionicacademy.com/building-ionic-image-gallery-zoom/

By the way, I wish I could correct the issue with PhotoViewer myself, but I fear I don't have the required knowledge.

from photoviewer.

Anujmoglix avatar Anujmoglix commented on August 18, 2024 1

same issue for me

from photoviewer.

Kalamede avatar Kalamede commented on August 18, 2024

Same for me, the app completely crashes everytime when calling the method .show giving a base64 string as source image larger than 200kb.
Ionic version 2.2.1

from photoviewer.

JoelAH avatar JoelAH commented on August 18, 2024

Any solution to this yet?

from photoviewer.

daveshirman avatar daveshirman commented on August 18, 2024

from photoviewer.

Kalamede avatar Kalamede commented on August 18, 2024

@daveshirman Found any alternative to this?

from photoviewer.

daveshirman avatar daveshirman commented on August 18, 2024

from photoviewer.

Kalamede avatar Kalamede commented on August 18, 2024

@daveshirman
I used canvas to resize the image and achieve a size lower than 200kb but images have an almost unacceptable quality to preview, tried to find an alternative unsuccessfully because you actually can view URL given images of 4k+
So I finally lasted them with that almost unacceptable quality (you can watch that photos nicely from a normal mobile phone but from a 10" tablet the image turns very poor) will try something different or a plugin to succesfully compress images without loosing so much quality when I have time

from photoviewer.

daveshirman avatar daveshirman commented on August 18, 2024

@Kalamede Just had a thought, what if:

  1. Select an image to view.
  2. Immediately create a temporary FILE from that image on disk
  3. Send the URL of that file to the plugin

If you say it can handle urls up to 4k (i.e. plenty big enough), would that work and overcome the kb issue?

This should help:

http://ourcodeworld.com/articles/read/150/how-to-create-an-image-file-from-a-base64-string-on-the-device-with-cordova

from photoviewer.

Kalamede avatar Kalamede commented on August 18, 2024

@daveshirman That's what I though and it is what I'm going to try when I have time, the bad side is maybe an small loading time added

from photoviewer.

daveshirman avatar daveshirman commented on August 18, 2024

@Kalamede show a loading spinner. It will be fine and no one will care if it works.

from photoviewer.

iamkinetic avatar iamkinetic commented on August 18, 2024

Have you guys tried the temporary file solution? Did it worked?

from photoviewer.

daveshirman avatar daveshirman commented on August 18, 2024

I gave up on this ages ago as the developer clearly isn't interested in maintaining the code. If you found a solution, please post it here. Thanks.

from photoviewer.

sarriaroman avatar sarriaroman commented on August 18, 2024

I have interest, maybe you need to have it too, you can solve it and create a Pull Request. The code is open to be changed, I'm very open to introduce changes made by the community, but I'm messed with work right now to check how to solve the issue. Maybe I will be able to find a solution next week.

One question, did you ever tried to reduce the size of the images you are loading? Big images are not good for the memory that is why is crashing, do you need such a big image? Can you try some kind of middleware to compress the image depending on the device resolution? It's a solution that I normally use to avoid making my apps crash.

from photoviewer.

Sabbariabdellah avatar Sabbariabdellah commented on August 18, 2024

use ion-img instead of img
works for me

from photoviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.