From 975fa2638e5631a96b5f50757c5c4b386366d1b2 Mon Sep 17 00:00:00 2001 From: Jisung Ahn Date: Mon, 5 Nov 2012 19:19:28 +0900 Subject: [PATCH] save to jpg Change-Id: I2cd3469f4592d1e66780ffdb426bb855c3d40d6e --- common/include/ivug-util.h | 2 +- common/src/ivug-util.c | 80 +++++++++++++++++++++++----------------- main/src/view/ivug-crop-view.cpp | 2 +- 3 files changed, 49 insertions(+), 35 deletions(-) diff --git a/common/include/ivug-util.h b/common/include/ivug-util.h index fa0f99f..a8deb38 100755 --- a/common/include/ivug-util.h +++ b/common/include/ivug-util.h @@ -69,7 +69,7 @@ int ivug_atoi(const char *number); double ivug_atod(const char *number); -char * ivug_generate_file_name(const char *filepath); +char * ivug_generate_file_name(const char *filepath, const char *extension); /* Removes leading and trailing whitespace from string diff --git a/common/src/ivug-util.c b/common/src/ivug-util.c index abc5702..17a4bd2 100755 --- a/common/src/ivug-util.c +++ b/common/src/ivug-util.c @@ -295,39 +295,53 @@ double ivug_atod(const char *number) return val; } -char * ivug_generate_file_name(const char *filepath) -{ - IV_ASSERT(filepath != NULL); - - MSG_SETAS_HIGH("filepath %s", filepath); - - char tempname[IVUG_MAX_FILE_PATH_LEN+1] = {0,}; - char *ext = ivug_fileinfo_get_file_extension(filepath); - char *filename = ecore_file_strip_ext(ecore_file_file_get(filepath)); - char *dir = ecore_file_dir_get(filepath); - - int i = 0; - - for(i=1; ifile_path); + char* save_file = ivug_generate_file_name(pCropView->file_path, "jpg"); if(save_file == NULL) { MSG_SETAS_ERROR("Cannot generate file name"); -- 2.7.4