Forum Navigation
You need to log in to create posts and topics.

NSString to Image

Posted by: artlythere <artlythere@...>

I asked before, what are the pixel dimensions, how can you know?

A the initWithData implementations for such as you wish that I have come across need a rect of some type?
 
On Sep 13, 2012, at 1:11 PM, Steve wrote:


I need some help converting a NSString which represents an Image file sent from an iOS device.

The image is the signature for a credit card transaction.

I am receiving all of the data as a CFString on the Mac side.  
How can I convert it to an image that I can use in FB?
This is how the data is formatted when sent with other data about the transaction.

  NSData *sigData = UIImageJPEGRepresentation(delegate.signature, 1.0);
NSString *sigDataString = [NSString stringWithFormat:@"%@", sigData];
myString = [myString stringByAppendingString:@" Signature :"];
myString = [myString stringByAppendingString:sigDataString];
myString = [myString stringByAppendingString:lineFeed];
    
    NSLog(@"%@", myString);
    
NSString *cardDataSend = [NSString stringWithFormat:@"%@rn", myString];
NSData *cardData = [cardDataSend dataUsingEncoding:NSUTF8StringEncoding];

    

[asyncSocket writeData:cardData withTimeout:-1 tag:0]; //write data to server

thanks

Steve


To unsubscribe, e-mail: fbcocoa-unsubscribe@freegroups.net For additional commands, e-mail: fbcocoa-help@welovegod.org


To unsubscribe, e-mail: fbcocoa-unsubscribe@welovegod.org For additional commands, e-mail: fbcocoa-help@freegroups.net