Giter Site home page Giter Site logo

Comments (3)

GJNilsen avatar GJNilsen commented on June 8, 2024

I used the sample app, and could not recreate the error you have encountered.
I altered the code in the save signature function, and added code that is close to your code
// Gets the signature of type UIImage from the signature view let testsignature = self.signatureView.getSignature() // converts the testsignature of type UIImage to NSData let pngimage = UIImagePNGRepresentation(testsignature!) // converts the data representation back to an UIImage let image = UIImage(data: pngimage!)
So I made some doodles in the altered test project
screen shot 2016-09-23 at 14 18 18
I tapped Save signature, and I QuickLooked the image variable.
screen shot 2016-09-23 at 14 18 48
As you can see, the output image converted to and later from NSData is correct. The code published on Github is working as intended, so you have either 1. stale YPDrawSignature code, 2. customised it and introduced the bug yourself, or 3. some weird stuff going on. ;)

So my advice is for you to add
let debugImage = UIImage(data: imageData) right after your code, and a breakpoint right after that. Now you can QuickLook the let debugImage, and the image should be correct.
If it is correct, you have manipulated that data further down the line, and have to debug it there.
If it is incorrect, and you have customised the YPDrawSignatureView code, you have almost certain added the bug during this customisation, and have to debug it there.
If it is incorrect, and you have fresh code from this repository, get back to me and we have to get to the bottom of the problem.

from ypdrawsignatureview.

aguel avatar aguel commented on June 8, 2024

Thanks. Closing the ticket. I think it has something to do with my upload handler (PHP).

from ypdrawsignatureview.

GJNilsen avatar GJNilsen commented on June 8, 2024

Ok. I can ask one of our back-end guys to help if you have problems with the php-related stuff.

from ypdrawsignatureview.

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.