Giter Club home page Giter Club logo

cordova-plugin-sketch's Introduction

cordova-plugin-sketch (Unmaintained)

This plugin is part of our legacy product and is no longer supported/maintained by us. You are welcome to create/publish a fork to npm or do what you want with the code.

Apologies for any inconvenience.

See here for documentation.

cordova-plugin-sketch's People

Contributors

jokeyrhyme avatar jt8 avatar lucatorella avatar maggieshi avatar mymattcarroll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-sketch's Issues

Poor quality of images on android

Hi,

I'm using this in combination with the cordova-plugin-camera plugin. First, the user takes a picture like this:

navigator.camera.getPicture(onSuccess, onFail, {
          quality: 100,
          destinationType: allowAnnotation ? Camera.DestinationType.FILE_URI : Camera.DestinationType.DATA_URL,
          targetWidth: 1600,
          targetHeight: 1600,
          correctOrientation: true
      });

I then send the fileUri to sketch like this:

navigator.sketch.getSketch(onSketchSuccess, onSketchError, {
        destinationType: navigator.sketch.DestinationType.DATA_URL,
        inputType : navigator.sketch.InputType.FILE_URI,
        encodingType: navigator.sketch.EncodingType.JPEG,
        inputData : fileUriFromCamera
      });

The output from sketch seems like it's really compressed though when using the destinationType navigator.sketch.DestinationType.DATA_URL.

The quality of the image is really poor, even if I'm not actually drawing anything. Noticeably poorer quality than using destinationType Camera.DestinationType.DATA_URL with only the cordova-plugin-camera.

I've tried using both PNG and JPEG with the same result. Any idea on how to solve this? Great plugin otherwise!

Using the plugin with Ionic 3

Hey,

I installed your plugin, but I get the error:
Property 'sketch' does not exist on type 'Navigator'.

Am I missing something?
Thanks!

Error: Failed to read imagedata from dataurl

Hello,

tried your nice plugin for making annotations on fotos and images.
My app reads image data from a backend as base64 with the special dataurl-format for jpegs dataurls.
Works fine so far :-)
But when i take a picture from camera or foto-lib (taken by cordova plugins) i can visualize them in my app (my image-tags also work with data-url as src-attribute for images). but i cant use the plugin because i always get the error messagew "Failed to read imagedata from dataurl".
Any ideas?
Testing on iPad4, iOS 10.3.3

kind regards
Matthias

Change name button

Hi, How i can change name buttons, for example: done, cancel, erase ecc ?
Thanks, for great plugin!

Any plan to support Windows 10?

We really like this sketch plugin. However we notice it keeps crashing on Win 10. Any ideas on how to fix it? Or do any plan for Win 10 support.

Arrows

Would love to see implementation to where you can layer arrows as well, rather than just free-draw.

Windows 10 support

The windows implementation currently uses functions which are not present in windows after 8.1. One such function is execUnsafeLocalFunction, but I think there was something else as well.

Here is a link to SO with the aforementioned func: https://stackoverflow.com/questions/32059361/msapp-execunsafelocalfunction-does-not-appear-to-be-in-windows-10-what-replaces

Is there a way to support both win8.1 and 10 (check for which is the current version or smth)? If not, do you want to keep support for 8.1 at all? Should you just tag the current as win8.1 support and put win10 support in master?

Unable to use FILE_URI as background

I realise that this plugin is no loner supported/maintained by the developer, but there is clearly an existing user base that may be able to help with issues.

I'm trying to use a FILE_URI as inputType and I'm passing the image.src as inputData, like this:

        var image = document.getElementById('my-image');
        navigator.sketch.getSketch(onSuccess, onFail, {
            destinationType: navigator.sketch.DestinationType.DATA_URL,
            encodingType: navigator.sketch.EncodingType.JPEG,
            inputType: navigator.sketch.InputType.FILE_URI,
            inputData: image.src
        });

The path to the image with id my-image is valid and the image is displayed. However, when calling getSketch I get an error: Failed to generate sketch. File not found: /android_asset/www/img/image.jpg

