开发者

how to convert ascii text art into UIImage on iphone

开发者 https://www.devze.com 2023-02-09 12:09 出处:网络
I am taking image as an input and converting it into ascii(actually two formats-a simple character string and an html page out of it). The approach I am using to save this ascii text as UIImage is to

I am taking image as an input and converting it into ascii(actually two formats-a simple character string and an html page out of it). The approach I am using to save this ascii text as UIImage is to display the text in UIWebView and take its screenshot programatically and save it. My problem here is that when I take the screenshot it is only able to capture and save the visible part of the scrollable view.

My question is that is there an alternate way of saving 开发者_StackOverflowthe ascii as UIImage other then going the UIWebView approach. If I have to use UIWebView could someone suggest how to go about re-scrolling and taking the second(and maybe more) screenshot.

with regards, Rol


Use drawAtPoint:withAttributes method to draw string objects in a view. Then convert the content of the view into an UIImage object as discussed here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号