Hi,
I have got the data for a .jpg image from the url like below
NSData *imageData = nil;
NSURL *url = [NSURL URLWithString:someurl.jpg];
imageData = [NSData dataWithContentsOfURL:url];
I can see that data has come, now i try to create image out of this data
UIImage *theImage = [[[UIImage alloc] initWithData:imageData] autorelease];
But theImage always is 0x0.
I tried using initWithContents of file and as well as the class functions in the UIImage class but no luck.
The image gets displayed on the browser.
Can any one please help with this regard, what am i doing wrong.
Thanks and Regards,
U'suf
I have got the data for a .jpg image from the url like below
NSData *imageData = nil;
NSURL *url = [NSURL URLWithString:someurl.jpg];
imageData = [NSData dataWithContentsOfURL:url];
I can see that data has come, now i try to create image out of this data
UIImage *theImage = [[[UIImage alloc] initWithData:imageData] autorelease];
But theImage always is 0x0.
I tried using initWithContents of file and as well as the class functions in the UIImage class but no luck.
The image gets displayed on the browser.
Can any one please help with this regard, what am i doing wrong.
Thanks and Regards,
U'suf