diff options
author | Igor Nazarov <i.nazarov@samsung.com> | 2017-03-30 15:16:21 +0300 |
---|---|---|
committer | Igor Nazarov <i.nazarov@samsung.com> | 2017-03-30 15:16:50 +0300 |
commit | dbede4c1a29c01ad6ebb79ecbffb36ab36c8312e (patch) | |
tree | 6d78b0f5086b4fb31f2d729c8b1bdb08481a9e00 /src/model/helpers.cpp | |
parent | 7dbdc528abe6774e86f643aa14003f68a08c6609 (diff) | |
download | gallery-dbede4c1a29c01ad6ebb79ecbffb36ab36c8312e.tar.gz gallery-dbede4c1a29c01ad6ebb79ecbffb36ab36c8312e.tar.bz2 gallery-dbede4c1a29c01ad6ebb79ecbffb36ab36c8312e.zip |
TizenRefApp-8274 [Gallery] Add resolution information into MediaItem
- Added MediaItem::getResolution() method;
- Added ImageGrid::ItemParams::aspectX/Y members.
Change-Id: I0d9cbc8a6fd36b7858d89adc00c8aee1f69e13c5
Diffstat (limited to 'src/model/helpers.cpp')
-rw-r--r-- | src/model/helpers.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/model/helpers.cpp b/src/model/helpers.cpp index c605e6a..fe340d0 100644 --- a/src/model/helpers.cpp +++ b/src/model/helpers.cpp @@ -40,5 +40,16 @@ namespace gallery { return true; } -} + bool getProperty(image_meta_h imageMeta, + int (*get)(image_meta_h imageMeta, int *value), + int &result, bool mayBeZero) + { + const int ret = get(imageMeta, &result); + if ((ret != 0) || (!mayBeZero && !result)) { + ELOG("get() failed: %d", ret); + return false; + } + return true; + } +} |