If it makes any difference, this is using Cordova Android platform version 7.1

Any suggestions? Thanks

Not able to use the plugin on IPad IOS 10

Getting error while using this plugin on Ipad IOS 10. TypeError: undefined is not an object (evaluating 'navigator.sketch.getSketch'). Same plugin works on for android devices. Please suggest the solution.

Error: JavaBinder: !!! FAILED BINDER TRANSACTION !!!

Hello,
First off, great plugin!
but I seem to have a problem when I work with high quality image.
Cant this be fixed?

Error from logcat:

08-08 11:15:53.775 28518 28518 E JavaBinder: !!! FAILED BINDER TRANSACTION !!!
(parcel size = 1401464)
08-08 11:15:53.777 28518 28518 E AndroidRuntime: FATAL EXCEPTION: main
08-08 11:15:53.777 28518 28518 E AndroidRuntime: Process: io.cordova.hellocordov
a, PID: 28518
08-08 11:15:53.777 28518 28518 E AndroidRuntime: java.lang.RuntimeException: Fai
lure from system

Invalid schema

I got the following error. I tried three different file type and data uri and nothing works. Can you help?

plugin message: invalid scheme for inputData: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCAWgCgADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDgaWkoFIYUCjFFMQUUUCgAFFFApDCgUGigQUUUUwCigUUAFFFLQAlFFApABooooAKKKKYBRRRQAUUUUAFFFFABRRRQAUCiigBTzSUUZpDEpaKKYgozSjpRSGJRS0lABRSUtMQUUUUAFFFFABRRRQAUUUUALgUlFFABRRRxQAUUCigAopKWgAoxmigUAFFBooAKM8YopKACloFGKBhRSUtAgooooAMUUUUAFJS0UAFFJS0gCkpaSmAvWiiigAooooAKKSloAKKKKACiiigAooooAKKKKACkpaKACkpaKACkpaSgBaKKKAEopaKACkpaSgApc0UUAJRS0UAFFFGKAEpaKSgBaSiloAKKKKACkpaKACiikoAWiikoAWkpaSgBaKSigApaKSgBaSiigAoopaAEpaKSgAopaKACiiigApKKKAFpKKKAFopKKACloooASloooASloooAKKKKAEooooAKWkpaAEpaSloAKKSigAooooAWkoooAKKKKACiiigApaKKAEooooAKKKWgApKKKACiiigAooooABS0lFABS0lFABRRRQAUtFJQAtFJRQAUtJRQAUUUUALRRRQAlFFLQAgopaSgApaSloAKSlpKAClpKWgBKKKKACiiigBaSiigApaKKACkpaSgApaSloAKSlpKAClpKKAFpKWkoAKWiigApKWigBKWkooAKWkooAKKKKAFpKKKAFopKKQC0ZoooHcSloooEFJS0UwEpaKSgBaKSigApRRRmkAlLSClpgFFFFABRRRSGFFFFAgpKWimAUUUUgCiiigAooopgFFFFIBKWiimAlLRS0AJRRRQAUUUUAFFFApAFFFFABRRRQMKBRRQAUUtJQFgooooAKKKKAAUGiigYUuaKSgAxRRRQIBS5pKDQAUUUUAFFFLQACkpaSgAooooEFFFFAwpRxzRRmgYd6TFFFAgxS0UlAxaKSigAooooEKDig0lLQMSilJpKCRaSgUUDFpBRS0xCUUCigAFLQKKQxKKWkFAgoBpaTFAAaKKKYBRRRQAUUA0UAFKKBRnFAARSUuaSgAooooAKKKKACiiikAUUUUAFGKBS0AJRRRQAUUtJQMKKKKBBRRRTAKM0ZooAKKKKACiiigAoFFFABRRRQAUlLiigAoooNABRRRQAUUUlAC0UUUAFFFFABRmiigAooooAKKKKACkpaKACiiigBKWiigBKWiigAooooASlpKWgBKWiigAooooAKKKKACiiigBKWkpaACiig0AFFFFABRRSUALRRRQAUlLRQAUUUlAC0UlFAC0UUUAFFFJQAtFFFABSUtFACUtBpKAClpKWgAopKWgBKWkpaACkpaKACkpaKACkpaSgAooooAWiiigApKWkoAWiiigApKKKAFpKWigBKKKKACilooAKSlooASiiloASlopKAFopKKAClpKWgAooooASilpKAFpKWkoAWikpRQAlFLSUALSUUUAFLRSUAFFFFAC0lLSUALRSUUALSUUUAFFFFABRRS0AJRRRQAUUUUAFFFLQAUlFFABRRRQAUUUUAFLSUUAFFFFABRRS0AJRRRQAUUUUALSUUUAFFLSUAFFFFABRS0lAC0lFFABRS0lAC0lFLQAUUUUAFJRRQAUUUUALRSUtACUUUUAFFFFABRS0lABRRRQAtJRRQAUtJRQAUUCloAKSloFACUUtFACUUtJQAUUUtAAKKKKQCUUUUwFFFJS0AFJRS0AJRRRQAUtJS0AFJRS0AFJS0UgCiiigAooFFMBKKWkoAWiiigBKWkpaACiiigAopKKAFooFFIAooooAKKKKACiiigYUUlKKYBRRRSAKKKKACiiigAooooAKKKKACiiigAoooNAAKXikFFAwNFFFAgooooAKKKBQAUUUUAFFLRQMAKSlFJQAUopKKBCmkFApaBhikpaM0AJijFFGaCRaKKKBhSUUUCDFLSCimAUtJRSGKBSUUUAFLSUUxBRRS0AJRRRQAYoooFAC0mKDRQAoFJSiikMSiiimIKKKWgBKKKKACiijFABRRRQAUlLRQAUUuKSkAUCiimAUUUUAFFFFABRRRQAUUUUAFAoooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKSlooAKKKKACiiigAooooAKSiloAAaKKKACiiigBKWikoAWiigUAFJS0UAJS0UUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFJRQAtJS0lAC0lLRQAlLSUUAFLRRQAlLSUtABRRRQAUlLRQAUUUUAFFFFABSUUUAFLSUUALRRSUALSUtFACUUUUALRSUtABSUtJQAtJRRQAUUtFACUtJRQAtFJRQAUtFFABRRRQAUUUUAFFJS0AJRRS0AFFJRQAUUUUAFFFFABRRRQAUUUUAFFFFAC0lFFABRRRQAUUUUAFLSUUAFFFFABRRRQAtJRRQAUUUUAFFFFABS0lFABS0lLQAUlLSUAFLSUUAFFFFAC0UlLQAlFLSUAFLRRQAlFLSUALRSUUAFFFFABRRS0AApKKWgBKWiigAoxRQTSASiilpgJRRRQAGiiigAopaSgApaSigAooooAKWkooAKBRRQAtJRRQAUUUUAFFFFAC0lLSUAFFFFAC0UUlABS0UlABS0lLQAUlFFABRRRQAUtGKKACkpaSgAooFLQAUlFFAC0lFFAC0UUlACikpaSgApaCKQUALSUtFABRikpaACikooAWiigUgDFFFFABRRRQMKKSimIWiiikMKKKKACiiigAooooAKKKKADFFGaKACiiigAooooAKKKBQAYoxS0lAC0lBooAKKKKAAUYpRQTmgYlFLSUCCiiigAooooAXFJiiigYUUUCmSApaSlFACYpaDRSGFJilpaBDaKWkpgKKKKTmkAoFBopM0ALiijNFMBKKXFFACUClFFACUtFFIYUUUUxBSUUUAKKM0CkxSAXFJS0UAAooooGFJS0lAgopaSmAUUUUgCiiimAUUopKACiilxQAlFLSUAFFFFABRiiloASiiigBaSlFFACClpKKACiiigAo6UUUAFFFFABRRRQAUUtJQAtJRRigAooo60AFFFFABRRRQAUUUUAFFFAoAKKKMUAFFFFABRRRQAUU
```

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.