Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

int Impala::Application::TagsLife::RemoteRetriever::RemoteImageRetriever::operator() (  )  [inline]

Reimplemented from Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever.

Definition at line 169 of file RemoteRetriever.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::FileExists(), Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::fromCache, ILOG_DEBUG, ILOG_ERROR, ILOG_WARN, oglIm, Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::operator()(), Impala::Core::Array::ReadJpgFromMemory(), Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::target, Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::toCache, and Impala::Application::TagsLife::RemoteRetriever::RemoteFileRetriever::url.

00169                                  {
00170                         ILOG_DEBUG("Getting Image from: " << url << " to store in " << target);
00171 
00172                         if((toCache || fromCache) && !FileExists("Cache")) {
00173                                 ILOG_WARN("Cache folder does not exists, continuing without cache");
00174                                 toCache = fromCache = false;
00175                         }
00176 
00177                         Core::Array::Array2dVec3UInt8* im = 0;
00178 
00179                         RemoteFileRetriever::operator()();
00180 
00181                         Core::Array::ReadJpgFromMemory(im, (char*) target.c_str(), target.size());
00182                         if(im != 0) {
00183                                 oglIm->imageHandle = im;
00184                                 oglIm->h = im->CH();
00185                                 oglIm->w = im->CW();
00186                                 oglIm->changed = 1;
00187                                 ILOG_DEBUG("Loaded an image of " << oglIm->w << "x" << oglIm->h <<" pixels to " << oglIm << " from " << url);
00188                                 return 1;
00189                         }
00190 
00191                         ILOG_ERROR("Failed to load image from " << url << "! (buffer.size = " << target.size() << ")");
00192 
00193                         oglIm->h = -1;
00194                         oglIm->w = -1;
00195                         oglIm->changed = 1;
00196                         return 0;
00197                 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:51:33 2010 for ImpalaSrc by  doxygen 1.5.1