Separate names with a comma.
Discussion in 'iOS Programming' started by mpramodjain, Jun 5, 2011.
How to Capture signature from an iOS Device, and convert to 3Bytes ASCII encoded.
I have no idea what you're trying to do (or describe).
Let me make clear.
User signs on the iOS device screen, with his finger. Now say I have a button on the top navigation bar, say Done.
When I click on the Done button, my signature, should be converted to 3BYTESASCII format encoded, so I can send this to server using JSON format.
Thanks for your reply.
So what you want to do is let the user draw an image on the screen using a finger, and then convert the image to a file, and send the file using Base 64 encoding over Internet as pure ASCII to a back end web server?
Try breaking the problem down to isolated generic tasks and there should be plenty of suitable tutorials and code samples available out there.
Capturing signature is not a problem. What I want to do is to convert the captured content(technically, NSData) to a 3-bytes ASCII format for the signature capture. Also I need to send the content to web-server for storage of signature there
As I wrote previously, break it down to isolated tasks and solve them individually.
Going from NSData to another representation should be trivial to find examples on. Since you don't want to tell us what "a 3-bytes ASCII format" is, you'll have to Google it yourself.
For interacting with a server using JSON, there are countless tutorials and examples on the web. Just type it into the search bar and you'll get many nice suggestions.
No one knows what this format is.
There is effectively no available description of any encoding called 3-bytes ASCII. There isn't anything for any of these variations, either:
3 byte ASCII
There was one somewhat useful hit in google, but few details and no specific info on encoding or decoding it:
It seems to be an obscure format with a very specialized purpose (signature coordinates on "pinpad" devices), and little or no available reference documentation. It's easier to find information on the fictional currency quatloo, or the fictional game fizzbin, than it is to find info on "3-bytes ASCII".
Without any information on how to encode or decode the format, no one can help you. I suggest looking up the manufacturer's reference documentation for whatever device is being emulated. If you don't know what the device is, or the manufacturer, then you're stuck until you solve the data-encoding problem.
Thanks much for your prompt effort on this.
3 Bytes ASCII Format is kinda format for Capturing Signature. Please find the attached document.
Exactly what is your question?
Are you asking us to write code for you that produces this format?
There seems to be enough information in that document for you to do this yourself. Especially since you haven't given any information on what your list of points or your NSData looks like.
The 3-byte-ASCII format itself is specialized to record a series of XY vectors. So you take the data you already have, and convert it to produce the documented format.
If you don't know what format your NSData bytes are, then you should work on that first. If you do know what the NSData bytes are, then the very least you need to do before anyone here can help you, is tell us what the data is. We can't read your mind. We can't see your screen. We can't open your files.
If you can't do any of that, then you should probably review the fundamentals of Cocoa and Objective-C before starting this task.
Actually I was looking for any availability of third party libraries already done. As I was not an expert in Objective-C, I was struggling with this... any basic idea how to go with this... Else, thanks a lot for your replies..
You don't need to be an expert. You do need to know the basics. There is no substitute for knowing the basics. You must be able to break down simple problems and write programs for them. You can't solve problems just by pasting together things other people have already written.
You need to know what format your input data is, which you haven't explained at all. You need to know what the output format is, which you already have a document describing. You need to know basic arithmetic and boolean logic, and how to write code that converts your input data to output format.
The solution is simple: Learn the basics.
The format seems to be proprietary -- Google did not find anything when using the terms Ingenico, Capture, and Format.
Are you comfortable with working at the bit-level (shifting, masking) and with sign-extend? These techniques will be needed in order to convert:
from a set of paths
to one or more segments
each of which contains an initial coordinate
and zero, one, or more coordinates (represented as offsets from the previous)
Looks interesting! Good luck