Languages

Menu
Sites
Language
How I can add an image info to the system media database ?

I mean that after I save an image to file system,  how to save or insert or add  the image info to system db directly but not to tell system to scan it by using Tizen::Content::ContentManager::ScanDirectory and Tizen::Content::ContentManager::ScanFile. 

Responses

5 Replies
Alex Ashirov

Hi,

If I understand your question correctly then you can use 

ContentId Tizen::Content::ContentManager::CreateContent  ( const ContentInfo &  contentInfo )  

in order to add the image info to system db.

Fei Liang

Yeah, I already known that, but if I use CreateContent() method with an ImageContentInfo, how I add the orientation to it?  I don't find a SetOrientation() member in ImageContentInfo Member List,so, considering such case,  I thank that if I can operate the system media db directly like use sql like "INSERT INTO Table1 (column0, column1, column2) VALUES (?, ?, ?)" or "UPDATE Table1 SET column2 = 'new Data' WHERE column2 = 'Initial Data'".

Is that possible?  Please tell me. If it's not possible, then how I can add or update the image info such as DateTime、Latitude、LongitudeWidth、Height、Orientation to the system media db?   not see ImageContentInfo provider that.

 

Alex Ashirov

Hi,

AFAIK, it’s not possible to update the database directly.

Regarding the image orientation. As far as I understand you should not set this value manually. Instead, it should be read from an image file during construction (Tizen::Content::ImageContentInfo::Construct (const Tizen::Base::String * pContentPath)).

Fei Liang

What if I find the Orientation or Datetime info about the imge is not right in the db and want to fix it? No way to do this?

Alex Ashirov

Hi,

As far as I understand these parameters are read from the image. Thus, they should be correct. But if it would be possible to update these values manually then they may be corrupted.