NimbleKit - fast iOS app development

Take a picture and upload to SQLITE

Forum for posting sample code and examples, new posts creation is not allowed, but everybody can comment

Take a picture and upload to SQLITE

Postby cactuscraig » Thu May 26, 2011 12:52 am

Anybody have sample code, if possible:
1) Take picture from within App
2) Then upload it to a SQLITE DB.

Thanks in advance
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Take a picture and upload to SQLITE

Postby Big-O » Thu May 26, 2011 4:45 pm

I don't have code for that but I'm almost positive that I've seen that posted on these forums before. You should look around for it.
-- Big-O
-- Nimblekit Guru, Web Developer, Hopeless Geek

I do freelance!
http://realisticweb.com
User avatar
Big-O
NimbleKit Guru
 
Posts: 1231
Joined: Thu Sep 24, 2009 4:02 am

Re: Take a picture and upload to SQLITE

Postby modemlooper » Sun May 29, 2011 8:07 pm

I read some code on here and tried it and it takes 10+ seconds to save to sqlite after image is taken. This kills any use of it in a functioning app. Never figured any other way of saving and accessing images either that did not work smoothly.
User avatar
modemlooper
 
Posts: 143
Joined: Mon Feb 14, 2011 2:58 am

Re: Take a picture and upload to SQLITE

Postby Big-O » Tue May 31, 2011 5:05 pm

Yeah, the serialization it has to do is expensive, so I'm not surprised. Saving to the documents folder and just saving pathnames in the db would be MUCH faster.
-- Big-O
-- Nimblekit Guru, Web Developer, Hopeless Geek

I do freelance!
http://realisticweb.com
User avatar
Big-O
NimbleKit Guru
 
Posts: 1231
Joined: Thu Sep 24, 2009 4:02 am

Re: Take a picture and upload to SQLITE

Postby modemlooper » Tue May 31, 2011 5:36 pm

Can you explain how to save pathname? I'm not sure how to get it.
User avatar
modemlooper
 
Posts: 143
Joined: Mon Feb 14, 2011 2:58 am

Re: Take a picture and upload to SQLITE

Postby Big-O » Tue May 31, 2011 5:47 pm

If it's been saved to the apps documents folder you can get to it with relative path names so you just need the file name basically and you can call up the image. See this thread:

viewtopic.php?f=6&t=2837
-- Big-O
-- Nimblekit Guru, Web Developer, Hopeless Geek

I do freelance!
http://realisticweb.com
User avatar
Big-O
NimbleKit Guru
 
Posts: 1231
Joined: Thu Sep 24, 2009 4:02 am

Re: Take a picture and upload to SQLITE

Postby cactuscraig » Tue May 31, 2011 9:30 pm

Big-O wrote:If it's been saved to the apps documents folder you can get to it with relative path names so you just need the file name basically and you can call up the image. See this thread:

http://www.nimblekit.com/forum/viewtopic.php?f=6&t=2837

exactly what in was after with this post... I think.
viewtopic.php?f=6&t=2731
I want to take a pic with camera and save.

Thanks!!
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ

Re: Take a picture and upload to SQLITE

Postby cactuscraig » Wed Jun 01, 2011 12:14 am

Big-O wrote:If it's been saved to the apps documents folder you can get to it with relative path names so you just need the file name basically and you can call up the image. See this thread:

http://www.nimblekit.com/forum/viewtopic.php?f=6&t=2837


So, I see now - imageObj is actually NKImage and I can use
imageObj.savetoDocuments("me.jpg");
User avatar
cactuscraig
 
Posts: 846
Joined: Thu Feb 03, 2011 5:15 pm
Location: Scottsdale, AZ


Return to Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest