summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi Yong Min <jiyong.min@samsung.com>2015-05-13 12:40:19 (GMT)
committerJi Yong Min <jiyong.min@samsung.com>2015-05-14 00:23:51 (GMT)
commit6ece5e54778f9a8bea3f23f3a932a884be3c9f87 (patch)
tree31416fd3ece796751014dab252673fc71b278240
parent460b807ff06de0d470973db91c96cb8121e912e6 (diff)
downloadlibmedia-thumbnail-6ece5e54778f9a8bea3f23f3a932a884be3c9f87.zip
libmedia-thumbnail-6ece5e54778f9a8bea3f23f3a932a884be3c9f87.tar.gz
libmedia-thumbnail-6ece5e54778f9a8bea3f23f3a932a884be3c9f87.tar.bz2
The color space that is used by thumbnail server is changed to RGB, because gdk support RGB color space.refs/changes/65/39365/3
(Fix broken thumbnail issue) Change-Id: Id3b5dfa9df57e35a3785eb0b191b020cba995e95 Signed-off-by: jiyong.min <jiyong.min@samsung.com>
-rw-r--r--packaging/libmedia-thumbnail.spec2
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c3
-rwxr-xr-xsrc/media-thumb-internal.c10
-rwxr-xr-xtest/test-thumb.c4
4 files changed, 10 insertions, 9 deletions
diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec
index 285dc92..be63478 100644
--- a/packaging/libmedia-thumbnail.spec
+++ b/packaging/libmedia-thumbnail.spec
@@ -1,5 +1,5 @@
Name: libmedia-thumbnail
-Version: 0.1.79
+Version: 0.1.80
Release: 0
License: Apache-2.0
Summary: Media thumbnail service Library
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index 6968101..e9d7c0c 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -543,7 +543,8 @@ _media_thumb_process(thumbMsg *req_msg, thumbMsg *res_msg, uid_t uid)
media_thumb_type thumb_type = req_msg->thumb_type;
const char *origin_path = req_msg->org_path;
- media_thumb_format thumb_format = MEDIA_THUMB_BGRA;
+ // Currently, The color space that is supported by the gdk-pixbuf is only RGB.
+ media_thumb_format thumb_format = MEDIA_THUMB_RGB888;
thumb_path = res_msg->dst_path;
thumb_path[0] = '\0';
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index b8ddb9c..e6b3f12 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -767,7 +767,7 @@ int _media_thumb_png(const char *origin_path,
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
+ err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
if (err < 0) {
thumb_err("_media_thumb_convert_format falied: %d", err);
SAFE_FREE(thumb_info->data);
@@ -791,7 +791,7 @@ int _media_thumb_bmp(const char *origin_path,
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
+ err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
if (err < 0) {
thumb_err("_media_thumb_convert_format falied: %d", err);
SAFE_FREE(thumb_info->data);
@@ -815,7 +815,7 @@ int _media_thumb_wbmp(const char *origin_path,
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
+ err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
if (err < 0) {
thumb_err("_media_thumb_convert_format falied: %d", err);
SAFE_FREE(thumb_info->data);
@@ -839,7 +839,7 @@ int _media_thumb_gif(const char *origin_path,
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
+ err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
if (err < 0) {
thumb_err("_media_thumb_convert_format falied: %d", err);
SAFE_FREE(thumb_info->data);
@@ -908,7 +908,7 @@ int _media_thumb_jpeg(const char *origin_path,
return err;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_BGRA, format);
+ err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
if (err < 0) {
thumb_err("_media_thumb_convert_format falied: %d", err);
SAFE_FREE(thumb_info->data);
diff --git a/test/test-thumb.c b/test/test-thumb.c
index 2d0c191..5e37255 100755
--- a/test/test-thumb.c
+++ b/test/test-thumb.c
@@ -72,8 +72,8 @@ int main(int argc, char *argv[])
media_thumb_type thumb_type = MEDIA_THUMB_LARGE;
//media_thumb_type thumb_type = MEDIA_THUMB_SMALL;
- media_thumb_format thumb_format = MEDIA_THUMB_BGRA;
- //media_thumb_format thumb_format = MEDIA_THUMB_RGB888;
+ //media_thumb_format thumb_format = MEDIA_THUMB_BGRA;
+ media_thumb_format thumb_format = MEDIA_THUMB_RGB888;
int is_bgra = 1;
//int is_bgra = 0;