How do i create imageview from Blob data stored in Sqlite Database?
Hi
I am trying make group functionality for my iphone application using whom user can able to make group by selecting desire iphone contacts.
For that i am making contact screen using titanium contacts API and getting all data successfully.
On selection of desire contacts i am storing all data in local database successfully.
But when i am trying create imageview using blob data which is store in local database in blob format. it gives me an error.
Expert comments needed to dig it out.
Thanks in advance.
8 Answers
-
Any luck with this? I have the same question.
-
Sorry Ryan still not having luck to dig it out.. :)
-
Were you able to find an answer to this? I have a lot of images store in a sqlite db as BLOB's that I need to have displayed in an image view as well.
Thanks,
Cory -
Were you able to find an answer to this? I have a lot of images store in a sqlite db as BLOB's that I need to have displayed in an image view as well.
Thanks,
Cory -
Same problem here :-(
Any hint ??
-
(sorry for multipost)
-
Have you tried to base64 encode the image and put it in the db.
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Utils.base64encode-method.htmlThen when retrieving use the base64 string and embed to a webview.
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
or just base64 decode http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Utils.base64decode-method.html
-
i just posted some code for a module to do this conversion, I know a patch is coming from appcelerator, but the module might be useful to you now.
Clearly Innovative Thoughts - Titanium Appcelerator Quickie: base64encode iOS Module