简体   繁体   English

如何将OData服务(OData)字节数组放入UIImage

[英]How to OData Service(OData) Bytes array into UIImage

In my iPhone project,I use Odata Service to get data from SQL Server database from web server and update data to client SQLite database.But I face problem in image.Server return binary array for image and this binary array is convert to NSData object.I want to convert this NSData object to UIImage. 在我的iPhone项目中,我使用Odata Service从Web服务器从SQL Server数据库获取数据并将数据更新到客户端SQLite数据库。但是我在image中遇到问题。服务器返回image的二进制数组,并将此二进制数组转换为NSData对象。我想将此NSData对象转换为UIImage。 I use [UIImage imageWithData:] method but It is not ok for me.How to convert this NSData object into UIImage? 我使用[UIImage imageWithData:]方法,但对我来说不行。如何将此NSData对象转换为UIImage?

尝试使用以下类从Base64对其进行解码: http : //cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM