summaryrefslogtreecommitdiff
path: root/src/codec/img-codec-parser.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-09-07 13:10:55 +0900
committerMinje Ahn <minje.ahn@samsung.com>2015-09-07 13:10:55 +0900
commite7bfe2daa994ee3eaacd53673ac5ff078a9399ec (patch)
tree78cc915ee3b71af1e2275406ddda160fb3897a0b /src/codec/img-codec-parser.c
parent861a99ca9cc88fb8d54e70543e227c2c2e803fe7 (diff)
downloadlibmedia-thumbnail-tizen_3.0.m1_mobile.tar.gz
libmedia-thumbnail-tizen_3.0.m1_mobile.tar.bz2
libmedia-thumbnail-tizen_3.0.m1_mobile.zip
Change-Id: I4bab6e37f9d943c719325f971ae9d3499a77f93f Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/codec/img-codec-parser.c')
-rwxr-xr-xsrc/codec/img-codec-parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/codec/img-codec-parser.c b/src/codec/img-codec-parser.c
index 2d8d348..8cc94d5 100755
--- a/src/codec/img-codec-parser.c
+++ b/src/codec/img-codec-parser.c
@@ -275,10 +275,9 @@ static int _ImgGetImageInfo(HFile hFile, unsigned long fileSize, char *fileExt,
(EncodedDataBuffer[21] << 24);
}
if (pHeight) {
- *pHeight =
- EncodedDataBuffer[22] | (EncodedDataBuffer[23] << 8)
- | (EncodedDataBuffer[24] << 16) |
- (EncodedDataBuffer[25] << 24);
+ // add the reference function abs(). may have negative height values in bmp header.
+ *pHeight = abs(EncodedDataBuffer[22] | (EncodedDataBuffer[23] << 8) |
+ (EncodedDataBuffer[24] << 16) | (EncodedDataBuffer[25] << 24));
}
thumb_dbg("IMG_CODEC_BMP");