I am using AFNetworking 3.0.
i want to display image in UIImageView.
for that,
1. I sent parameter to server like following way:
.
.
.
[manager POST:Loginurl parameters:params progress:nil success:^(NSURLSessionTask *task, id responseObject) {
2. I got response from server like:
NSLog(#"Response from image server : %#", [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]);
When i print log:
Response from image server : http://Here_is_server_URL.jsp?uN=Rohit&wI=290119935030&pP=null&print=no7
3. I am going to display that image like following way:
_imgstr= [NSString stringWithFormat:#"%#",[[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]];
NSLog(#"%#",_imgstr);
NSString *imgURL = [NSString stringWithFormat:#"%#",_imgstr];
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:imgURL]];
[_image setImage:[UIImage imageWithData:data]];
4. When i displayed NSLog(#"imagedata:%#",data); i got following output
imagedata:<0d0a0d0a 0d0a0d0a 3c21444f 43545950 45206874 6d6c2050 55424c49 4320222d 2f2f5733 432f2f44 54442048 544d4c20 342e3031 20547261 6e736974 696f6e61 6c2f2f45 4e222022 68747470 3a2f2f77 77772e77 332e6f72 672f5452 2f68746d 6c342f6c 6f6f7365 2e647464 223e0d0a 3c68746d 6c3e0d0a 3c686561 643e0d0a 0d0a3c74 69746c65 3e323478 3757656c 6c6e6573 73202d20 57656c6c 6e657373 20436172 643c2f74 69746c65 3e0d0a3c 73637269 70743e0d 0a096675 6e637469 6f6e2070 72696e74 416e644f 75742829 207b0d0a 0909646f 63756d65 6e742e67 6574456c 656d656e 74427949 6428226d 79446976 22292e73 74796c65 2e626f72 64657220 3d202273 6f6c6964 20626c61 636b223b 0d0a2f2f 20090964 6f63756d 656e742e 67657445 6c656d65 6e744279 49642822 6d794469 7622292e 7374796c 652e7769 64746820 3d202235 32307078 223b0d0a 2f2f2009 09646f63 756d656e 742e6765 74456c65 6d656e74 42794964 28226d79 44697622 292e7374 796c652e 68656967 6874203d 20223330 30707822 3b0d0a09 09646f63 756d656e 742e6765 74456c65 6d656e74 42794964 28226d79 44697622 292e7374 796c652e 6267636f 6c6f7220 3d202223 30304646 3030223b 0d0a0909 77696e64 6f772e70 72696e74 28293b0d 0a09092f 2f77696e 646f772e 6c6f6361 74696f6e 2e687265 66203d20 22566965 7750726f 66696c65 73223b0d 0a097d0d 0a3c2f73 63726970 743e0d0a 3c737479 6c653e0d 0a2e6267 696d6720 7b0d0a09 6261636b 67726f75 6e642d69 6d616765 3a207572 6c282769 6d672f77 656c6c6e 65736361 72646267 696d6167 65322e6a 70672720 293b0d0a 09626163 6b67726f 756e642d 636f6c6f 723a2072 67626128 3235352c 20323535 2c203235 352c2030 2e353729 3b0d0a09 6261636b 67726f75 6e642d62 6c656e64 2d6d6f64 653a206c 69676874 656e3b0d 0a7d0d0a 3c2f7374 796c653e 0d0a0d0a 3c2f6865 61643e0d 0a0d0a3c 626f6479 3e0d0a0d 0a0d0a09 0d0a093c 62723e0d 0a093c62 723e0d0a 093c6365 6e746572 3e0d0a09 093c6272 3e203c62 723e0d0a 09093c64 69762069 643d226d 79446976 2220636c 6173733d 22626769 6d672220 7374796c 65203d20 22776964 74683a35 32307078 3b206865 69676874 3a333030 70783b62 6f726465 723a2073 6f6c6964 20626c61 636b223e 0d0a0d0a 0909093c 68313e32 34783757 656c6c6e 6573733c 2f68313e 0d0a0d0a 0909093c 7461626c 653e0d0a 09090909 3c74723e 0d0a0909 0909093c 74643e3c 696d6167 6520626f 72646572 3d223170 78222073 72633d22 696d672f 77656c6c 6e657373 5f6c6f67 6f2e6a70 67222068 65696768 743d2231 32307078 22207769 6474683d 22313130 7078223e 3c2f696d 6167653e 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b3c2f 74643e0d 0a090909 09093c74 643e0d0a 09090909 09093c63 656e7465 723e3c66 6f6e7420 73697a65 3d223670 78223e3c 623e7573 6b3c2f62 3e3c2f66 6f6e743e 3c2f6272 3e3c666f 6e742073 697a653d 22327078 223e3c62 3e205745 4c4c4e45 53532049 44203c2f 666f6e74 3e3c6272 3e203c66 6f6e740d 0a090909 09090973 697a653d 22367078 223e3236 30333139 37383332 37323c62 723e3c2f 666f6e74 3e3c2f63 656e7465 723e3c2f 74643e0d 0a090909 09093c74 643e266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 266e6273 703b266e 6273703b 0d0a0d0a 09090909 09093c69 6d616765 20626f72 6465723d 22317078 22207372 633d2269 6d672f67 6f62732e 6a706722 20686569 6768743d 22313230 70782220 77696474 683d2231 31307078 223e3c2f 696d6167 653e0d0a 09090909 093c2f74 643e0d0a 09090909 3c2f7472 3e0d0a09 09093c2f 7461626c 653e0d0a 0909093c 62723e0d 0a090909 3c62723e 0d0a0909 09566973 69742075 73204020 7777772e 32347837 77656c6c 6e657373 2e636f6d 20266e62 73703b26 6e627370 3b6f7226 6e627370 3b266e62 73703b20 63616c6c 20757320 40202b39 31203739 37323839 32363039 200d0a09 093c2f64 69763e0d 0a093c2f 63656e74 65723e3c 62723e3c 62723e0d 0a093c63 656e7465 723e0d0a 090d0a09 093c6120 68726566 203d2022 77656c6c 6e657373 63617264 2e6a7370 3f707269 6e743d79 65732677 493d3236 30333139 37383332 37322675 4e3d7573 6b222073 74796c65 203d2022 74657874 2d646563 6f726174 696f6e3a 6e6f6e65 3b223e0d 0a09093c 62757474 6f6e2074 79706520 3d202262 7574746f 6e223e50 72696e74 3c2f6275 74746f6e 3e0d0a09 093c2f61 3e0d0a09 09266e62 73703b26 6e627370 3b266e62 73703b26 6e627370 3b266e62 73703b0d 0a09093c 62757474 6f6e206f 6e636c69 636b203d 20227769 6e646f77 2e636c6f 73652829 3b223e43 6c6f7365 3c2f6275 74746f6e 3e0d0a09 0d0a093c 2f63656e 7465723e 0d0a3c2f 626f6479 3e0d0a3c 2f68746d 6c3e>
My problem is:
when i run the code there is no error, but the image is not displaying in UIImageView.
I don't want to use third party solution like SDWebImage.
what can i do for this issue?
Help will be appreciable.
Try to set the image on main thread like this:
dispatch_async(dispatch_get_global_queue(0,0), ^{
NSData * data = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString: _imgstr]];
if ( data == nil )
return;
dispatch_async(dispatch_get_main_queue(), ^{
_image = [UIImage imageWithData: data];
});
});
What -Nirav D telling is correct ...
So here I explained that answer in detail for your clarification and believe that u resolve it
dispatch_async(dispatch_get_main_queue(), ^{
[_image setImage:[UIImage imageWithData:data]];
};
UI related task must perform on main thread only. so u can set image view image by using main thread.
Hope u resolve it quickly.
Related
I am creating a captcha image as client needs.
I am getting JSON for the image with two key values.
key: CaptchaText, value: uEU3VNWh0lndY8UyL+jWsQ==
key: CaptchaImage, value: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABGAJYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1OiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAotrWlJffYW1OyF5uC/ZzOvmZPQbc5zV6vE/ivYSaR4vstatgFNwquGx/y1jI/ps/WvYtMvotU0u1v4f8AV3ESyr7ZGcV6uNy+NDDUcTTldTWvk1uv67EKfvuLGX2saZpjIt/qNpaM4yonnWMsPbJqM6/owODq1h/4Ep/jXkHiTd4t+LS2A+a3t3EJ7jZGCz/ruH5VZ8IaFa+INTmtruSZESIyAxMAc5A7g+tcma4Z4L2EIu85x5mn07fqcmIxU6c1CCvd2PXrXULK+LC0vLe4K/e8qVXx9cGor3WtK06YRX2p2VrKV3BJ51QkeuCenFeW+JtFHhLWLR9Ou5SWXzELEb0IOOoxkH6V12s+AdM8XTW2qalLeQXTW6K6QOoX16FT6mufLZ0K1RxxTcUu2updLETlKVOUbSRt/wDCVeHf+g/pf/gZH/jV2y1Ow1JHexvra6RDhmglVwp98HivHPHngbw/4T0VLiC6v5LyeQJCksqFeOWJAQHAH6kV1Pwp0eTT/B9xfS5DXzF1Hoiggfmc/pXv4nK8HDBfW6NRu7srq1+/6mynLnUGtztrPWdL1GZobHUrO6lUbmSCdXIHqQDV6vEPgz/yNF7/ANeZ/wDQ1r2+uHN8BHA4p0Iu6SX4jpT502FFFFeYaBRRRQAUUUUAFFFFABRRRQBxfxR0j+0/Bc8yLmWyYXC4/ujhv0JP4VifDnxRHbfD3UPPYF9JDsFJ5KMCyj8W3CvTJYkmheKRQyOpVge4PBr5m1Nbvw5fazoYbEUjiKTI5ZVbcp/l+dfXZJTjmODlgZ/ZkpL0vr+F/vMavuyUzvPhJp0l3c6xr9x8z7TCrnuzfM5/9B/OqPhnTtU1O/li0q9+yTLHuZ/NaPK5HGVGfSvTPCGjnRfBdlZFcTGEySDvvbkj8M4/CvNPDWvnw3qMtwbXzy0ZjKeZsxyD1wfSvlOIcXDFZm6knaOqXotF/Xmebi0kqTntd3/AuavpWr+HNSt9R1RYdQ3MMPK7SKzDoGzg8Y+lep6RqUer6Vb38SlVlXJUnO09CPzFeaaxrmp+N2gsrLTGWONgxVDv+Y5ALNgBR9a6XV7k+Bfhyy+YDdqnlRsoyPNfPI+nJ/CuTLKM69b2NLaTSXqzTB2VaXstYW1b7nnvi+6l8bfEiHSrV8wRSC1jKnI4OZH/AJ/gor22O1hstMW1t02Qww+Wi+igYAryv4N6EWkvNdmQ4H+jwE9zwWP8h+detSgtC4AySpAr6vPq0I1qeCpfDSSXz6v+utzvo+9J1H1PE/gz/wAjRe/9eZ/9DWvb6+bfBvio+D9WnvDZfajJEYSnm+XjkHOcH0r1Lwn8Tf8AhJ9ej0z+xzbb0ZvNFxvxgZ6bR/Ou7iTK8XVxM8VCF4JLW66LXS9zKjNRVn3PQKKKK+OOoKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=
I want to attach this key CaptchaImage to UIImage.
Following is the code that I am using.
NSString *tempStr = [dictionary valueForKey:#"CaptchaImage"];
NSLog(#"temp Ste :- %#",tempStr);//1
NSData* dataNewOne = [tempStr dataUsingEncoding:NSUTF8StringEncoding];
NSLog(#"Data to be :- %#",dataNewOne);//2
temp = [UIImage imageWithData:dataNewOne];
NSLog(#"image width:%f",temp.size.width);//3
NSLog(#"img :- %#",temp);//4
The code is working fine, but giving me null value.
NSLog gives me CaptchaImage like this
temp Ste :- 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
Second NSLog gives me NSData like this
Data to be :- <2f396a2f 34414151 536b5a4a 52674142 41514541 59414267 4141442f 32774244 41416747 42676347 42516748 4277634a 4351674b 4442514e 4441734c 44426b53 45773855 48526f66 48683061 48427767 4a43346e 49434973 49787763 4b446370 4c444178 4e445130 48796335 50546779 5043347a 4e444c2f 32774244 41516b4a 4351774c 4442674e 44526779 49527768 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4979 4d6a4c2f 77414152 43414247 414a5944 41534941 41684542 41784542 2f385141 48774141 41515542 41514542 41514541 41414141 41414141 41414543 41775146 42676349 43516f4c 2f385141 74524141 41674544 41774945 41775546 42415141 41414639 41514944 41415152 42524968 4d554547 45314668 42794a78 46444b42 6b614549 49304b78 77525653 3066416b 4d324a79 67676b4b 46686359 47526f6c 4a69636f 4b536f30 4e545933 4f446b36 51305246 526b6449 53557054 56465657 5631685a 576d4e6b 5a575a6e 61476c71 63335231 646e6434 65587144 68495747 6834694a 69704b54 6c4a5757 6c35695a 6d714b6a 704b576d 70366970 71724b7a 744c5732 74376935 75734c44 784d5847 78386a4a 79744c54 314e5857 31396a5a 32754869 342b546c 3575666f 36657278 38765030 39666233 2b506e36 2f385141 48774541 41774542 41514542 41514542 41514141 41414141 41414543 41775146 42676349 43516f4c 2f385141 74524541 41674543 42415144 42416346 42415141 41514a33 41414543 41784545 42534578 42684a42 55516468 63524d69 4d6f4549 46454b52 6f624842 43534d7a 55764156 596e4c52 4368596b 4e4f456c 38526359 47526f6d 4a796770 4b6a5532 4e7a6735 4f6b4e45 52555a48 53456c4b 55315256 566c6459 5756706a 5a47566d 5a326870 616e4e30 64585a33 65486c36 676f4f45 68596148 69496d4b 6b704f55 6c5a6158 6d4a6d61 6f714f6b 7061616e 714b6d71 73724f30 74626133 754c6d36 77735045 78636248 794d6e4b 30745055 31646258 324e6e61 3475506b 3565626e 364f6e71 38765030 39666233 2b506e36 2f396f41 44414d42 41414952 41784541 50774431 4f696969 67416f6f 6f6f414b 4b4b4b41 43696969 67416f6f 6f6f414b 4b4b4b41 43696969 67416f6f 6f6f414b 4b4b4b41 43696969 67416f6f 6f6f4151 6b4b4353 51414f53 54327249 6a38572b 47357055 69693851 6155386a 73465646 76597957 4a364144 504a7279 6a343661 74664455 744f3064 5a586973 48683835 774d685a 48334566 4e363763 4134392f 70555869 6a345436 446f7667 69625772 54574c69 53654b4a 4a413872 6f597073 34345541 5a476338 636e3861 56394f5a 37446131 35657037 7052586d 6e775931 4b396e38 44542f62 476b6547 306e5a49 47626b37 416f4f30 5a37416b 2f774171 36533338 65364c50 5a543354 4e4e4173 52414353 714e3068 49504367 45353655 716b3455 33615438 7a4a3159 52747a4f 31372f68 75645053 45685153 53414279 53653163 31706e6a 76527455 7578624b 5a376552 76754764 51417839 4d676e48 3434726b 50477669 4d617a71 45656e57 467a7573 6b49444d 75647276 6e723767 56685678 55495135 6b376e66 6c4f476a 6d566455 6163306c 71322b79 586b656a 77367a70 64784b73 554f7057 63736a48 436f6b36 73543941 44563676 4c645438 48366248 34572f74 6653722b 5735324b 4759766a 61343648 41786c54 6e73632b 6c645034 4b317553 38384d53 53586273 3732525a 57593873 79675a42 2b754f50 776f7031 337a7546 52576472 2f493944 45356268 33686672 65437163 3855374f 36733964 6e364856 30566936 44346e73 7645526e 46704863 49594e70 627a6c41 7a6e5054 42507055 57742b4c 74503047 2b6a744c 714b3565 52347849 504b5653 4143534f 35486f61 31397244 6c557236 4d34466c 2b4b6466 36767950 6e376454 666f6f6f 72513477 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 4138702b 4d2b7136 42396774 394a764c 4f533731 6478356c 71595732 74426b34 79546735 42492b37 6a6e4862 67313574 712f6772 786c7048 68693175 3952676e 66536f6a 35707454 4f574676 6b395751 48356335 366a706e 6e427272 2f697a34 64317130 38585165 4b624331 6b75725a 4652324b 526c7843 3066507a 67644634 7a6e7031 71747133 786e7674 66305766 52725477 2b715856 3748396e 33724f5a 636c766c 4f314e6f 4a4a7a78 79656364 616d4e2b 56323375 5539306e 73656865 4166454f 6b613734 4a615053 724e6241 57635a69 6b74464f 52476345 3542366b 486b3550 4a4f6331 7a666748 534c4c56 64576d61 39694571 77494857 4e76756b 35376a76 394b7466 436a776c 71486833 77337164 35716354 3238392b 6f4b774f 4d4d694b 72594c44 73547550 42365971 54345944 2f695a58 35376553 76383635 36365573 58432b75 6e364d38 7a465255 716c4a50 61372f51 6f65504e 4c744c44 7844436c 70436b4b 54784b7a 4967776f 4f534f42 32365663 38576544 6a70634d 4e2f7061 66364e44 47424d43 666d4441 2f664f65 75636a36 59394f69 2f45662f 414a474f 782f3634 722f3645 61327648 6d72586c 6c5a477a 5730456c 6c645162 476d7752 73665048 50546f4f 6c635534 51396e55 62585632 2f543548 72635079 72307331 6d384a46 4f64746e 6f6e6458 6136626e 47366466 61326644 576f5764 6a417639 6e676d53 346c7839 30454146 51536365 6e413572 6f2f4171 6e2f6845 39616248 42336748 2f746e58 4c61564a 71393570 6b2b6936 5a62764a 48504b72 7a4d6938 2b674250 52527833 394b3955 30585155 30727734 4e4d4c41 76496a65 63343773 77776365 33623643 716f516c 55764a58 66753231 37396b66 56346d72 39557933 3246616c 476c4f55 6b2b534c 765a4a33 75374e2f 49354c34 58663637 552f3841 646a2f39 6d716a38 53503841 6b614c66 2f723154 2f774244 6571656b 61706665 42395775 6f627179 4c6c3132 74475732 5a775468 6c4f446b 6461722b 4a357456 76745168 3148564c 5532776e 42574349 6a425646 50544858 71657036 35394d56 4b714a30 59302b71 65763373 39716e68 4a764f66 726c3179 536a6f37 72585262 4c667066 30506154 314e4a53 6e716153 7658507a 554b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696741 6f6f6f6f 414b4b4b 4b414369 69696744 2f396b3d>
Third NSLog gives me image width:0.000000
Fourth NSLog gives me img :- (null)
What I am doing wrong.
I am getting JSON perfectly in key value pair.
I want to add the NSString to UIImage in NSData format only.
I am getting JSON and NSData very well,
but My UIImage is not taking NSData.
Can any one guide me.
Thanks in advance.
As per the base64 string you have provided, it is valid, I have checked.. it is returning a captcha image, you can also verify it from this link:- http://www.askapache.com/online-tools/base64-image-converter/
Well a very easy way to do this:-
//First Convert your Base 64 NSString to NSData
NSData *data = [[NSData alloc]initWithBase64EncodedString:strEncodeData options:NSDataBase64DecodingIgnoreUnknownCharacters];
//Then display it
self.imgView.image = [UIImage imageWithData:data];
I am using soap approach to consume web services,response is in wsdl,the xml image tag contains cdata,and i am wondering how to create a uiimage with this type of data.
NSData* imageData = [[[[servicesArray objectAtIndex:indexPath.row]valueForKey:#"image"] valueForKey:#"text"] dataUsingEncoding:NSUTF8StringEncoding];
UIImage* image = [[UIImage alloc] initWithData:imageData];//[UIImage imageWithData:imageData];
but i am getting a nil in result
this is the cdata
<image><![CDATA[iVBORw0KGgoAAAANSUhEUgAAAG4AAABACAIAAAB0n9XqAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ8SURBVHhe7ZRhbttQDIN3gt2kp+j9z7QJkENolN6zkipZ45L4fkgUHcCE21+/Pz7FCKpyDFU5hqocQ1WOoSrHUJVjqMoxVOUYqnIMVTmGqhxDVY6hKsdQlWOoyjFU5RiPVPnnJvJL+sl358Gvsl9QP/nuPL3Kn8NJlV6ZKTsmWk1wKFwmL8auSrwwXj4P/esqcBm6X6UJaxxKE8NqxnAlTr5Kf+HN0L+uApfhjq/SlB0Ip03GFQM2X4aTKkWfb1rl8dE2Pttm7AWoyjFU5Rjf939ls6Nm7AW8d5WdzMt4VpVff8nOL5QZN6HySmamGYssq/TfgujqHLeb8ik6ME0dPzuZnCGHVjhZMdOPReoq42NxBm6ayMmrDyTEnL5JPJDx1QQHZnZM2YxO5LzKTHkl01cXTPjRucuMnAacGPPZhGvpH8tZjHi8ylI5Ayf6e8dZ+eA04FCMVkA+rWDlG63/ldmPTskmRidawcoH+4BfIfKxAvJpBSvfWFYJ/GFTXHFdsYnFU5wJP5nId05PprjSFSsgn1aw8o3zKo34fJw37GO4Ysj4yUS+cRzWp41D68rMzsoE/7NKF50iq8BdPpm0rszsrExwd5V5Ldln/OqiU6QMlKaTT+6YyMFaOqWZHaKuMj4W5+iYokk0AybyI0ciZGgl/Gqi1UQZCuAKou+zCdeSXZUQXZ3j9q/oijVzGgCehOhKHKGb4JRXk/vEcQuiQEnrD/ytoS5oXdGMRVRlTTMWuX6VRLOjZiyiKmuasYiqrGnGIqqyphmLqMqaZizy46p8HqpyDFU5hqocQ1WOoSrHUJVjqMoxVOUYqnIMVTmGqhxDVY6hKof4+PwLbB/absrmp4YAAAAASUVORK5CYII=]]></image>
and this is my nsdata
202020 20695642 4f527730 4b47676f 41414141 4e535568 45556741 41414734 41414142 41434149 41414142 306e3958 71414141 4141584e 53523049 41727334 63365141 41414152 6e515531 42414143 786a7776 38595155 41414141 4a634568 5a637741 4144734d 41414137 44416364 76714751 4141414a 38535552 42564868 65375a52 68627474 5144494e 33677432 6b702b6a 397a3751 4a6b454e 6f6c4e36 7a6b6970 5a34354c 34666b67 55486343 4532312b 2f507a37 46434b70 79444655 3568716f 63513157 4f6f5372 48554a56 6a714d6f 78564f55 59716e49 4d56546d 47716878 44565936 684b7364 516c574f 6f796a46 55355269 5056506e 6e4a764a 4c2b736c 33353847 76736c39 51502f6e 75504c33 4b6e384e 4a6c5636 5a4b5473 6d576b31 774b4677 6d4c3861 75537277 77586a34 502f6573 7163426d 36583655 4a617878 4b45384e 71786e41 6c547235 4b662b48 4e304c2b 75417066 686a712f 536c4230 49703033 4746514d 32583461 544b6b57 66623172 6c386445 32507474 6d374157 6f796a46 5535526a 66393339 6c73364e 6d374157 38643557 647a4d74 34567056 6666386e 4f4c3551 5a4e3648 79536d61 6d475973 73712f54 6667756a 71484c65 6238696b 364d4530 64507a75 5a6e4347 48566a68 5a4d644f 5052656f 7134324e 78426d36 61794d6d 72447954 456e4c35 4a504a44 78315151 485a6e5a 4d325978 4f354c7a 4b54486b 6c303163 5854506a 52756375 4d6e4161 63475050 5a684776 70483874 5a6a4869 38796c49 35417966 36653864 5a2b6541 30344643 4d566b41 2b725744 6c473633 2f6c646d 5054736b 6d526964 6177636f 482b3442 6649664b 7841764a 70425376 66574659 4a2f4746 54584846 6473596e 46553577 4a50356e 49643035 5070726a 53465373 676e3161 77386f33 7a4b6f33 34664a77 3337474f 3459736a 34795553 2b63527a 57703431 44363872 4d7a736f 452f374e 4b463530 69713842 6450706d 3072737a 73724578 77643556 354c646c 6e2f4f71 69553651 4d6c4b61 54542b36 59794d46 614f7157 5a48614b 754d6a34 57352b69 596f6b6b 30417962 79493063 695a4767 6c2f4771 69315551 5a437541 4b6f752b 7a436465 53585a55 51585a33 6a39712f 6f696a56 7a476743 65684f68 4b484b47 62344a52 586b2f76 45635175 6951456e 72442f79 746f5335 6f586447 4d525652 6c54544d 57755836 56524c4f 6a5a6979 694b6d75 61735969 7172476e 47497171 7970686d 4c714d71 615a697a 79343670 38487170 79444655 3568716f 63513157 4f6f5372 48554a56 6a714d6f 78564f55 59716e49 4d56546d 47716878 44565936 684b6f66 342b5077 4c62422f 61627372 6d703459 41414141 41535556 4f524b35 43594949
Kindly help me,
Thanks
Firstly you have to convert CData to NSData:
NSData *myData = (__bridge NSData*)my_cfdata;;
Then Use this to get UIImage:-
UIImage* image = [[UIImage alloc] myData];
I am trying to display json data in UIWebview.This is my json data
["{\"id\":\"6\",\"title\":null,\"description\":null,\"year\":\"2012\",\"date\":null}","{\"id\":\"4\",\"title\":\"Predictions proved correct in the year 2013\",\"description\":\"*<\\\/font> Financial system in America for this year is not indicated progress this year too. More problems will creep up.
\\r\\n*<\\\/font> Aggressive stage of Telangaana agitation- formation of seperate Telangaana state- bifurcation of state - sure indications are \\r\\n\\r\\npredicted.
\\r\\n*<\\\/font> Bad days for congress party was predicted long back. The same situations will continue.
\\r\\n*<\\\/font> The Gujarath CM - Sri Narendra Modi - Bright future is indicated. ( Care should be taken on health aspects).
\\r\\n*<\\\/font> Still danger is indicated for Indoneshia and Sumitra Islands\",\"year\":\"2013\",\"date\":null}"
{\"id\":\"3\",\"title\":\"2013-2014 Sri Vijayanama samvasthara Predictions\",\"description\":\"
జోతిస్యం అక్షర సత్యం
\\r\\nతెలంగాణా ఏర్పాటును గ్రహగతులు అనుసరించి మాత్రమే ఈ ఫలితము చెప్పడం జరిగింది . చరిత్రతమకమెన తెలంగాణా విషయంలో ములుగు సిద్ధాంతి వార్త పంచాంగంలో వ్రాసిన విధంగా అక్షరాల జరిగింది.
ప్రేత్యక తెలంగాణా విసయంలో అనేక రకాల మలుపులు తిరిగి ఎక్కడఎన ఆటంకం వస్తుందేమోనని బావించిన సందర్బాలు కూడా ఉన్నాయ్.
2011- 2012 శ్రీ ఖరనామ సవత్సరం వార్త పంచాంగంలో (58 వ పేజి , 18 లైనులో ) 2013-2014 శ్రీ విజయనామ సవత్సరం వార్త పంచాంగంలో తెలంగానా ఏర్పడుతుందని (40 వ పేజి 5 వ లైనులో )సిద్ధాంతి గారు వ్రాయడం జరిగింది
\\r\\n\\r\\nగమనిక : ఎంతోమంది జ్యోతిష్య, శాస్త్రవేత్తలు, సిద్దంతులు తలక్రిందులుగా తపస్సు చేసిన తెలంగాణా రాదనే చెప్పారు. ఒక్క ములుగు సిద్ధాంతి మాత్రమే మొదటి నుంచి చెబుతూనే వచ్చారు .\",\"year\":\"2014\",\"date\":null}"]
Now i need to display like this:
Financial system in America for this year is not indicated progress this year too. More problems will creep up.
*Aggressive stage of Telangaana agitation- formation of seperate Telangaana state- bifurcation of state - sure indications are predicted.
Bad days for congress party was predicted long back. The same situations will continue.
The Gujarath CM - Sri Narendra Modi - Bright future is indicated. ( Care should be taken on health aspects).
Still danger is indicated for Indoneshia and Sumitra Islands.
జోతిస్యం అక్షర సత్యం
తెలంగాణా ఏర్పాటును గ్రహగతులు అనుసరించి మాత్రమే ఈ ఫలితము చెప్పడం జరిగింది . చరిత్రతమకమెన తెలంగాణా విషయంలో ములుగు సిద్ధాంతి వార్త పంచాంగంలో వ్రాసిన విధంగా అక్షరాల జరిగింది.
ప్రేత్యక తెలంగాణా విసయంలో అనేక రకాల మలుపులు తిరిగి ఎక్కడఎన ఆటంకం వస్తుందేమోనని బావించిన సందర్బాలు కూడా ఉన్నాయ్.
2011- 2012 శ్రీ ఖరనామ సవత్సరం వార్త పంచాంగంలో (58 వ పేజి , 18 లైనులో ) 2013-2014 శ్రీ విజయనామ సవత్సరం వార్త పంచాంగంలో తెలంగానా ఏర్పడుతుందని (40 వ పేజి 5 వ లైనులో ) సిద్ధాంతి గారు వ్రాయడం జరిగింది
గమనిక : ఎంతోమంది జ్యోతిష్య, శాస్త్రవేత్తలు, సిద్దంతులు తలక్రిందులుగా తపస్సు చేసిన తెలంగాణా రాదనే చెప్పారు. ఒక్క సిద్ధాంతి మాత్రమే మొదటి నుంచి చెబుతూనే వచ్చారు
I am writing like this:
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
if(connection==urlConnection)
{
strResponse=[[NSString alloc]initWithData:responseData encoding:NSUTF8StringEncoding];
NSLog(#"%#",strResponse);
NSError *error;
jsonDict=[NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
NSLog(#"%#",jsonDict);
NSLog(#"object class == %#",[jsonDict class]);
stringArray=[jsonDict valueForKey:#"description"];
NSLog(#"%#",stringArray);
webView=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height)];
[webView loadHTMLString:strResponse baseURL:nil];
[self.view addSubview:webView];
}
}
-(void)loadData
{
NSUserDefaults *defaults=[NSUserDefaults standardUserDefaults];
[defaults valueForKey:#"id"];
[defaults valueForKey:#"title"];
[defaults valueForKey:#"description"];
[defaults synchronize];
NSURL *url=[NSURL URLWithString:#"url"];
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url];
urlConnection=[[NSURLConnection alloc]initWithRequest:request delegate:self startImmediately:YES];
}
- (void)viewDidLoad{
[super viewDidLoad];
NSString *html = [NSString stringWithFormat:#"<html><p>here you json data</p></html>"];
[myWebView loadHTMLString:html baseURL:nil];
}
I hope it helps.
I got below response in NSString and I want to convert it into NSMutableDictionary
{
"dictionary": [
{
"title": "أذكار الاستيقاظ من النوم",
"id": "1",
"prod_image": [
{
"title_des": "الحَمْدُ لله الذِي أحْيَانا بَعْدَ مَا أمَاتَنَا وإلَيْهِ النَشُور"
},
{
"title_des": "الحَمْدُ لله الذِي عَافَانِي في جَسَدِي ورَدَّ عَلَيَّ رُوحِي، وأَذِنَ لي بِذِكْرهِ"
},
{
"title_des": "قال رسول الله صلى الله عليه وسلم \"مَنْ تَعَارَ مِنَ اللَّيْل* فقال حين يستيقظ :\"لا إلَهَ إلاَّ الله وحْدَهُ لا شَرِيكَ لَهُ، لَهُ المُلْكُ ولَهُ الحَمْدُ وهُوَ على كلِّ شيءٍ قَدير،سُبْحانَ الله والحَمْدُ لله ولا إله إلا الله والله أكبر ولا حَولَ ولا قُوةَ إلا بالله العلي العظيم \" ثم دعا: \" اللَّهُمَّ اغْفِرْ لي، غُفِرَ له \"، قال الوليد: أو قال: \" دعا استُجيبَ لهُ، فإن قام فتوضأَ ثمصَلّى قُبِلَتْ صَلاتُهُ "
},
{
"title_des": "إِنَّ فِي خَلْقِ السَّمَاوَاتِ وَالأَرْضِ وَاخْتِلاَفِ اللَّيْلِ وَالنَّهَارِ لآيَاتٍ لِّأُوْلِي الألْبَابِ *الَّذِينَ يَذْكُرُونَ اللّهَ قِيَاماً وَقُعُوداً وَعَلَىَ جُنُوبِهِمْ وَيَتَفَكَّرُونَ فِي خَلْقِ السَّمَاوَاتِ وَالأَرْضِ رَبَّنَا مَا خَلَقْتَ هَذا بَاطِلاً سُبْحَانَكَ فَقِنَا عَذَابَ النَّارِ*رَبَّنَا إِنَّكَ مَن تُدْخِلِ النَّارَ فَقَدْ أَخْزَيْتَهُ وَمَا لِلظَّالِمِينَ مِنْ أَنصَارٍ *رَّبَّنَا إِنَّنَا سَمِعْنَا مُنَادِياً يُنَادِي لِلإِيمَانِ أَنْ آمِنُواْ بِرَبِّكُمْ فَآمَنَّا رَبَّنَا فَاغْفِرْ لَنَا ذُنُوبَنَا وَكَفِّرْ عَنَّا سَيِّئَاتِنَا وَتَوَفَّنَا مَعَ الأبْرَارِ * رَبَّنَا وَآتِنَا مَا وَعَدتَّنَا عَلَى رُسُلِكَ وَلاَ تُخْزِنَا يَوْمَ الْقِيَامَةِ إِنَّكَ لاَ تُخْلِفُ الْمِيعَادَ *فَاسْتَجَابَ لَهُمْ رَبُّهُمْ أَنِّي لاَ أُضِيعُ عَمَلَ عَامِلٍ مِّنكُم مِّن ذَكَرٍ أَوْ أُنثَى بَعْضُكُم مِّن بَعْضٍ فَالَّذِينَ هَاجَرُواْ وَأُخْرِجُواْ مِن دِيَارِهِمْ وَأُوذُواْ فِي سَبِيلِي وَقَاتَلُواْ وَقُتِلُواْ لأُكَفِّرَنَّ عَنْهُمْ سَيِّئَاتِهِمْ وَلأُدْخِلَنَّهُمْ جَنَّاتٍ تَجْرِي مِن تَحْتِهَا الأَنْهَارُ ثَوَاباً مِّن عِندِ اللّهِ وَاللّهُ عِندَهُ حُسْنُ الثَّوَابِ *لاَ يَغُرَّنَّكَ تَقَلُّبُ الَّذِينَ كَفَرُواْ فِي الْبِلاَدِ *مَتَاعٌ قَلِيلٌ ثُمَّ مَأْوَاهُمْ جَهَنَّمُ وَبِئْسَ الْمِهَادُ *لَكِنِ الَّذِينَ اتَّقَوْاْ رَبَّهُمْ لَهُمْ جَنَّاتٌ تَجْرِي مِن تَحْتِهَا الأَنْهَارُ خَالِدِينَ فِيهَا نُزُلاً مِّنْ عِندِ اللّهِ وَمَا عِندَ اللّهِ خَيْرٌ لِّلأَبْرَارِ * وَإِنَّ مِنْ أَهْلِ الْكِتَابِ لَمَن يُؤْمِنُ بِاللّهِ وَمَا أُنزِلَ إِلَيْكُمْ وَمَا أُنزِلَ إِلَيْهِمْ خَاشِعِينَ لِلّهِ لاَ يَشْتَرُونَ بِآيَاتِ اللّهِ ثَمَناً قَلِيلاً أُوْلَـئِكَ لَهُمْ أَجْرُهُمْ عِندَ رَبِّهِمْ إِنَّ اللّهَ سَرِيعُ الْحِسَابِ *يَا أَيُّهَا الَّذِينَ آمَنُواْ اصْبِرُواْ وَصَابِرُواْ وَرَابِطُواْ وَاتَّقُواْ اللّهَ لَعَلَّكُمْ تُفْلِحُونَ"
}
]
}
]
}
NSDictionary *myDictionary = [responseString JSONValue]; // use this code for convert Convert NSString to NSDictionary
After convert NSString to NSDictionary i got responce like this:
{
dictionary = (
{
id = 1;
"prod_image" = (
{
"title_des" = "\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0627\U0644\U0630\U0650\U064a \U0623\U062d\U0652\U064a\U064e\U0627\U0646\U0627 \U0628\U064e\U0639\U0652\U062f\U064e \U0645\U064e\U0627 \U0623\U0645\U064e\U0627\U062a\U064e\U0646\U064e\U0627 \U0648\U0625\U0644\U064e\U064a\U0652\U0647\U0650 \U0627\U0644\U0646\U064e\U0634\U064f\U0648\U0631";
},
{
"title_des" = "\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0627\U0644\U0630\U0650\U064a \U0639\U064e\U0627\U0641\U064e\U0627\U0646\U0650\U064a \U0641\U064a \U062c\U064e\U0633\U064e\U062f\U0650\U064a \U0648\U0631\U064e\U062f\U0651\U064e \U0639\U064e\U0644\U064e\U064a\U0651\U064e \U0631\U064f\U0648\U062d\U0650\U064a\U060c \U0648\U0623\U064e\U0630\U0650\U0646\U064e \U0644\U064a \U0628\U0650\U0630\U0650\U0643\U0652\U0631\U0647\U0650";
},
{
"title_des" = "\U0642\U0627\U0644 \U0631\U0633\U0648\U0644 \U0627\U0644\U0644\U0647 \U0635\U0644\U0649 \U0627\U0644\U0644\U0647 \U0639\U0644\U064a\U0647 \U0648\U0633\U0644\U0645 \"\U0645\U064e\U0646\U0652 \U062a\U064e\U0639\U064e\U0627\U0631\U064e \U0645\U0650\U0646\U064e \U0627\U0644\U0644\U0651\U064e\U064a\U0652\U0644* \U0641\U0642\U0627\U0644 \U062d\U064a\U0646 \U064a\U0633\U062a\U064a\U0642\U0638 :\"\U0644\U0627 \U0625\U0644\U064e\U0647\U064e \U0625\U0644\U0627\U0651\U064e \U0627\U0644\U0644\U0647 \U0648\U062d\U0652\U062f\U064e\U0647\U064f \U0644\U0627 \U0634\U064e\U0631\U0650\U064a\U0643\U064e \U0644\U064e\U0647\U064f\U060c \U0644\U064e\U0647\U064f \U0627\U0644\U0645\U064f\U0644\U0652\U0643\U064f \U0648\U0644\U064e\U0647\U064f \U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0648\U0647\U064f\U0648\U064e \U0639\U0644\U0649 \U0643\U0644\U0651\U0650 \U0634\U064a\U0621\U064d \U0642\U064e\U062f\U064a\U0631\U060c\U0633\U064f\U0628\U0652\U062d\U0627\U0646\U064e \U0627\U0644\U0644\U0647 \U0648\U0627\U0644\U062d\U064e\U0645\U0652\U062f\U064f \U0644\U0644\U0647 \U0648\U0644\U0627 \U0625\U0644\U0647 \U0625\U0644\U0627 \U0627\U0644\U0644\U0647 \U0648\U0627\U0644\U0644\U0647 \U0623\U0643\U0628\U0631 \U0648\U0644\U0627 \U062d\U064e\U0648\U0644\U064e \U0648\U0644\U0627 \U0642\U064f\U0648\U0629\U064e \U0625\U0644\U0627 \U0628\U0627\U0644\U0644\U0647 \U0627\U0644\U0639\U0644\U064a \U0627\U0644\U0639\U0638\U064a\U0645 \" \U062b\U0645 \U062f\U0639\U0627: \" \U0627\U0644\U0644\U0651\U064e\U0647\U064f\U0645\U0651\U064e \U0627\U063a\U0652\U0641\U0650\U0631\U0652 \U0644\U064a\U060c \U063a\U064f\U0641\U0650\U0631\U064e \U0644\U0647 \"\U060c \U0642\U0627\U0644 \U0627\U0644\U0648\U0644\U064a\U062f: \U0623\U0648 \U0642\U0627\U0644: \" \U062f\U0639\U0627 \U0627\U0633\U062a\U064f\U062c\U064a\U0628\U064e \U0644\U0647\U064f\U060c \U0641\U0625\U0646 \U0642\U0627\U0645 \U0641\U062a\U0648\U0636\U0623\U064e \U062b\U0645\U0635\U064e\U0644\U0651\U0649 \U0642\U064f\U0628\U0650\U0644\U064e\U062a\U0652 \U0635\U064e\U0644\U0627\U062a\U064f\U0647\U064f ";
},
{
"title_des" = "\U0625\U0650\U0646\U0651\U064e \U0641\U0650\U064a \U062e\U064e\U0644\U0652\U0642\U0650 \U0627\U0644\U0633\U0651\U064e\U0645\U064e\U0627\U0648\U064e\U0627\U062a\U0650 \U0648\U064e\U0627\U0644\U0623\U064e\U0631\U0652\U0636\U0650 \U0648\U064e\U0627\U062e\U0652\U062a\U0650\U0644\U0627\U064e\U0641\U0650 \U0627\U0644\U0644\U0651\U064e\U064a\U0652\U0644\U0650 \U0648\U064e\U0627\U0644\U0646\U0651\U064e\U0647\U064e\U0627\U0631\U0650 \U0644\U0622\U064a\U064e\U0627\U062a\U064d \U0644\U0651\U0650\U0623\U064f\U0648\U0652\U0644\U0650\U064a \U0627\U0644\U0623\U0644\U0652\U0628\U064e\U0627\U0628\U0650 *\U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U064a\U064e\U0630\U0652\U0643\U064f\U0631\U064f\U0648\U0646\U064e \U0627\U0644\U0644\U0651\U0647\U064e \U0642\U0650\U064a\U064e\U0627\U0645\U0627\U064b \U0648\U064e\U0642\U064f\U0639\U064f\U0648\U062f\U0627\U064b \U0648\U064e\U0639\U064e\U0644\U064e\U0649\U064e \U062c\U064f\U0646\U064f\U0648\U0628\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U064a\U064e\U062a\U064e\U0641\U064e\U0643\U0651\U064e\U0631\U064f\U0648\U0646\U064e \U0641\U0650\U064a \U062e\U064e\U0644\U0652\U0642\U0650 \U0627\U0644\U0633\U0651\U064e\U0645\U064e\U0627\U0648\U064e\U0627\U062a\U0650 \U0648\U064e\U0627\U0644\U0623\U064e\U0631\U0652\U0636\U0650 \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0645\U064e\U0627 \U062e\U064e\U0644\U064e\U0642\U0652\U062a\U064e \U0647\U064e\U0630\U0627 \U0628\U064e\U0627\U0637\U0650\U0644\U0627\U064b \U0633\U064f\U0628\U0652\U062d\U064e\U0627\U0646\U064e\U0643\U064e \U0641\U064e\U0642\U0650\U0646\U064e\U0627 \U0639\U064e\U0630\U064e\U0627\U0628\U064e \U0627\U0644\U0646\U0651\U064e\U0627\U0631\U0650*\U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0625\U0650\U0646\U0651\U064e\U0643\U064e \U0645\U064e\U0646 \U062a\U064f\U062f\U0652\U062e\U0650\U0644\U0650 \U0627\U0644\U0646\U0651\U064e\U0627\U0631\U064e \U0641\U064e\U0642\U064e\U062f\U0652 \U0623\U064e\U062e\U0652\U0632\U064e\U064a\U0652\U062a\U064e\U0647\U064f \U0648\U064e\U0645\U064e\U0627 \U0644\U0650\U0644\U0638\U0651\U064e\U0627\U0644\U0650\U0645\U0650\U064a\U0646\U064e \U0645\U0650\U0646\U0652 \U0623\U064e\U0646\U0635\U064e\U0627\U0631\U064d *\U0631\U0651\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0625\U0650\U0646\U0651\U064e\U0646\U064e\U0627 \U0633\U064e\U0645\U0650\U0639\U0652\U0646\U064e\U0627 \U0645\U064f\U0646\U064e\U0627\U062f\U0650\U064a\U0627\U064b \U064a\U064f\U0646\U064e\U0627\U062f\U0650\U064a \U0644\U0650\U0644\U0625\U0650\U064a\U0645\U064e\U0627\U0646\U0650 \U0623\U064e\U0646\U0652 \U0622\U0645\U0650\U0646\U064f\U0648\U0627\U0652 \U0628\U0650\U0631\U064e\U0628\U0651\U0650\U0643\U064f\U0645\U0652 \U0641\U064e\U0622\U0645\U064e\U0646\U0651\U064e\U0627 \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0641\U064e\U0627\U063a\U0652\U0641\U0650\U0631\U0652 \U0644\U064e\U0646\U064e\U0627 \U0630\U064f\U0646\U064f\U0648\U0628\U064e\U0646\U064e\U0627 \U0648\U064e\U0643\U064e\U0641\U0651\U0650\U0631\U0652 \U0639\U064e\U0646\U0651\U064e\U0627 \U0633\U064e\U064a\U0651\U0650\U0626\U064e\U0627\U062a\U0650\U0646\U064e\U0627 \U0648\U064e\U062a\U064e\U0648\U064e\U0641\U0651\U064e\U0646\U064e\U0627 \U0645\U064e\U0639\U064e \U0627\U0644\U0623\U0628\U0652\U0631\U064e\U0627\U0631\U0650 * \U0631\U064e\U0628\U0651\U064e\U0646\U064e\U0627 \U0648\U064e\U0622\U062a\U0650\U0646\U064e\U0627 \U0645\U064e\U0627 \U0648\U064e\U0639\U064e\U062f\U062a\U0651\U064e\U0646\U064e\U0627 \U0639\U064e\U0644\U064e\U0649 \U0631\U064f\U0633\U064f\U0644\U0650\U0643\U064e \U0648\U064e\U0644\U0627\U064e \U062a\U064f\U062e\U0652\U0632\U0650\U0646\U064e\U0627 \U064a\U064e\U0648\U0652\U0645\U064e \U0627\U0644\U0652\U0642\U0650\U064a\U064e\U0627\U0645\U064e\U0629\U0650 \U0625\U0650\U0646\U0651\U064e\U0643\U064e \U0644\U0627\U064e \U062a\U064f\U062e\U0652\U0644\U0650\U0641\U064f \U0627\U0644\U0652\U0645\U0650\U064a\U0639\U064e\U0627\U062f\U064e *\U0641\U064e\U0627\U0633\U0652\U062a\U064e\U062c\U064e\U0627\U0628\U064e \U0644\U064e\U0647\U064f\U0645\U0652 \U0631\U064e\U0628\U0651\U064f\U0647\U064f\U0645\U0652 \U0623\U064e\U0646\U0651\U0650\U064a \U0644\U0627\U064e \U0623\U064f\U0636\U0650\U064a\U0639\U064f \U0639\U064e\U0645\U064e\U0644\U064e \U0639\U064e\U0627\U0645\U0650\U0644\U064d \U0645\U0651\U0650\U0646\U0643\U064f\U0645 \U0645\U0651\U0650\U0646 \U0630\U064e\U0643\U064e\U0631\U064d \U0623\U064e\U0648\U0652 \U0623\U064f\U0646\U062b\U064e\U0649 \U0628\U064e\U0639\U0652\U0636\U064f\U0643\U064f\U0645 \U0645\U0651\U0650\U0646 \U0628\U064e\U0639\U0652\U0636\U064d \U0641\U064e\U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0647\U064e\U0627\U062c\U064e\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0623\U064f\U062e\U0652\U0631\U0650\U062c\U064f\U0648\U0627\U0652 \U0645\U0650\U0646 \U062f\U0650\U064a\U064e\U0627\U0631\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U0623\U064f\U0648\U0630\U064f\U0648\U0627\U0652 \U0641\U0650\U064a \U0633\U064e\U0628\U0650\U064a\U0644\U0650\U064a \U0648\U064e\U0642\U064e\U0627\U062a\U064e\U0644\U064f\U0648\U0627\U0652 \U0648\U064e\U0642\U064f\U062a\U0650\U0644\U064f\U0648\U0627\U0652 \U0644\U0623\U064f\U0643\U064e\U0641\U0651\U0650\U0631\U064e\U0646\U0651\U064e \U0639\U064e\U0646\U0652\U0647\U064f\U0645\U0652 \U0633\U064e\U064a\U0651\U0650\U0626\U064e\U0627\U062a\U0650\U0647\U0650\U0645\U0652 \U0648\U064e\U0644\U0623\U064f\U062f\U0652\U062e\U0650\U0644\U064e\U0646\U0651\U064e\U0647\U064f\U0645\U0652 \U062c\U064e\U0646\U0651\U064e\U0627\U062a\U064d \U062a\U064e\U062c\U0652\U0631\U0650\U064a \U0645\U0650\U0646 \U062a\U064e\U062d\U0652\U062a\U0650\U0647\U064e\U0627 \U0627\U0644\U0623\U064e\U0646\U0652\U0647\U064e\U0627\U0631\U064f \U062b\U064e\U0648\U064e\U0627\U0628\U0627\U064b \U0645\U0651\U0650\U0646 \U0639\U0650\U0646\U062f\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0627\U0644\U0644\U0651\U0647\U064f \U0639\U0650\U0646\U062f\U064e\U0647\U064f \U062d\U064f\U0633\U0652\U0646\U064f \U0627\U0644\U062b\U0651\U064e\U0648\U064e\U0627\U0628\U0650 *\U0644\U0627\U064e \U064a\U064e\U063a\U064f\U0631\U0651\U064e\U0646\U0651\U064e\U0643\U064e \U062a\U064e\U0642\U064e\U0644\U0651\U064f\U0628\U064f \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0643\U064e\U0641\U064e\U0631\U064f\U0648\U0627\U0652 \U0641\U0650\U064a \U0627\U0644\U0652\U0628\U0650\U0644\U0627\U064e\U062f\U0650 *\U0645\U064e\U062a\U064e\U0627\U0639\U064c \U0642\U064e\U0644\U0650\U064a\U0644\U064c \U062b\U064f\U0645\U0651\U064e \U0645\U064e\U0623\U0652\U0648\U064e\U0627\U0647\U064f\U0645\U0652 \U062c\U064e\U0647\U064e\U0646\U0651\U064e\U0645\U064f \U0648\U064e\U0628\U0650\U0626\U0652\U0633\U064e \U0627\U0644\U0652\U0645\U0650\U0647\U064e\U0627\U062f\U064f *\U0644\U064e\U0643\U0650\U0646\U0650 \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0627\U062a\U0651\U064e\U0642\U064e\U0648\U0652\U0627\U0652 \U0631\U064e\U0628\U0651\U064e\U0647\U064f\U0645\U0652 \U0644\U064e\U0647\U064f\U0645\U0652 \U062c\U064e\U0646\U0651\U064e\U0627\U062a\U064c \U062a\U064e\U062c\U0652\U0631\U0650\U064a \U0645\U0650\U0646 \U062a\U064e\U062d\U0652\U062a\U0650\U0647\U064e\U0627 \U0627\U0644\U0623\U064e\U0646\U0652\U0647\U064e\U0627\U0631\U064f \U062e\U064e\U0627\U0644\U0650\U062f\U0650\U064a\U0646\U064e \U0641\U0650\U064a\U0647\U064e\U0627 \U0646\U064f\U0632\U064f\U0644\U0627\U064b \U0645\U0651\U0650\U0646\U0652 \U0639\U0650\U0646\U062f\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0645\U064e\U0627 \U0639\U0650\U0646\U062f\U064e \U0627\U0644\U0644\U0651\U0647\U0650 \U062e\U064e\U064a\U0652\U0631\U064c \U0644\U0651\U0650\U0644\U0623\U064e\U0628\U0652\U0631\U064e\U0627\U0631\U0650 * \U0648\U064e\U0625\U0650\U0646\U0651\U064e \U0645\U0650\U0646\U0652 \U0623\U064e\U0647\U0652\U0644\U0650 \U0627\U0644\U0652\U0643\U0650\U062a\U064e\U0627\U0628\U0650 \U0644\U064e\U0645\U064e\U0646 \U064a\U064f\U0624\U0652\U0645\U0650\U0646\U064f \U0628\U0650\U0627\U0644\U0644\U0651\U0647\U0650 \U0648\U064e\U0645\U064e\U0627 \U0623\U064f\U0646\U0632\U0650\U0644\U064e \U0625\U0650\U0644\U064e\U064a\U0652\U0643\U064f\U0645\U0652 \U0648\U064e\U0645\U064e\U0627 \U0623\U064f\U0646\U0632\U0650\U0644\U064e \U0625\U0650\U0644\U064e\U064a\U0652\U0647\U0650\U0645\U0652 \U062e\U064e\U0627\U0634\U0650\U0639\U0650\U064a\U0646\U064e \U0644\U0650\U0644\U0651\U0647\U0650 \U0644\U0627\U064e \U064a\U064e\U0634\U0652\U062a\U064e\U0631\U064f\U0648\U0646\U064e \U0628\U0650\U0622\U064a\U064e\U0627\U062a\U0650 \U0627\U0644\U0644\U0651\U0647\U0650 \U062b\U064e\U0645\U064e\U0646\U0627\U064b \U0642\U064e\U0644\U0650\U064a\U0644\U0627\U064b \U0623\U064f\U0648\U0652\U0644\U064e\U0640\U0626\U0650\U0643\U064e \U0644\U064e\U0647\U064f\U0645\U0652 \U0623\U064e\U062c\U0652\U0631\U064f\U0647\U064f\U0645\U0652 \U0639\U0650\U0646\U062f\U064e \U0631\U064e\U0628\U0651\U0650\U0647\U0650\U0645\U0652 \U0625\U0650\U0646\U0651\U064e \U0627\U0644\U0644\U0651\U0647\U064e \U0633\U064e\U0631\U0650\U064a\U0639\U064f \U0627\U0644\U0652\U062d\U0650\U0633\U064e\U0627\U0628\U0650 *\U064a\U064e\U0627 \U0623\U064e\U064a\U0651\U064f\U0647\U064e\U0627 \U0627\U0644\U0651\U064e\U0630\U0650\U064a\U0646\U064e \U0622\U0645\U064e\U0646\U064f\U0648\U0627\U0652 \U0627\U0635\U0652\U0628\U0650\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0635\U064e\U0627\U0628\U0650\U0631\U064f\U0648\U0627\U0652 \U0648\U064e\U0631\U064e\U0627\U0628\U0650\U0637\U064f\U0648\U0627\U0652 \U0648\U064e\U0627\U062a\U0651\U064e\U0642\U064f\U0648\U0627\U0652 \U0627\U0644\U0644\U0651\U0647\U064e \U0644\U064e\U0639\U064e\U0644\U0651\U064e\U0643\U064f\U0645\U0652 \U062a\U064f\U0641\U0652\U0644\U0650\U062d\U064f\U0648\U0646\U064e";
}
);
title = "\U0623\U0630\U0643\U0627\U0631 \U0627\U0644\U0627\U0633\U062a\U064a\U0642\U0627\U0638 \U0645\U0646 \U0627\U0644\U0646\U0648\U0645";
}
]
}
]
}
I am trying to read direct data from file which is in the project.
NSDictionary *myDictionary = [responseString JSONValue]; It's giving you correct Dictionary and Arrays.
e.g
[[myDictionary objectAtIndex:0] valueForKey:#"prod_image"];
give you the "title_des". If you want to get the First "title_des" then You can do something Like..
[[[[myDictionary objectAtIndex:0] valueForKey:#"prod_image"]objectAtIndex:0] valueForKey:#"title_des"];
When you print the "title_des" it will give you right result. But When you NSLOg the result it will not give you Correct Arabic.
You have to use the NSUTF8StringEncoding.
Let me know If you know something.
This is a JSON string so you can load it inside a NSDictionary using:
NSData *data = [self.json dataUsingEncoding:<encoding for arabian character>];
NSDictionary *dicSignature = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
Don't know about the encoding to use here, but for example, latin character would use NSUTF8StringEncoding.
You are getting JSON string as response. To convert it into NSMutableDictionary, you have to use
NSJSONSerialization or any other way to convert it. Try this:-
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:yourResponse options: NSJSONReadingMutableContainers error:&error];
Can any one suggest me that how can I retrive a image from iphone app through WCF web service
and save it to a directory.
I am recieving a image from iphone app in form of NSDATA(Don't know about that,Actually iphone develpoer is giving me a image as Nsdata).
and I am doing like this to convert this data to image and save to my directory
public Image byteArrayToImage(byte[] byteArrayIn)
{
Image returnImage = null;
string ApplicationVerifyPath = ConfigurationManager.AppSettings["ImagePath"].ToString();
ApplicationVerifyPath = ApplicationVerifyPath + "RetailerAdmin/ProductImages/";
using (MemoryStream ms = new MemoryStream(byteArrayIn, 0, byteArrayIn.Length))
{
ms.Write(byteArrayIn, 0, byteArrayIn.Length);
ms.Seek(0, SeekOrigin.Begin);
returnImage = Image.FromStream(ms);
returnImage.Save(ApplicationVerifyPath + returnImage, System.Drawing.Imaging.ImageFormat.Png);
}
return returnImage;
}
it is showing (parameter is invalid error in Image.FromStream(ms).
Kindly help me to get out from this solution.
Image data example
ffd8ffe0 00104a46 49460001 01000001 00010000 ffe10058 45786966 00004d4d 002a0000 00080002
01120003 00000001 00010000 87690004 00000001 00000026 00000000 0003a001 00030000 00010001 0000a002
00040000 00010000 00e1a003 00040000 00010000 00e10000 0000ffdb 00430020 16181c18 14201c1a 1c242220
26305034 302c2c30 62464a3a 5074667a 78726670 6e8090b8 9c8088ae 8a6e70a0 daa2aebe c4ced0ce 7c9ae2f2
e0c8f0b8 cacec6ff db004301 22242430 2a305e34 345ec684 7084c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6
c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 c6c6c6c6 ffc00011 0800e100 e1030122
00021101 031101ff c4001f00 00010501 01010101 01000000 00000000 00010203 04050607 08090a0b ffc400b5
10000201 03030204 03050504 04000001 7d010203 00041105 12213141 06135161 07227114 328191a1 082342b1
c11552d1 f0243362 7282090a 16171819 1a252627 28292a34 35363738 393a4344 45464748 494a5354 55565758
595a6364 65666768 696a7374 75767778 797a8384 85868788 898a9293 94959697 98999aa2 a3a4a5a6 a7a8a9aa
b2b3b4b5 b6b7b8b9 bac2c3c4 c5c6c7c8 c9cad2d3 d4d5d6d7 d8d9dae1 e2e3e4e5 e6e7e8e9 eaf1f2f3 f4f5f6f7
f8f9faff c4001f01 00030101 01010101 01010100 00000000 00010203 04050607 08090a0b ffc400b5 11000201
02040403 04070504 04000102 77000102 03110405 21310612 41510761 71132232 81081442 91a1b1c1 09233352
f0156272 d10a1624 34e125f1 1718191a 26272829 2a353637 38393a43 44454647 48494a53 54555657 58595a63
64656667 68696a73 74757677 78797a82 83848586 8788898a 92939495 96979899 9aa2a3a4 a5a6a7a8 a9aab2b3
b4b5b6b7 b8b9bac2 c3c4c5c6 c7c8c9ca d2d3d4d5 d6d7d8d9 dae2e3e4 e5e6e7e8 e9eaf2f3 f4f5f6f7 f8f9faff
da000c03 01000211 0311003f 00e828a2 aadede47 6716f7e5 8f0aa3a9 34016738 a85eeedd 0e1e7894 fbb815ce
5c5ddcde 37ef1c85 3d11781f fd7a885b 36385fe9 401d3fdb ad3fe7e6 1ffbec51 f6eb4ff9 f987fefb 15ccfd99
bfba3f31 47d99bfb bfa8a00e 9bedd69f f3f30ffd f628fb75 a7fcfcc3 ff007d8a e67eccdf dd1f98a3 eccdfdd1
f98a00e9 bedd69ff 003f30ff 00df628f b75a7fcf cc3ff7d8 ae67eccd fdd1f98a 3eccdfdd 1f98a00e 9bedd69f
f3f30ffd f628fb75 a7fcfcc3 ff007d8a e67eccdf dd1f98a3 eccde83f 31401d37 dbad3fe7 e61ffbec 51f6eb4f
f9f987fe fb15ccfd 99bd07e6 297eccdf dd1f98a0 0e97edd6 9ff3f30f fdf628fb 75a7fcfc c3ff007d 8ae67ecc
dfdd1f98 a3eccdfd d1f98a00 e9bedd69 ff003f30 ff00df62 8fb75a7f cfcc3ff7 d8ae67ec cde83f31 47d99bfb
a3f31401 d37dbad3 fe7e61ff 00bec51f 6eb4ff00 9f987fef b15ccfd9 9bfba3f3 147d99bf ba3f3140 1d37dbad
3fe7e61f fbec51f6 eb4ff9f9 87fefb15 cd7d99bf ba3f3149 f666fee8 fcc50074 df6eb4ff 009f987f efb147db
ad3fe7e6 1ffbec57 33f666fe e8fcc51f 666feefe a2803a75 bcb56385 b8889f40 e2a60411 906b9236 cd8fbbfa
d2c33dc5 9b7ee5ca e3f84f4f ca803ada 2a8e9da8 25ea107e 5957ef2f f51ed57a 800a28a2 80109c0c d72b7970
6f2eda4c e541c20f 6ae8ef9c a5a4cc3a 8427f4ae 5a100628 0275c20e 3af73464 9ea68a28 00a29296 800e68e6
8a2800a2 8a2800fc 68a28a00 28a4a5a0 028a4a28 0168a292 80168a4a 5a0028a2 8a0028a2 8a0039f5 a52430c3
7e06928a 008e391e d675993a a9e9ea3b 8aeae291 658d5d4e 430c835c 9cb5d068 cc5b4e8b 3d811f91 22802fd1
45140153 51ff008f 19ff00eb 9b7f2ae6 a2ed5d2e a5ff001e 33ff00d7 36fe55cc c5401351 45140051 4945002d
14514005 14514005 14946680 168a4cd2 6e1400ea 29bb87ad 2eea005a 29334500 2d1494b4 00514514 00514514
00514514 011cb5bb a27fc83e 3fc7f99a c296b774 4ff907c7 f53fccd0 06951451 4015352f f8f19ffe b9b7f2ae
662ae9b5 2ff8f19f feb9b7f2 ae662a00 968a4a5a 0028a4a2 80168a4a 28016834 84e2a6b3 b396f1fe 4f9507de
73fd2802 11962154 1627a003 26af5be9 37128065 2221e879 35ad6b67 0daae235 f9bbb1ea 6ac50067 c7a3db27
df2f21f7 381fa54e ba7da01f f1ef19fa 8cd59a69 9635382e a3ea6802 03a7da11 ff001ef1 8fa2e2a1 9348b57f
ba1a33fe cb7f8d5c 13447a48 87fe0429 f401873e 8f320cc2 e241e878 354183c6 db24528c 3b118aea ea2b8b68
ae536ca8 08ec7b8f a5007339 a2ac5f58 4966770f 9e1fef77 1f5aac0e 680168a2 8a0028a2 9280168a 29280192
d6f689ff 0020f8fe a7f99ac1 92b7b44f f907c7f5 3fccd006 95145140 15352ff8 f19ffeb9 b7f2ae62 2ae9f52f
f8f19ffe b9b7f2ae 622a0096 8a4a2801 68a4a280 1690d148 0348eb1a 0cb31c01 40162c6d 1af26db9 c46bf7db
fa574714 69146111 42a81c01 515a5bad adbac4bd ba9f5353 92154963 803a9340 01200c93 802b32e7 57018c76
89e637f7 cfdd1fe3 556eeede fe42884a db838f77 ff00eb51 1a2a2e00 a9723a21 4afab18d f69b8399 a77c7f75
4e0520b3 8fb8c9f5 353e68cd 4dcd9452 20365176 5c52aa4f 01cc13ba fb139153 668cd170 714c96df 57746097
898ffa68 bd3f115a 88eb2207 460ca790 45623287 1c8a8e09 e4d3e4ca 7cd093f3 27f514d4 8c6747aa 3a0650ca
430c83d4 1ae7b52b 236926f8 c7ee58f1 fec9f4ad f8e449a3 5910e558 641a4962 49a368dc 655860d5 9ce72e0e
68a59a26 b6b8785f aa9ebea3 b1a6d002 d1494500 2d149450 0324aded 13fe41f1 fd5bf99a c192b7f4 4ff907c7
f56fe668 034a8a28 a00a9a9f fc78cfff 005cdbf9 572f1575 1a9ffc78 4fff005c dbf9572f 1d004b45 251400b4
52514001 ad0d0e0d f3bcec38 4185fa9a cd63815d 0e931f97 a745c72f f39fc7ff 00ad4017 4726b2f5 9b924ada
21ebcb9f 6ec2b4f2 154b13c0 1cd736ae 669e499b abb67fc2 a64ec8da 8c39a44f 1a851802 9d9a6668 cd6676d8
7e68cd33 346680b0 fcd19a66 68cd0161 f9a6b00c 39a4cd19 a02c4da5 5c1b7b9f b331fddc 9cafb1f4 ad93c1ae
6ae32007 53865390 6ba18651 35bc728f e200d691 671d6872 bb99baec 198d2e14 72a76b7d 0d648391 5d2ddc5e
75a4b1ff 00794e3e bdab9843 95aa301f 45251400 b452519a 006c95bd a1ff00c8 3e3fab7f 33581256 fe87ff00
20f8fead ff00a11a 00d3a28a 28029ea7 ff001e13 ff00d736 fe55cbc7 5d46a7ff 001e13ff 00d736fe 55cbc740
12514514 0052d251 400c9490 a71e95d5 c2a1208d 47f0a815 c94bf70f d2bad560 63523b81 4011deb9 4b19d81e
429ac080 e12b7350 e74f9ffd dae7d0e0 715133b7 0aaf72ce ea37541b 8d2ee350 75f293ee a37541bc d1bcd01c
a4fba8dd 506f346f 34072936 ea37543b 8d26e340 72924ad9 4ad8d218 b69c993f 74902b09 98915b5a 3f1a70ff
0078d544 e5c4ab24 5feb5c99 1b25917f baec3f23 5d58ae52 420dccc4 77918fea 6b43845a 28a2800a 28a28019
25741a17 fc83a3fa b7fe846b 9f92ba0d 0bfe41f1 fd5bff00 423401a7 45145005 3d4ffe3c 27ff00ae 6dfcab96
8eba9d4f fe3c27ff 00ae6dfc ab968e80 24a2928a 005a2928 a006b8c8 ae974f93 cdd3e06f f6003f51 c5736dd2
b5f40981 864809e5 0ee1f434 01a52287 8dd0ff00 12915cc2 e54953d4 1c1aea1b 8ac2d520 30dd79aa 3e4939fc
7bd4491d 1879f2ca c56a2933 45667a37 168a4a28 0b8b4525 1405c5a2 928cd017 11ce16ba 2b28cc56 71211ced
c9fc6b0e ca037374 aa47c8bc b7d2ba21 c9ad22ba 9c1899dd d824711c 4ee7a2a9 26b938f2 464f53c9 adfd6a6f
2ac0a03f 34a768fa 77ac15e0 559ca3e8 a4a28017 34525140 0d7ae874 2ff907c7 f56ffd08 d73cf5d0 e85ff20e
8feadffa 11a00d3a 28a28029 ea7ff1e1 3ffd736f e55cac75 d56a7ff1 e13ffd73 6fe55caa 5003e969 28a00296
928a000d 3ed2e0da 5da4dd87 0c3da994 d619a00e b32aea19 4e548c82 2abdcc2b 3c4d1bf4 3d0fa1ac ed1aff00
6e2d263c 7fcb363f cab61968 04ec7332 c6f04a63 90608fd6 9335bb73 6d1dc26d 9074e8c3 a8ac6b8b 49ad8e48
de9fde1f d6b3713b 69d74f46 47453036 69d9a93a 3993168a 4cd216c5 01cc8752 00d23844 1b98f402 9f05bcd7
27f76bf2 f763d056 c5a59c76 c3e5f99c f56354a3 730a9592 d10fb2b6 16d0ec07 2c7963ef 57145314 567eb17e
21436d11 fde30f98 8fe11fe3 5a1c4ddd dd99fa9d d0bbbd25 4e638fe5 5f7f5355 c714c418 14fa042d 25145002
d1494500 35eba2d0 bfe41d1f d5bff423 5cebd743 a17fc83a 3fab7fe8 46803528 a28a00a7 a9ff00c7 84ff00f5
cdbf9572 895d5ea7 ff001e13 ff00d736 fe55ca25 003e8a28 a0028a28 a0028345 1400c65a d7d3b560 4082e8e0
f4590f7f ad651a6b 2e6803ac 65c8e2a3 208ae7ed 3519ecc6 d07cc8ff 00b8ddbe 9e95af6f aa5acfc1 6f29ff00
baff00e3 4004b656 d29cb440 1f55e2a0 3a4c24f1 2c8bed8c d69050c3 2a4107b8 a361a564 52935b33 306910e7
99a43f80 a9e3b0b5 8cf116e3 eae73573 61a5da00 e68b2073 6fa8c038 e071e952 2a5559f5 1b4b6183 26f6feea
726b26ef 559ee414 8c7951fa 03c9fa9a 649a1a8e aab0030d b90f2f76 ecbffd7a c3e598b3 12c49c92 7a9a4550
074a78e2 80147145 14500145 14500145 1450035e ba2d0bfe 41d1fd5b ff004235 cebd745a 17fc83a3 fab7fe84
6803528a 28a00a7a a7fc784f ff005cdb f957269d abacd53f e3c2e3fe b9b7f2ae 4d2801f4 51450014 5252d001
45145001 45149400 100d34a8 3da9f494 00d46923 3fbb774f f75b153a dfdea0e2 e1ff001c 1a8a8c0a 0095b50b
d61cdc37 e000a85d e597fd6c aeff00ef 3134b8a3 02801a10 0e829c00 1452d001 45145001 45149400 b4514500
14514500 35aba3d0 bfe41d1f d5bff423 5ce35747 a0ff00c8 3a2fab7f e8468035 28a28a00 a7aa7fc7 84ff00f5
cdbf9572 69dabadd 48136338 1ff3cdbf 957229d2 801f4525 1400b452 52d00145 251400b4 5251400b 45251400
b4514500 14514940 0b452514 00b45251 400b4525 1400b452 51400b45 2514008d 5d2683ff 0020e8be adff00a1
1ae6daba 5d0b8d3a 2fc7f99a 00d3a28a 280229d7 72104704 571d2c4d 04ef1375 53f98ed5 da30c8ac 6d574ff3
ff007883 120fd680 30fad14d 21918ab8 2ac3a834 b9a005a2 93346680 168a4cd1 9a005a29 33466801 68a4cd19
a005a293 34668016 8a4cd19a 005a2933 46680168 a4cd19a0 05a29334 6680168a 4cd19a00 5a293349 924e00c9
3d00a005 c33b0551 9663802b aeb18843 6f1c63f8 540ac8d2 b4e64613 4c3e7fe1 1e9ffd7a de45c2d0 03e8a28a
002a3910 30a928a0 0cdb9b18 e618740d fcea8b68 d0e78320 f606b7c8 069be58f 4a00c0fe c68bfbd2 7e63fc28
fec68bfb d27e63fc 2b7fcb1e 947963d2 80303fb1 a2fef49f 98ff000a 3fb1a2fe f49f98ff 000adff2 c7a51e58
f4a00c0f ec68bfbd 27e63fc2 8fec68bf bd27e63f c2b7fcb1 e947963d 280303fb 1a2fef49 f98ff0a3 fb1a2fef
49f98ff0 adff002c 7a51e58f 4a00c0fe c68bfbd2 7e63fc28 fec68bfb d27e63fc 2b7fcb1e 947963d2 80303fb1
a2fef49f 98ff000a 3fb1a2fe f49f98ff 000adff2 c7a51e58 f4a00c0f ec68bfbd 27e63fc2 8fec68bf bd27e63f
c2b7fcb1 e947963d 280303fb 1a2fef49 f98ff0a3 fb1a2fef 49f98ff0 adff002c 7a51e58f 4a00c0fe c68bfbd2
7e63fc28 fec68bfb d27e63fc 2b7fcb1e 947963d2 80303fb1 a2fef49f 98ff000a 3fb1a2fe f49f98ff 000adff2
c7a51e58 f4a00c11 a3459e5a 43f8d5cb 6d3e2879 4400faf7 ad2f2c52 85028019 1c61474a 92968a00 28a28a00
28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00 28a28a00
28a28a00 28a28a00 28a28a00 28a28a00 ffd9
You can try the below way as I had implemented in one of my project when intergrating WCF REST service in iPhone.
Get NSDATA to string property or variable. Use this string as Base64 string and convert it into an image and save it to your directory.
public void Base64ToImage(string imageString)
{
// Convert Base64 String to byte[]
byte[] imageBytes = Convert.FromBase64String(imageString);
MemoryStream ms = new MemoryStream(imageBytes, 0,
imageBytes.Length);
// Convert byte[] to Image
ms.Write(imageBytes, 0, imageBytes.Length);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms, true);
image.Save("Base64ToImage.png"); //Specify your filename here
}