}
return false;
}
-#if 0
-static int __media_svc_resize_artwork(const char *path, const char *img_format)
-{
- int ret = MS_MEDIA_ERR_NONE;
- unsigned int width = 0;
- unsigned int height = 0;
- unsigned int resized_width = 0;
- unsigned int resized_height = 0;
- mm_util_img_codec_type img_type = IMG_CODEC_UNKNOWN_TYPE;
-
- if ((strstr(img_format, "jpeg") != NULL) || (strstr(img_format, "jpg") != NULL) || (strstr(img_format, "JPG") != NULL)) {
- media_svc_debug("type [jpeg]");
-
- mm_util_extract_image_info(path, &img_type, &width, &height);
-
- if (width <= MEDIA_SVC_ARTWORK_SIZE || height <= MEDIA_SVC_ARTWORK_SIZE) {
- media_svc_debug("No need resizing");
- return MS_MEDIA_ERR_NONE;
- }
-
- /* resizing */
- if (width > height) {
- resized_height = MEDIA_SVC_ARTWORK_SIZE;
- resized_width = width * MEDIA_SVC_ARTWORK_SIZE / height;
- } else {
- resized_width = MEDIA_SVC_ARTWORK_SIZE;
- resized_height = height * MEDIA_SVC_ARTWORK_SIZE / width;
- }
- ret = mm_util_resize_P_P(path, resized_width, resized_height, path);
-
- } else if ((strstr(img_format, "png") != NULL) || (strstr(img_format, "PNG") != NULL)) {
- media_svc_debug("type [png]");
- } else {
- media_svc_debug("Not proper img format");
- }
-
- return ret;
-}
-#endif
static int __media_svc_safe_atoi(char *buffer, int *si)
{
char *end = NULL;
media_svc_error("Fail to Save Image");
} else {
content_info->thumbnail_path = g_strdup(thumb_path);
- /* NOTICE : Prevent resize for performance (2020.02.07)
- * In most cases, artwork's format is jpeg and size is under MEDIA_SVC_ARTWORK_SIZE * MEDIA_SVC_ARTWORK_SIZE.
- * So, doing mm_util_extract_image_info to check image size is a time-consuming task.
- */
-#if 0
- /* albumart resizing */
- ret = __media_svc_resize_artwork(thumb_path, p);
- if (ret != MS_MEDIA_ERR_NONE) {
- media_svc_error("Fail to Make Thumbnail Image");
- _media_svc_remove_file(thumb_path);
-
- } else {
- content_info->thumbnail_path = g_strdup(thumb_path);
- }
-#endif
}
}
}