Added tiff as image type supported, fixed a crash on Mac OS X Maverick when showing the GraphView

This commit is contained in:
matlabbe
2015-01-06 10:53:43 -05:00
parent 4c2dad453d
commit a979216fc1
4 changed files with 16 additions and 6 deletions

View File

@@ -135,11 +135,11 @@ bool CameraImages::init()
UDEBUG("");
if(_dir)
{
_dir->setPath(_path, "jpg ppm png bmp pnm");
_dir->setPath(_path, "jpg ppm png bmp pnm tiff");
}
else
{
_dir = new UDirectory(_path, "jpg ppm png bmp pnm");
_dir = new UDirectory(_path, "jpg ppm png bmp pnm tiff");
}
_count = 0;
if(_path[_path.size()-1] != '\\' && _path[_path.size()-1] != '/')

View File

@@ -1412,6 +1412,10 @@ void DBDriverSqlite3::loadLinksQuery(
{
memcpy(transform.data(), data, dataSize);
}
else if(dataSize)
{
UERROR("Error while loading link transform from %d to %d! Setting to null...", signatureId, toId);
}
if(uStrNumCmp(_version, "0.7.4") >= 0)
{
@@ -1497,8 +1501,14 @@ void DBDriverSqlite3::loadLinksQuery(std::list<Signature *> & signatures) const
data = sqlite3_column_blob(ppStmt, index);
dataSize = sqlite3_column_bytes(ppStmt, index++);
Transform transform;
UASSERT((unsigned int)dataSize == transform.size()*sizeof(float) && data);
memcpy(transform.data(), data, dataSize);
if((unsigned int)dataSize == transform.size()*sizeof(float) && data)
{
memcpy(transform.data(), data, dataSize);
}
else if(dataSize)
{
UERROR("Error while loading link transform from %d to %d! Setting to null...", (*iter)->id(), toId);
}
if(linkType >= 0 && linkType != Link::kUndef)
{