I want to display .tiff images coming from server in my native iphone application. Is it possible to display .tiff images in native iphone application? I am trying to solve this
Here it says that the tiff format is supported by the UIImage
class so you can load it in one of those and put it into an UIImageView
. Have you already tried this? If the answer is yes, post some code
Yes. You can display tiff images coming from the server. You can load these images into WebView or UIImageView
. What you need to do is :
You need to encode the data which comes from the server.After encoding the data, you need to add it inside the WebView. Example :
NSMutableData *recievedData; // the data coming from the server
......
NSString *str = [receivedData base64Encoding]; //my base64Encoding function
NSData *new_data = [NSData dataWithBase64EncodedString:str]; my function
UIImage *image2 = [UIImage imageWithData:new_data];
[image_view setImage:image2];
[web_view loadData:new_data MIMEType:@"image.tiff" textEncodingName:nil baseURL:nil];