diff options
| author | Comment <tim@gray.(none)> | 2014-03-12 09:16:46 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2014-03-12 09:16:46 +0000 |
| commit | 8f9a8b4c06bb168b91cb0a3971c3dc37fb67220f (patch) | |
| tree | 16062fc67db1680066a47eba05d63e30950cd916 /offsetProject/src/ofApp.cpp | |
| parent | 63a6970325463b3533edbf910f88750cb2d096f1 (diff) | |
image store working
Diffstat (limited to 'offsetProject/src/ofApp.cpp')
| -rw-r--r-- | offsetProject/src/ofApp.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/offsetProject/src/ofApp.cpp b/offsetProject/src/ofApp.cpp index 00c7f57..f65746e 100644 --- a/offsetProject/src/ofApp.cpp +++ b/offsetProject/src/ofApp.cpp @@ -38,9 +38,20 @@ get list of images in defined folder load them and create mip maps store indexed by file stub +start thread when a new image comes in load and create mip maps -save to + +how to store pictures +threaded loader works away in the background +when a new picture comes in + +a data structure which is part of the threaded object +each image contains a mutex to enable the threaded object to be accessed +the instagram id is just used to match against incoming - there needs to be the pattern matching algorithm + +how to draw pictures +need to search the db for pictures of a certain colour */ //-------------------------------------------------------------- @@ -49,19 +60,7 @@ void ofApp::setup() { ofSetFrameRate(60); - ofDirectory image_path(ofToString(IMAGE_STORE_SIZE)+"/"); - cerr<<"image path: "<<image_path.getAbsolutePath()<<endl; - if (image_path.exists()){ - image_path.listDir(); - cerr<<"image path found, "<<image_path.size()<<" images"<<endl; - for (int i=0;i<image_path.size();i++){ - cerr<<image_path.getFiles()[i].getFileName()<<endl; - } - } - else { - cerr<<"creating image path"<<endl; - image_path.create(); - } + store.start(); mode=MODE_COLOURTILES; @@ -85,7 +84,7 @@ void ofApp::draw() { ofSetColor(255, 255, 255); - + store.draw(); } |
