[ITC][capi-media-image-util][ACR-1393][Update Image Encoding APIs] 18/207618/4
authormansankar <karanam.s@samsung.com>
Mon, 10 Jun 2019 05:29:09 +0000 (10:59 +0530)
committershobhit verma <shobhit.v@samsung.com>
Tue, 11 Jun 2019 06:33:53 +0000 (06:33 +0000)
Change-Id: I669386f04b824e5611fa49711df0555623b6952b
Signed-off-by: mansankar <karanam.s@samsung.com>
scripts_tpk/spec.sh
src/itc/image-util/CMakeLists.txt
src/itc/image-util/ITs-image-util-agif-encode.c [new file with mode: 0644]
src/itc/image-util/ITs-image-util-common.c
src/itc/image-util/ITs-image-util-common.h
src/itc/image-util/ITs-image-util.c
src/itc/image-util/res/sample.gif [new file with mode: 0755]
src/itc/image-util/sample.gif [new file with mode: 0755]
src/itc/image-util/tct-image-util-native_mobile.h
src/itc/image-util/tct-image-util-native_tizeniot.h
src/itc/image-util/tct-image-util-native_wearable.h

index 1de57b9152e28de5ab3c3de5f7ee821c50ef08d6..1cb52bbba8dbecd285d2914489099d7f134350e5 100755 (executable)
@@ -247,6 +247,7 @@ case "$1" in
                        chsmack -a "User::App::Shared" $APP_DATA_DIR
                        chsmack -e "User::App::Shared" $APP_DATA_DIR
                        cp Image_01.jpg $APP_DATA_DIR/Image_01.jpg
+                       cp sample.gif $APP_DATA_DIR/sample.gif
                        chown -R 5000:5000 $APP_DATA_DIR
                        chmod -R 777 $APP_DATA_DIR
                        chsmack -a "User::App::Shared" $APP_DATA_DIR/*
index bb149b89c89bf5dd5b5cf07a92549a82599759bc..16114f247b9caf87b9a6fc6881ec2ff7b13ac85b 100755 (executable)
@@ -8,6 +8,7 @@ SET(TC_SOURCES
     ITs-image-util-common.c
        ITs-image-util.c
        ITs-image-util-image.c
+       ITs-image-util-agif-encode.c
 )
 
 PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
diff --git a/src/itc/image-util/ITs-image-util-agif-encode.c b/src/itc/image-util/ITs-image-util-agif-encode.c
new file mode 100644 (file)
index 0000000..5359515
--- /dev/null
@@ -0,0 +1,290 @@
+//
+// Copyright (c) 2019 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-image-util-common.h"
+
+#define SAMPLE_GIF_FILE_PATH "sample.gif"
+
+/** @addtogroup itc-image-util
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            ITs_image_util_agif_encode_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_image_util_agif_encode_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Image_Util_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_image_util_agif_encode_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_image_util_agif_encode_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Image_Util_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+//& purpose: Creates and destroys handle of animated GIF encoding.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_agif_encode_create_destroy_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Creates and destroys handle of animated GIF encoding.
+* @scenario                    Creates and destroys handle of animated GIF encoding.
+* @apicovered                  image_util_agif_encode_create, image_util_agif_encode_destroy
+* @passcase                    When image_util_agif_encode_create and image_util_agif_encode_destroy is successful.
+* @failcase                    If target API image_util_agif_encode_create or image_util_agif_encode_destroy fails or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_agif_encode_create_destroy_p(void)
+{
+       START_TEST;
+       image_util_agif_encode_h hImgUtilAgifEncode;
+
+       int nRet = image_util_agif_encode_create(&hImgUtilAgifEncode);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(hImgUtilAgifEncode, "image_util_agif_encode_create");
+
+       nRet = image_util_agif_encode_destroy(hImgUtilAgifEncode);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Encodes an image and adds the encoded image to the frames of the animated GIF.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_agif_encode_add_frame_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Encodes an image and adds the encoded image to the frames of the animated GIF.
+* @scenario                    Encodes an image and adds the encoded image to the frames of the animated GIF.
+* @apicovered                  image_util_agif_encode_add_frame
+* @passcase                    When image_util_agif_encode_add_frame is successful.
+* @failcase                    If target API image_util_agif_encode_add_frame fails or any precondition API fails.
+* @precondition                        image_util_agif_encode_create
+* @postcondition               image_util_agif_encode_destroy
+*/
+int ITc_image_util_agif_encode_add_frame_p(void)
+{
+       START_TEST;
+       image_util_agif_encode_h hImgUtilAgifEncode = NULL;
+       image_util_decode_h dstHandle = NULL;
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       unsigned int nDelayTime = 20;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_GIF_FILE_PATH, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRet = image_util_decode_create(&dstHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(dstHandle,"image_util_decode_create");
+
+       nRet = image_util_decode_set_input_path(dstHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_buffer", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_run2(dstHandle, &stDecodedImage);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_destroy(dstHandle);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_create(&hImgUtilAgifEncode);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_create", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+       CHECK_HANDLE_CLEANUP(hImgUtilAgifEncode,"image_util_agif_encode_create", image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_add_frame(hImgUtilAgifEncode, stDecodedImage, nDelayTime);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_add_frame", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_agif_encode_destroy(hImgUtilAgifEncode);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Saves the animated GIF image to the file.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_agif_encode_save_to_file_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Saves the animated GIF image to the file.
+* @scenario                    Saves the animated GIF image to the file.
+* @apicovered                  image_util_agif_encode_save_to_file
+* @passcase                    When image_util_agif_encode_save_to_file is successful.
+* @failcase                    If target API image_util_agif_encode_save_to_file fails or any precondition API fails.
+* @precondition                        image_util_agif_encode_create
+* @postcondition               image_util_agif_encode_destroy
+*/
+int ITc_image_util_agif_encode_save_to_file_p(void)
+{
+       START_TEST;
+       image_util_agif_encode_h hImgUtilAgifEncode = NULL;
+       image_util_decode_h dstHandle = NULL;
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       unsigned int nDelayTime = 20;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_GIF_FILE_PATH, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRet = image_util_decode_create(&dstHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(dstHandle,"image_util_decode_create");
+
+       nRet = image_util_decode_set_input_path(dstHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_path", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_run2(dstHandle, &stDecodedImage);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_destroy(dstHandle);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_create(&hImgUtilAgifEncode);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_create", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+       CHECK_HANDLE_CLEANUP(hImgUtilAgifEncode,"image_util_agif_encode_create", image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_add_frame(hImgUtilAgifEncode, stDecodedImage, nDelayTime);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_add_frame", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+
+       nRet = image_util_agif_encode_save_to_file(hImgUtilAgifEncode, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_save_to_file", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_agif_encode_destroy(hImgUtilAgifEncode);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Saves the animated GIF image to the buffer.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_agif_encode_save_to_buffer_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Saves the animated GIF image to the buffer.
+* @scenario                    Saves the animated GIF image to the buffer.
+* @apicovered                  image_util_agif_encode_save_to_buffer
+* @passcase                    When image_util_agif_encode_save_to_buffer is successful.
+* @failcase                    If target API image_util_agif_encode_save_to_buffer fails or any precondition API fails.
+* @precondition                        image_util_agif_encode_create
+* @postcondition               image_util_agif_encode_destroy
+*/
+int ITc_image_util_agif_encode_save_to_buffer_p(void)
+{
+       START_TEST;
+       image_util_agif_encode_h hImgUtilAgifEncode = NULL;
+       image_util_decode_h dstHandle = NULL;
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       unsigned int nDelayTime = 20;
+       char *pszBuffer = NULL;
+       size_t tBufferSize;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_GIF_FILE_PATH, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRet = image_util_decode_create(&dstHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(dstHandle,"image_util_decode_create");
+
+       nRet = image_util_decode_set_input_path(dstHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_path", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_run2(dstHandle, &stDecodedImage);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_destroy(dstHandle);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_create(&hImgUtilAgifEncode);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_create", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+       CHECK_HANDLE_CLEANUP(hImgUtilAgifEncode,"image_util_agif_encode_create", image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_agif_encode_add_frame(hImgUtilAgifEncode, stDecodedImage, nDelayTime);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_add_frame", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+
+       nRet = image_util_agif_encode_save_to_buffer(hImgUtilAgifEncode, &pszBuffer, &tBufferSize);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_save_to_buffer", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+       CHECK_HANDLE_CLEANUP(hImgUtilAgifEncode,"image_util_agif_encode_save_to_buffer", image_util_destroy_image(stDecodedImage);image_util_agif_encode_destroy(hImgUtilAgifEncode));
+       if(tBufferSize <= 0)
+       {
+               FPRINTF("image_util_agif_encode_save_to_buffer failed, tBufferSize is %d", tBufferSize);
+               image_util_destroy_image(stDecodedImage);
+               image_util_agif_encode_destroy(hImgUtilAgifEncode);
+               return 1;
+       }
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_agif_encode_destroy(hImgUtilAgifEncode);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_agif_encode_destroy", ImageUtilGetError(nRet));
+}
+/** @} */
+/** @} */
index ff3d3b446979b2d39a74154167f0a99d05ba4aab..73f18959ecb4707be3e9782690f2f64574744345 100755 (executable)
@@ -263,4 +263,43 @@ void wait_for_async()
        g_main_loop_run(g_mainloop);
        g_source_remove(g_timeout_id);
 }
+
+/**
+* @function             ImageUtilEncodeRunSetUp
+* @description          Prerequisite for image_util_encode_run apis
+* @parameter                   image_util_image_h *stDecodedImage, image_util_encode_h *stHandle, char *pPath
+* @return                       0 if all the apis are successful else error is returned.
+*/
+int ImageUtilEncodeRunSetUp(image_util_image_h *stDecodedImage, image_util_encode_h *stHandle, char *pPath)
+{
+
+       image_util_decode_h dstHandle = NULL;
+
+       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRet = image_util_decode_create(&dstHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(dstHandle,"image_util_decode_create");
+
+       nRet = image_util_decode_set_input_path(dstHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_path", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_run2(dstHandle, stDecodedImage);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
+       CHECK_HANDLE_CLEANUP(*stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
+
+       nRet = image_util_decode_destroy(dstHandle);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(*stDecodedImage));
+
+       nRet = image_util_encode_create(IMAGE_UTIL_JPEG, stHandle);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet), image_util_destroy_image(*stDecodedImage));
+       CHECK_HANDLE_CLEANUP(*stHandle,"image_util_encode_create", image_util_destroy_image(*stDecodedImage));
+
+       return 0;
+}
+
 /** @} */
index acde9b0c1cd29a0a3edfdaefb34dbfb221806c3e..0d2407e0f2741faf63c677b70a8edcdf5c23e71c 100755 (executable)
@@ -88,5 +88,6 @@ bool ImageUtilAppendToAppDataPath(char* pInputPath, char* pFinalPath);
 bool ImageUtilGetDataPath(char* pPath);
 char* MediaToolsGetError(int nRet);
 char* MediaFormatGetError(int nRet);
+int ImageUtilEncodeRunSetUp(image_util_image_h *stDecodedImage, image_util_encode_h *stHandle, char *pPath);
 /** @} */
 #endif  //_ITS_IMAGE_UTIL_COMMON_H_
index c7d16624f49aa544ccd3f3b7fbbc00a7461df25b..e577f52a4ba99d563de21fffd166266416933480 100755 (executable)
@@ -25,6 +25,9 @@ bool g_bImageUtilSupportedJpegCallback;
 bool g_bImageUtilEncodeCompletedCallback;
 bool g_bImageUtilDecodeCompletedCallback;
 bool g_bImageUtilForeachSupporedColorspace;
+bool g_bImageUtilEncodeToFileCompletedCallback;
+bool g_bImageUtilEncodeToBufferCompletedCallback;
+static image_util_colorspace_e eSupportedColorspace = 0;
 
 image_util_colorspace_e  eImageUtilColorspace[] = {
        IMAGE_UTIL_COLORSPACE_RGB888,
@@ -37,6 +40,12 @@ image_util_colorspace_e  eImageUtilColorspace[] = {
 int enum_size = sizeof(eImageUtilColorspace) / sizeof(eImageUtilColorspace[0]);
 int enum_counter = 0;
 
+typedef struct {
+       unsigned char *pszBuffer;
+       size_t tBufferSize;
+} g_sBufferEncodedImage;
+
+
 /**
 * @function            ITs_image_util_startup
 * @description         Called before each test
@@ -115,9 +124,66 @@ void Image_util_transform_completed_CallBack(media_packet_h *packet, int error_c
        }
 }
 
+/**
+* @function                    Image_util_supported_colorspace_CallBack
+* @description         Called once for each supported image encode/decode colorspace.
+* @parameter[IN]       colorspace The colorspace
+* @return              NA
+*/
+void Image_util_supported_colorspace_CallBack(image_util_colorspace_e colorspace, void *user_data)
+{
+       g_bImageUtilForeachSupporedColorspace = true;
+       eSupportedColorspace = colorspace;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Image_util_supported_colorspace_CallBack is called\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/**
+* @function                    Image_util_encode_to_buffer_completed_Callback
+* @description         Callback to encode the image to a buffer with the given encode handle asynchronously.
+* @parameter[IN]       image_util_error_e error, unsigned char *buffer, size_t buffer_size, void *user_data
+* @return              NA
+*/
+static void Image_util_encode_to_buffer_completed_Callback(image_util_error_e error, unsigned char *buffer, size_t buffer_size, void *user_data)
+{
+#if DEBUG
+       FPRINTF("Image_util_encode_to_buffer_completed_Callback invoked\\n");
+#endif
+       g_sBufferEncodedImage *buf_enc = (g_sBufferEncodedImage *)user_data;
+
+       if (buffer && buffer_size > 0) {
+               buf_enc->pszBuffer = calloc(1, buffer_size);
+               if (!buf_enc->pszBuffer) {
+                       FPRINTF("[%d:%s] Memory allocation error\\n", __LINE__, __FUNCTION__);
+                       signal_for_async();
+                       return;
+               }
+               memcpy(buf_enc->pszBuffer, buffer, buffer_size);
+               buf_enc->tBufferSize = buffer_size;
+               g_bImageUtilEncodeToBufferCompletedCallback = true;
+       }
+
+       signal_for_async();
+}
+
+/**
+* @function                    Image_util_encode_to_file_completed_Callback
+* @description         Callback to encode the image to a file with the given encode handle asynchronously.
+* @parameter[IN]       image_util_error_e error, void *user_data
+* @return              NA
+*/
+static void Image_util_encode_to_file_completed_Callback(image_util_error_e error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("Image_util_encode_to_file_completed_Callback invoked\\n");
+#endif
+       g_bImageUtilEncodeToFileCompletedCallback = true;
+       signal_for_async();
+}
 
 //& purpose: Creates and destroy a handle to image-util transform. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_transform_create_destroy_p
 * @since_tizen                 2.3
@@ -150,7 +216,7 @@ int ITc_image_util_transform_create_destroy_p(void)
 }
 
 //& purpose: To Set and get the information of the converting
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_transform_set_get_colorspace_p
 * @since_tizen                 2.3
@@ -201,7 +267,7 @@ int ITc_image_util_transform_set_get_colorspace_p(void)
 }
 
 //& purpose: To Set and Get the information of the cropping
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_transform_set_get_crop_area_p
 * @since_tizen                 2.3
@@ -252,7 +318,7 @@ int ITc_image_util_transform_set_get_crop_area_p(void)
 }
 
 //& purpose: To Set and Get the resolution of the image buffer
-//& type: auto 
+//& type: auto
 /**
 * @testcase                            ITc_image_util_transform_set_get_resolution_p
 * @since_tizen                 2.3
@@ -302,7 +368,7 @@ int ITc_image_util_transform_set_get_resolution_p(void)
 }
 
 //& purpose: To set and get the information of the rotating
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_transform_set_get_rotation_p
 * @since_tizen                 2.3
@@ -386,7 +452,7 @@ int ITc_image_util_transform_set_get_rotation_p(void)
 }
 
 //& purpose: To Transform the image for given image-util handle. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_transform_run_p
 * @since_tizen                 2.3
@@ -551,7 +617,7 @@ int ITc_image_util_extract_color_from_memory_p(void)
        return 0;
 }
 //& purpose: To create and destroy a handle to image util decoding. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_decode_create_destroy_p
 * @since_tizen                 3.0
@@ -581,7 +647,7 @@ int ITc_image_util_decode_create_destroy_p(void)
        return 0;
 }
 //& purpose: To set the input file path from which to decode. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_decode_set_input_path_p
 * @since_tizen                 3.0
@@ -645,14 +711,22 @@ int ITc_image_util_decode_set_input_buffer_p(void)
        image_util_decode_h stDecHandle = NULL;
        image_util_decode_h stDecodedHandle = NULL;
        image_util_image_h stDecodedImage = NULL;
-       unsigned char *puszImageInputBuffer = NULL;
        unsigned char *puszImageOutputbuffer = NULL;
        unsigned long long nDecsize;
        unsigned long nDecWidth;
        unsigned long nDecHeight;
-       unsigned long long nEncsize;
+       unsigned char *pszBuffer = NULL;
+       size_t tBufferSize;
+
+       int nRet = image_util_foreach_supported_colorspace(IMAGE_UTIL_JPEG,(image_util_supported_colorspace_cb)Image_util_supported_colorspace_CallBack , NULL);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_foreach_supported_colorspace", ImageUtilGetError(nRet));
+       if ( !g_bImageUtilForeachSupporedColorspace )
+       {
+               FPRINTF("[Line : %d][%s] image_util_foreach_supported_colorspace failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
 
-       int nRet = image_util_decode_create(&stDecHandle);
+       nRet = image_util_decode_create(&stDecHandle);
        PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
        CHECK_HANDLE(stDecHandle,"image_util_decode_create");
 
@@ -666,6 +740,9 @@ int ITc_image_util_decode_set_input_buffer_p(void)
        nRet = image_util_decode_set_input_path(stDecHandle, pPath);
        PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_path", ImageUtilGetError(nRet), image_util_decode_destroy(stDecHandle));
 
+       nRet = image_util_decode_set_colorspace(stDecHandle, eSupportedColorspace);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_colorspace", ImageUtilGetError(nRet), image_util_decode_destroy(stDecHandle));
+
        nRet = image_util_decode_run2(stDecHandle, &stDecodedImage);
        PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(stDecHandle));
        CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(stDecHandle));
@@ -680,32 +757,31 @@ int ITc_image_util_decode_set_input_buffer_p(void)
        nRet = image_util_destroy_image(stDecodedImage);
        PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
 
-       nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stEncHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stEncHandle,"image_util_encode_create");
-
-       nRet = image_util_encode_set_resolution(stEncHandle, nDecWidth, nDecHeight);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_resolution", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
-
-       nRet = image_util_encode_set_input_buffer(stEncHandle, puszImageOutputbuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_input_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
+       nRet = image_util_create_image(nDecWidth, nDecHeight, eSupportedColorspace, puszImageOutputbuffer, nDecsize, &stDecodedImage);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_create_image", ImageUtilGetError(nRet));
+       CHECK_HANDLE(stDecodedImage,"image_util_create_image");
 
-       nRet = image_util_encode_set_output_buffer(stEncHandle, &puszImageInputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
+       nRet = image_util_encode_create(IMAGE_UTIL_JPEG, &stEncHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE_CLEANUP(stEncHandle,"image_util_encode_create", image_util_destroy_image(stDecodedImage));
 
-       nRet = image_util_encode_run(stEncHandle, &nEncsize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
+       nRet = image_util_encode_run_to_buffer(stEncHandle, stDecodedImage, &pszBuffer, &tBufferSize);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_to_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle);image_util_destroy_image(stDecodedImage));
+       CHECK_HANDLE_CLEANUP(pszBuffer,"image_util_encode_run_to_buffer", image_util_encode_destroy(stEncHandle);image_util_destroy_image(stDecodedImage));
 
        nRet = image_util_encode_destroy(stEncHandle);
        PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
 
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
        nRet = image_util_decode_create(&stDecodedHandle);
         PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
         CHECK_HANDLE(stDecodedHandle,"image_util_decode_create");
 
        //Target API
-       nRet = image_util_decode_set_input_buffer(stDecodedHandle, puszImageInputBuffer, nEncsize);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_buffer", ImageUtilGetError(nRet));
+       nRet = image_util_decode_set_input_buffer(stDecodedHandle, pszBuffer, tBufferSize);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_buffer", ImageUtilGetError(nRet), image_util_decode_destroy(stDecodedHandle));
 
        nRet = image_util_decode_destroy(stDecodedHandle);
         PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet));
@@ -757,42 +833,9 @@ int ITc_image_util_encode_create_destroy_p(void)
 
        return 0;
 }
-//& purpose: To create a handle to image util decoding. 
-//& type: auto 
-/**
-* @testcase                    ITc_image_util_encode_set_resolution_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To set the resolution to image util decoding. 
-* @scenario                            To set the resolution to image util decoding.
-* @apicovered                  image_util_encode_set_resolution
-* @passcase                            When image_util_encode_set_resolution is successful.
-* @failcase                            If target API image_util_encode_set_resolution fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_set_resolution_p(void)
-{
-       START_TEST;
-       unsigned long unHeight = 16,unWidth = 9;
-       image_util_encode_h stHandle = NULL;
-
-       int nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-       //Target API
-       nRet = image_util_encode_set_resolution(stHandle, unWidth, unHeight );
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_resolution", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
 
-       return 0;
-}
 //& purpose: To create a handle to image util decoding. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_encode_set_png_compression_p
 * @since_tizen                 3.0
@@ -824,248 +867,11 @@ int ITc_image_util_encode_set_png_compression_p(void)
 
        return 0;
 }
-//& purpose: To create a handle to image util decoding.
-//& type: auto
-/**
-* @testcase                    ITc_image_util_encode_set_input_buffer_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To set the input buffer to image util encoding.
-* @scenario                            To set the input buffer to image util encoding.
-* @apicovered                  image_util_encode_set_input_buffer
-* @passcase                            When image_util_encode_set_input_buffer is successful.
-* @failcase                            If target API image_util_encode_set_input_buffer fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_set_input_buffer_p(void)
-{
-       START_TEST;
-
-       image_util_encode_h stEncHandle = NULL;
-       image_util_decode_h stDecHandle = NULL;
-       image_util_image_h stDecodedImage = NULL;
-       unsigned char *puszImageInputBuffer = NULL;
-       unsigned char *puszImageOutputbuffer = NULL;
-       unsigned long long nDecsize;
-       unsigned long nDecWidth;
-       unsigned long nDecHeight;
-       unsigned long long nEncsize;
-
-       int nRet = image_util_decode_create(&stDecHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stDecHandle,"image_util_decode_create");
-
-       char pPath[PATH_LEN] = {0,};
-       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath) )
-       {
-               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
-               return 1;
-       }
-
-       nRet = image_util_decode_set_input_path(stDecHandle, pPath);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_path", ImageUtilGetError(nRet), image_util_decode_destroy(stDecHandle));
-
-       nRet = image_util_decode_run2(stDecHandle, &stDecodedImage);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(stDecHandle));
-       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(stDecHandle));
-
-       nRet = image_util_decode_destroy(stDecHandle);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_get_image(stDecodedImage, &nDecWidth, &nDecHeight, NULL, &puszImageOutputbuffer, &nDecsize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_get_image", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-       CHECK_HANDLE_CLEANUP(puszImageOutputbuffer, "image_util_get_image", image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_destroy_image(stDecodedImage);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
-
-       nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stEncHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stEncHandle,"image_util_encode_create");
-
-       nRet = image_util_encode_set_resolution(stEncHandle, nDecWidth, nDecHeight);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_resolution", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
-
-       //Target API
-       nRet = image_util_encode_set_input_buffer(stEncHandle, puszImageOutputbuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_input_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
-
-       nRet = image_util_encode_set_output_buffer(stEncHandle, &puszImageInputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
-
-       nRet = image_util_encode_run(stEncHandle, &nEncsize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run", ImageUtilGetError(nRet), image_util_encode_destroy(stEncHandle));
-
-       nRet = image_util_encode_destroy(stEncHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-       return 0;
-}
-//& purpose: To set the input file path from which to decode. 
-//& type: auto 
-/**
-* @testcase                    ITc_image_util_encode_set_output_path_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To set the output file path from which to encode. 
-* @scenario                            To set the output file path from which to encode. 
-* @apicovered                  image_util_encode_set_output_path
-* @passcase                            When image_util_encode_set_output_path is successful.
-* @failcase                            If target API image_util_encode_set_output_path fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_set_output_path_p(void)
-{
-       START_TEST;
-
-       image_util_encode_h stHandle = NULL;
-       int nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-       
-       char pPathOutput[PATH_LEN] = {0,};
-       if ( false == ImageUtilAppendToAppDataPath(OUTPUT_FILE_PATH, pPathOutput) )
-       {
-               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
-               return 1;
-       }
-       //target api
-       nRet = image_util_encode_set_output_path(stHandle, pPathOutput);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_path", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-       return 0;
-}
-//& purpose: To create a handle to image util decoding. 
-//& type: auto 
-/**
-* @testcase                    ITc_image_util_encode_set_output_buffer_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To set output buffer to image util encoding.
-* @scenario                            To set output buffer to image util encoding.
-* @apicovered                  image_util_encode_set_output_buffer
-* @passcase                            When image_util_encode_set_output_buffer is successful.
-* @failcase                            If target API image_util_encode_set_output_buffer fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_set_output_buffer_p(void)
-{
-       START_TEST;
-       image_util_encode_h stHandle = NULL;
-       unsigned char *puszImageOutputBuffer = NULL;
-
-       int nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-       //target api
-       nRet = image_util_encode_set_output_buffer(stHandle, &puszImageOutputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-
-       return 0;
-}
-//& purpose: To create a handle to image util encoding.
-//& type: auto
-/**
-* @testcase                    ITc_image_util_encode_run_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To run image util encoding.
-* @scenario                            To run image util encoding.
-* @apicovered                  image_util_encode_run
-* @passcase                            When  image_util_encode_run is successful.
-* @failcase                            If target API  image_util_encode_run fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_run_p(void)
-{
-       START_TEST;
-       image_util_encode_h stHandle = NULL;
-       unsigned char *puszImageOutputBuffer = NULL;
-       unsigned long long unSize = 0;
-       unsigned long unHeight = 16,unWidth = 9;
-       image_util_decode_h dstHandle = NULL;
-       image_util_image_h stDecodedImage = NULL;
-       unsigned long nWidth = 0, nHeight = 0;
-
-       int nRet = image_util_decode_create(&dstHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(dstHandle,"image_util_decode_create");
-
-       char pPath[PATH_LEN] = {0,};
-       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath) )
-       {
-               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
-               return 1;
-       }
-
-       nRet = image_util_decode_set_input_path(dstHandle, pPath);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_buffer", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
-
-       nRet = image_util_decode_run2(dstHandle, &stDecodedImage);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
-       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
-
-       nRet = image_util_decode_destroy(dstHandle);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_get_image(stDecodedImage, &nWidth, &nHeight, NULL, &puszImageOutputBuffer, &unSize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_get_image", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-       CHECK_HANDLE_CLEANUP(puszImageOutputBuffer, "image_util_get_image", image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_destroy_image(stDecodedImage);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
-
-       nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-
-       nRet = image_util_encode_set_resolution(stHandle, unWidth, unHeight );
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_resolution", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_set_input_buffer(stHandle, puszImageOutputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_input_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       char pPathOutput[PATH_LEN] = {0,};
-       if ( false == ImageUtilAppendToAppDataPath(OUTPUT_FILE_PATH, pPathOutput) )
-       {
-               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
-               return 1;
-       }
-       nRet = image_util_encode_set_output_path(stHandle, pPathOutput);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_path", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       //target api
-       nRet = image_util_encode_run(stHandle, &unSize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-       CHECK_RETURN_CLEANUP(unSize, "image_util_encode_run", image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-
-       free(puszImageOutputBuffer);
-       return 0;
-}
 
 //& purpose: To decode the image with the given decode handle.
 //& type: auto
 /**
-* @testcase                    ITc_image_util_encode_run_p
+* @testcase                    ITc_image_util_decode_run2_p
 * @since_tizen                 5.5
 * @author                              SRID(karanam.s)
 * @reviewer                    SRID(manoj.g2)
@@ -1127,136 +933,6 @@ void Image_util_decode_completed2_CallBack(int error_code, image_util_image_h im
 #endif 
 }
 
-/**
-* @function                    Image_util_encode_completed_CallBack
-* @description         Called when transform is finished just before returning the output.
-* @parameter[IN]       The error code of image-util transfrom
-* @parameter[IN]       Media packet handle
-* @parameter[IN]       The user data passed from the for each function
-* @return                      NA
-*/
-void Image_util_encode_completed_CallBack(int error_code, void *user_data, unsigned long long size)
-{
-       g_bImageUtilEncodeCompletedCallback = true;
-#if DEBUG
-       FPRINTF("[Line : %d][%s] Image_util_encode_completed_CallBack is called\\n", __LINE__, API_NAMESPACE);
-#endif
-}
-
-//& purpose: To start encoding of the image and fill the output buffer.
-//& type: auto 
-/**
-* @testcase                            ITc_image_util_encode_run_async_p
-* @since_tizen                 3.0
-* @author                              SRID(manu.tiwari)
-* @reviewer                    SRID(parshant.v)
-* @type                                auto
-* @description                 To create a handle to image util encoding.
-* @scenario                            To create a handle to image util encoding.
-* @apicovered                  image_util_encode_run_async
-* @passcase                            When image_util_encode_run_async is successful.
-* @failcase                            If target API image_util_encode_run_async fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_run_async_p(void)
-{
-       START_TEST;
-       image_util_encode_h stHandle = NULL;
-       unsigned char *puszImageOutputBuffer = NULL;
-       unsigned char *puszImageInputBuffer = NULL;
-       unsigned long unHeight = 16,unWidth = 9;
-       image_util_decode_h dstHandle = NULL;
-       image_util_image_h stDecodedImage = NULL;
-       unsigned long nDecWidth = 0, nDecHeight = 0, nDecsize = 0;
-
-       int nRet = image_util_decode_create(&dstHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(dstHandle,"image_util_decode_create");
-
-       char pPath[PATH_LEN] = {0,};
-       if ( false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath) )
-       {
-               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
-               return 1;
-       }
-       nRet = image_util_decode_set_input_path(dstHandle, pPath);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_set_input_buffer", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
-
-       nRet = image_util_decode_run2(dstHandle, &stDecodedImage);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
-       CHECK_HANDLE_CLEANUP(stDecodedImage,"image_util_decode_run2", image_util_decode_destroy(dstHandle));
-
-       g_bImageUtilDecodeCompletedCallback = false;
-       //target api
-       nRet = image_util_decode_run_async2(dstHandle, (image_util_decode_completed2_cb) Image_util_decode_completed2_CallBack, NULL);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_run_async2", ImageUtilGetError(nRet), image_util_decode_destroy(dstHandle));
-       wait_for_async();
-
-       if ( !g_bImageUtilDecodeCompletedCallback )
-       {
-               FPRINTF("[Line : %d][%s] Image_util_decode_completed2_CallBack failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-               nRet = image_util_decode_destroy(dstHandle);
-               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet));
-               nRet = image_util_destroy_image(stDecodedImage);
-               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
-               return 1;
-       }
-       else
-       {
-               #if DEBUG
-               FPRINTF("[Line : %d][%s] image_util_decode_run_async2 is successful\\n", __LINE__, API_NAMESPACE);
-               #endif
-       }
-
-       nRet = image_util_decode_destroy(dstHandle);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_get_image(stDecodedImage, &nDecWidth, &nDecHeight, NULL, &puszImageOutputBuffer, &nDecsize);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_get_image", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
-       CHECK_HANDLE_CLEANUP(puszImageOutputBuffer, "image_util_get_image", image_util_destroy_image(stDecodedImage));
-
-       nRet = image_util_destroy_image(stDecodedImage);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
-
-       nRet = image_util_encode_create(IMAGE_UTIL_PNG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-
-       nRet = image_util_encode_set_resolution(stHandle, unWidth, unHeight );
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_resolution", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_set_input_buffer(stHandle, puszImageOutputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_input_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_set_output_buffer(stHandle, &puszImageInputBuffer);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_output_buffer", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-       g_bImageUtilEncodeCompletedCallback = false;
-       //target api
-       nRet = image_util_encode_run_async(stHandle, (image_util_encode_completed_cb) Image_util_encode_completed_CallBack, NULL);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_async", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-       wait_for_async();
-       if ( !g_bImageUtilEncodeCompletedCallback )
-       {
-               FPRINTF("[Line : %d][%s] Image_util_encode_completed_CallBack failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
-               free(puszImageInputBuffer);
-               nRet = image_util_encode_destroy(stHandle);
-               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-               return 1;
-       }
-       else
-       {
-               #if DEBUG
-               FPRINTF("[Line : %d][%s] image_util_encode_run_async is successful\\n", __LINE__, API_NAMESPACE);
-               #endif
-       }
-       free(puszImageInputBuffer);
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-       free(puszImageOutputBuffer);
-       return 0;
-}
-
 //& purpose: To start decoding of the image with the given decode handle.
 //& type: auto
 /**
@@ -1328,23 +1004,9 @@ int ITc_image_util_decode_run_async2_p(void)
        return 0;
 }
 
-/**
-* @function                    Image_util_supported_colorspace_CallBack
-* @description         Called once for each supported image encode/decode colorspace.
-* @parameter[IN]       colorspace The colorspace               
-* @return                      true to continue with the next iteration of the loop, \n
-*                   otherwise @c false to break out of the loop
-*/
-void Image_util_supported_colorspace_CallBack(image_util_colorspace_e colorspace, void *user_data)
-{
-       g_bImageUtilForeachSupporedColorspace = true;
-#if DEBUG
-       FPRINTF("[Line : %d][%s] Image_util_supported_colorspace_CallBack is called\\n", __LINE__, API_NAMESPACE);
-#endif 
-}
 //& purpose: Retrieves all supported image encoding/decoding colorspace by invoking a
 // callback function once for each one. 
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_foreach_supported_colorspace_p
 * @since_tizen                 3.0
@@ -1381,7 +1043,7 @@ int ITc_image_util_foreach_supported_colorspace_p(void)
        return 0;
 }
 //& purpose: Sets the decoded image colorspace format
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_decode_set_colorspace_p
 * @since_tizen                 3.0
@@ -1437,40 +1099,9 @@ int ITc_image_util_decode_set_colorspace_p(void)
 
        return 0;
 }
-//& purpose: Sets the colorspace format for image encoding
-//& type: auto 
-/**
-* @testcase                    ITc_image_util_encode_set_colorspace_p
-* @since_tizen                 3.0
-* @author              SRID(manu.tiwari)
-* @reviewer            SRID(parshant.v)
-* @type                                auto
-* @description                 Sets the colorspace format for image encoding
-* @scenario
-* @apicovered                  image_util_encode_set_colorspace
-* @passcase                            When image_util_encode_set_colorspace is successful.
-* @failcase                            If target API image_util_encode_set_colorspace fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
-*/
-int ITc_image_util_encode_set_colorspace_p(void)
-{
-       START_TEST;
-       image_util_encode_h stHandle = NULL;
 
-       int nRet = image_util_encode_create(IMAGE_UTIL_JPEG, &stHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(stHandle,"image_util_encode_create");
-       //Target API
-       nRet = image_util_encode_set_colorspace(stHandle, IMAGE_UTIL_COLORSPACE_RGBA8888);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_colorspace", ImageUtilGetError(nRet), image_util_encode_destroy(stHandle));
-
-       nRet = image_util_encode_destroy(stHandle);
-       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
-       return 0;
-}
 //& purpose: Sets the downscale value at which JPEG image should be decoded.
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_decode_set_jpeg_downscale_p
 * @since_tizen                 3.0
@@ -1500,8 +1131,9 @@ int ITc_image_util_decode_set_jpeg_downscale_p(void)
        PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_decode_destroy", ImageUtilGetError(nRet));
        return 0;
 }
+
 //& purpose: Sets the quality for JPEG image encoding.
-//& type: auto 
+//& type: auto
 /**
 * @testcase                    ITc_image_util_encode_set_quality_p
 * @since_tizen                 3.0
@@ -1532,46 +1164,193 @@ int ITc_image_util_encode_set_quality_p(void)
        return 0;
 }
 
-#if (defined(MOBILE) || defined(TIZENIOT)) //Starts MOBILE or TIZENIOT
+//& purpose: Encodes the image to a file with the given encode handle.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_encode_run_to_file_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Encodes the image to a file with the given encode handle.
+* @scenario                    The function executes synchronously.
+* @apicovered                  image_util_encode_run_to_file
+* @passcase                            When image_util_encode_run_to_file is successful.
+* @failcase                            If target API image_util_encode_run_to_file fails or any precondition API fails.
+* @precondition                        image_util_encode_create
+* @postcondition               image_util_encode_destroy
+*/
+int ITc_image_util_encode_run_to_file_p(void)
+{
+       START_TEST;
 
-//& purpose: To set the time delay between each frame in the encoded animated gif image
-//& type: auto 
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+
+       char pPath[PATH_LEN] = {0,};
+
+       int nRet = ImageUtilEncodeRunSetUp(&stDecodedImage, &stHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "ImageUtilEncodeRunSetUp", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_encode_run_to_file(stHandle, stDecodedImage, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_to_file", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_encode_destroy(stHandle));
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_encode_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+
+}
+
+//& purpose: Encodes the image to a buffer with the given encode handle.
+//& type: auto
 /**
-* @testcase                    ITc_image_util_encode_set_gif_frame_delay_time_p
-* @since_tizen                 3.0
-* @author                                      SRID(nibha.sharma)
-* @reviewer            SRID(parshant.v)
+* @testcase                    ITc_image_util_encode_run_to_buffer_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
 * @type                                auto
-* @description                 Sets the time delay between each frame in the encoded animated gif image
-* @scenario                            Sets the time delay between each frame in the encoded animated gif image
-* @apicovered                  image_util_encode_set_gif_frame_delay_time
-* @passcase                            When image_util_encode_set_gif_frame_delay_time is successful.
-* @failcase                            If target API image_util_encode_set_gif_frame_delay_time fails or any precondition API fails.
-* @precondition                        NA
-* @postcondition               NA
+* @description                 Encodes the image to a buffer with the given encode handle.
+* @scenario                    The function executes synchronously.
+* @apicovered                  image_util_encode_run_to_buffer
+* @passcase                    When image_util_encode_run_to_buffer is successful.
+* @failcase                    If target API image_util_encode_run_to_buffer fails or any precondition API fails.
+* @precondition                        image_util_encode_create
+* @postcondition               image_util_encode_destroy
 */
-int ITc_image_util_encode_set_gif_frame_delay_time_p(void)
+int ITc_image_util_encode_run_to_buffer_p(void)
 {
        START_TEST;
-       
-       image_util_encode_h hImageHandle = NULL;
-       unsigned long long nDelayTime = 0.01;
 
-    int nRet = image_util_encode_create(IMAGE_UTIL_GIF, &hImageHandle);
-       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_create", ImageUtilGetError(nRet));
-       CHECK_HANDLE(hImageHandle,"image_util_encode_create");
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       unsigned char *pszBuffer = NULL;
+       size_t tBufferSize;
+       char pPath[PATH_LEN] = {0,};
 
+       int nRet = ImageUtilEncodeRunSetUp(&stDecodedImage, &stHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "ImageUtilEncodeRunSetUp", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
 
-       //Target API
-       nRet = image_util_encode_set_gif_frame_delay_time(hImageHandle, nDelayTime);
-       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_set_gif_frame_delay_time", ImageUtilGetError(nRet), image_util_encode_destroy(hImageHandle));
+       nRet = image_util_encode_run_to_buffer(stHandle, stDecodedImage, &pszBuffer, &tBufferSize);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_to_buffer", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_encode_destroy(stHandle));
+       CHECK_HANDLE_CLEANUP(pszBuffer,"image_util_encode_run_to_buffer", image_util_destroy_image(stDecodedImage);image_util_encode_destroy(stHandle));
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_encode_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Encodes the image to a file with the given encode handle asynchronously.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_encode_run_async_to_file_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Encodes the image to a file with the given encode handle asynchronously.
+* @scenario                    The function executes asynchronously.
+* @apicovered                  image_util_encode_run_async_to_file
+* @passcase                    When image_util_encode_run_async_to_file is successful.
+* @failcase                    If target API image_util_encode_run_async_to_file fails or any precondition API fails.
+* @precondition                        image_util_encode_create
+* @postcondition               image_util_encode_destroy
+*/
+int ITc_image_util_encode_run_async_to_file_p(void)
+{
+       START_TEST;
+
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       g_bImageUtilEncodeToFileCompletedCallback = false;
+       char pPath[PATH_LEN] = {0,};
+
+       int nRet = ImageUtilEncodeRunSetUp(&stDecodedImage, &stHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "ImageUtilEncodeRunSetUp", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
 
-       nRet = image_util_encode_destroy(hImageHandle);
+       nRet = image_util_encode_run_async_to_file(stHandle, stDecodedImage, pPath, Image_util_encode_to_file_completed_Callback, NULL);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_async_to_file", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_encode_destroy(stHandle));
+
+       wait_for_async();
+
+       if ( !g_bImageUtilEncodeToFileCompletedCallback )
+       {
+               FPRINTF("[Line : %d][%s] Image_util_encode_to_file_completed_Callback failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               nRet = image_util_encode_destroy(stHandle);
+               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
+               nRet = image_util_destroy_image(stDecodedImage);
+               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+               return 1;
+       }
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_encode_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
+}
+
+//& purpose: Encodes the image to a buffer with the given encode handle asynchronously.
+//& type: auto
+/**
+* @testcase                    ITc_image_util_encode_run_async_to_buffer_p
+* @since_tizen                 5.5
+* @author              SRID(karanam.s)
+* @reviewer            SRID(shobhit.v)
+* @type                                auto
+* @description                 Encodes the image to a buffer with the given encode handle asynchronously.
+* @scenario                    The function executes asynchronously.
+* @apicovered                  image_util_encode_run_async_to_buffer
+* @passcase                    When image_util_encode_run_async_to_buffer is successful.
+* @failcase                    If target API image_util_encode_run_async_to_buffer fails or any precondition API fails.
+* @precondition                        image_util_encode_create
+* @postcondition               image_util_encode_destroy
+*/
+int ITc_image_util_encode_run_async_to_buffer_p(void)
+{
+       START_TEST;
+       image_util_decode_h dstHandle = NULL;
+       image_util_image_h stDecodedImage = NULL;
+       image_util_encode_h stHandle = NULL;
+       g_bImageUtilEncodeToBufferCompletedCallback = false;
+       g_sBufferEncodedImage sBufencImg = { NULL, 0 };
+       char pPath[PATH_LEN] = {0,};
+
+
+       int nRet = ImageUtilEncodeRunSetUp(&stDecodedImage, &stHandle, pPath);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "ImageUtilEncodeRunSetUp", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage));
+
+       nRet = image_util_encode_run_async_to_buffer(stHandle, stDecodedImage, Image_util_encode_to_buffer_completed_Callback, &sBufencImg);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_run_async_to_buffer", ImageUtilGetError(nRet), image_util_destroy_image(stDecodedImage);image_util_encode_destroy(stHandle));
+
+       wait_for_async();
+
+       if ( !g_bImageUtilEncodeToBufferCompletedCallback )
+       {
+               FPRINTF("[Line : %d][%s] Image_util_encode_to_buffer_completed_Callback failed, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               nRet = image_util_encode_destroy(stHandle);
+               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
+               nRet = image_util_destroy_image(stDecodedImage);
+               PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+               return 1;
+       }
+
+       nRet = image_util_destroy_image(stDecodedImage);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_destroy_image", ImageUtilGetError(nRet));
+
+       nRet = image_util_encode_destroy(stHandle);
        PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_encode_destroy", ImageUtilGetError(nRet));
 
        return 0;
 }
-#endif  // End MOBILE or TIZENIOT
+
 
 /** @} */
 /** @} */
diff --git a/src/itc/image-util/res/sample.gif b/src/itc/image-util/res/sample.gif
new file mode 100755 (executable)
index 0000000..8626503
Binary files /dev/null and b/src/itc/image-util/res/sample.gif differ
diff --git a/src/itc/image-util/sample.gif b/src/itc/image-util/sample.gif
new file mode 100755 (executable)
index 0000000..8626503
Binary files /dev/null and b/src/itc/image-util/sample.gif differ
index 1f6556b0062b0c19f0a484f29c816b50814cc880..921d270bf23643507278b82f0ac1b64740dad3b0 100755 (executable)
@@ -23,6 +23,8 @@ extern void ITs_image_util_startup(void);
 extern void ITs_image_util_cleanup(void);
 extern void ITs_image_util_image_startup(void);
 extern void ITs_image_util_image_cleanup(void);
+extern void ITs_image_util_agif_encode_startup(void);
+extern void ITs_image_util_agif_encode_cleanup(void);
 
 extern int ITc_image_util_transform_create_destroy_p(void);
 extern int ITc_image_util_transform_set_get_colorspace_p(void);
@@ -35,26 +37,26 @@ extern int ITc_image_util_decode_create_destroy_p(void);
 extern int ITc_image_util_decode_set_input_path_p(void);
 extern int ITc_image_util_decode_set_input_buffer_p(void);
 extern int ITc_image_util_encode_create_destroy_p(void);
-extern int ITc_image_util_encode_set_resolution_p(void);
 extern int ITc_image_util_encode_set_png_compression_p(void);
-extern int ITc_image_util_encode_set_input_buffer_p(void);
-extern int ITc_image_util_encode_set_output_path_p(void);
-extern int ITc_image_util_encode_set_output_buffer_p(void);
-extern int ITc_image_util_encode_run_p(void);
 extern int ITc_image_util_decode_run2_p(void);
-extern int ITc_image_util_encode_run_async_p(void);
 extern int ITc_image_util_decode_run_async2_p(void);
 extern int ITc_image_util_foreach_supported_colorspace_p(void);
 extern int ITc_image_util_decode_set_colorspace_p(void);
-extern int ITc_image_util_encode_set_colorspace_p(void);
 extern int ITc_image_util_decode_set_jpeg_downscale_p(void);
 extern int ITc_image_util_encode_set_quality_p(void);
-extern int ITc_image_util_encode_set_gif_frame_delay_time_p(void);
 extern int ITc_image_util_create_destroy_image_p(void);
 extern int ITc_image_util_clone_image_p(void);
 extern int ITc_image_util_get_image_p(void);
 extern int ITc_image_util_transform_run2_p(void);
 extern int ITc_image_util_transform_run2_async_p(void);
+extern int ITc_image_util_encode_run_to_file_p(void);
+extern int ITc_image_util_encode_run_to_buffer_p(void);
+extern int ITc_image_util_encode_run_async_to_file_p(void);
+extern int ITc_image_util_encode_run_async_to_buffer_p(void);
+extern int ITc_image_util_agif_encode_create_destroy_p(void);
+extern int ITc_image_util_agif_encode_add_frame_p(void);
+extern int ITc_image_util_agif_encode_save_to_file_p(void);
+extern int ITc_image_util_agif_encode_save_to_buffer_p(void);
 
 testcase tc_array[] = {
        {"ITc_image_util_transform_create_destroy_p",ITc_image_util_transform_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
@@ -68,26 +70,26 @@ testcase tc_array[] = {
        {"ITc_image_util_decode_set_input_path_p",ITc_image_util_decode_set_input_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_input_buffer_p",ITc_image_util_decode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_create_destroy_p",ITc_image_util_encode_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_resolution_p",ITc_image_util_encode_set_resolution_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_png_compression_p",ITc_image_util_encode_set_png_compression_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_input_buffer_p",ITc_image_util_encode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_path_p",ITc_image_util_encode_set_output_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_buffer_p",ITc_image_util_encode_set_output_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_run_p",ITc_image_util_encode_run_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run2_p",ITc_image_util_decode_run2_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_run_async_p",ITc_image_util_encode_run_async_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run_async2_p",ITc_image_util_decode_run_async2_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_foreach_supported_colorspace_p",ITc_image_util_foreach_supported_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_colorspace_p",ITc_image_util_decode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_colorspace_p",ITc_image_util_encode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_jpeg_downscale_p",ITc_image_util_decode_set_jpeg_downscale_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_quality_p",ITc_image_util_encode_set_quality_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_gif_frame_delay_time_p",ITc_image_util_encode_set_gif_frame_delay_time_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_create_destroy_image_p",ITc_image_util_create_destroy_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_clone_image_p",ITc_image_util_clone_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_get_image_p",ITc_image_util_get_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_p",ITc_image_util_transform_run2_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_async_p",ITc_image_util_transform_run2_async_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
+       {"ITc_image_util_encode_run_to_file_p", ITc_image_util_encode_run_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_to_buffer_p", ITc_image_util_encode_run_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_file_p", ITc_image_util_encode_run_async_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_buffer_p", ITc_image_util_encode_run_async_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_agif_encode_create_destroy_p", ITc_image_util_agif_encode_create_destroy_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_add_frame_p", ITc_image_util_agif_encode_add_frame_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_file_p", ITc_image_util_agif_encode_save_to_file_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_buffer_p", ITc_image_util_agif_encode_save_to_buffer_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
        {NULL, NULL}
 };
 #endif // __TCT_IMAGE-UTIL-NATIVE_H__
index 3cb1374b7c3b8636ee8b4f6e4ed69073548e7940..78620b93ebfbb45f28bccd9a3f575bd1baf4a4cf 100755 (executable)
@@ -35,26 +35,27 @@ extern int ITc_image_util_decode_create_destroy_p(void);
 extern int ITc_image_util_decode_set_input_path_p(void);
 extern int ITc_image_util_decode_set_input_buffer_p(void);
 extern int ITc_image_util_encode_create_destroy_p(void);
-extern int ITc_image_util_encode_set_resolution_p(void);
 extern int ITc_image_util_encode_set_png_compression_p(void);
-extern int ITc_image_util_encode_set_input_buffer_p(void);
-extern int ITc_image_util_encode_set_output_path_p(void);
-extern int ITc_image_util_encode_set_output_buffer_p(void);
-extern int ITc_image_util_encode_run_p(void);
 extern int ITc_image_util_decode_run2_p(void);
 extern int ITc_image_util_encode_run_async_p(void);
 extern int ITc_image_util_decode_run_async2_p(void);
 extern int ITc_image_util_foreach_supported_colorspace_p(void);
 extern int ITc_image_util_decode_set_colorspace_p(void);
-extern int ITc_image_util_encode_set_colorspace_p(void);
 extern int ITc_image_util_decode_set_jpeg_downscale_p(void);
 extern int ITc_image_util_encode_set_quality_p(void);
-extern int ITc_image_util_encode_set_gif_frame_delay_time_p(void);
 extern int ITc_image_util_create_destroy_image_p(void);
 extern int ITc_image_util_clone_image_p(void);
 extern int ITc_image_util_get_image_p(void);
 extern int ITc_image_util_transform_run2_p(void);
 extern int ITc_image_util_transform_run2_async_p(void);
+extern int ITc_image_util_encode_run_to_file_p(void);
+extern int ITc_image_util_encode_run_to_buffer_p(void);
+extern int ITc_image_util_encode_run_async_to_file_p(void);
+extern int ITc_image_util_encode_run_async_to_buffer_p(void);
+extern int ITc_image_util_agif_encode_create_destroy_p(void);
+extern int ITc_image_util_agif_encode_add_frame_p(void);
+extern int ITc_image_util_agif_encode_save_to_file_p(void);
+extern int ITc_image_util_agif_encode_save_to_buffer_p(void);
 
 testcase tc_array[] = {
        {"ITc_image_util_transform_create_destroy_p",ITc_image_util_transform_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
@@ -68,26 +69,27 @@ testcase tc_array[] = {
        {"ITc_image_util_decode_set_input_path_p",ITc_image_util_decode_set_input_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_input_buffer_p",ITc_image_util_decode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_create_destroy_p",ITc_image_util_encode_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_resolution_p",ITc_image_util_encode_set_resolution_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_png_compression_p",ITc_image_util_encode_set_png_compression_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_input_buffer_p",ITc_image_util_encode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_path_p",ITc_image_util_encode_set_output_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_buffer_p",ITc_image_util_encode_set_output_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_run_p",ITc_image_util_encode_run_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run2_p",ITc_image_util_decode_run2_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_run_async_p",ITc_image_util_encode_run_async_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run_async2_p",ITc_image_util_decode_run_async2_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_foreach_supported_colorspace_p",ITc_image_util_foreach_supported_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_colorspace_p",ITc_image_util_decode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_colorspace_p",ITc_image_util_encode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_jpeg_downscale_p",ITc_image_util_decode_set_jpeg_downscale_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_quality_p",ITc_image_util_encode_set_quality_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_gif_frame_delay_time_p",ITc_image_util_encode_set_gif_frame_delay_time_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_create_destroy_image_p",ITc_image_util_create_destroy_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_clone_image_p",ITc_image_util_clone_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_get_image_p",ITc_image_util_get_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_p",ITc_image_util_transform_run2_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_async_p",ITc_image_util_transform_run2_async_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
+       {"ITc_image_util_encode_run_to_file_p", ITc_image_util_encode_run_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_to_buffer_p", ITc_image_util_encode_run_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_file_p", ITc_image_util_encode_run_async_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_buffer_p", ITc_image_util_encode_run_async_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_agif_encode_create_destroy_p", ITc_image_util_agif_encode_create_destroy_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_add_frame_p", ITc_image_util_agif_encode_add_frame_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_file_p", ITc_image_util_agif_encode_save_to_file_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_buffer_p", ITc_image_util_agif_encode_save_to_buffer_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
        {NULL, NULL}
 };
 
index e91b7ef3e3fc97dc5e5c15fef959106cfe71429f..731fedc48565404d1a13efb221a2b89954131b02 100755 (executable)
@@ -35,18 +35,11 @@ extern int ITc_image_util_decode_create_destroy_p(void);
 extern int ITc_image_util_decode_set_input_path_p(void);
 extern int ITc_image_util_decode_set_input_buffer_p(void);
 extern int ITc_image_util_encode_create_destroy_p(void);
-extern int ITc_image_util_encode_set_resolution_p(void);
 extern int ITc_image_util_encode_set_png_compression_p(void);
-extern int ITc_image_util_encode_set_input_buffer_p(void);
-extern int ITc_image_util_encode_set_output_path_p(void);
-extern int ITc_image_util_encode_set_output_buffer_p(void);
-extern int ITc_image_util_encode_run_p(void);
 extern int ITc_image_util_decode_run2_p(void);
-extern int ITc_image_util_encode_run_async_p(void);
 extern int ITc_image_util_decode_run_async2_p(void);
 extern int ITc_image_util_foreach_supported_colorspace_p(void);
 extern int ITc_image_util_decode_set_colorspace_p(void);
-extern int ITc_image_util_encode_set_colorspace_p(void);
 extern int ITc_image_util_decode_set_jpeg_downscale_p(void);
 extern int ITc_image_util_encode_set_quality_p(void);
 extern int ITc_image_util_create_destroy_image_p(void);
@@ -54,6 +47,14 @@ extern int ITc_image_util_clone_image_p(void);
 extern int ITc_image_util_get_image_p(void);
 extern int ITc_image_util_transform_run2_p(void);
 extern int ITc_image_util_transform_run2_async_p(void);
+extern int ITc_image_util_encode_run_to_file_p(void);
+extern int ITc_image_util_encode_run_to_buffer_p(void);
+extern int ITc_image_util_encode_run_async_to_file_p(void);
+extern int ITc_image_util_encode_run_async_to_buffer_p(void);
+extern int ITc_image_util_agif_encode_create_destroy_p(void);
+extern int ITc_image_util_agif_encode_add_frame_p(void);
+extern int ITc_image_util_agif_encode_save_to_file_p(void);
+extern int ITc_image_util_agif_encode_save_to_buffer_p(void);
 
 testcase tc_array[] = {
        {"ITc_image_util_transform_create_destroy_p",ITc_image_util_transform_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
@@ -67,18 +68,11 @@ testcase tc_array[] = {
        {"ITc_image_util_decode_set_input_path_p",ITc_image_util_decode_set_input_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_input_buffer_p",ITc_image_util_decode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_create_destroy_p",ITc_image_util_encode_create_destroy_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_resolution_p",ITc_image_util_encode_set_resolution_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_png_compression_p",ITc_image_util_encode_set_png_compression_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_input_buffer_p",ITc_image_util_encode_set_input_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_path_p",ITc_image_util_encode_set_output_path_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_output_buffer_p",ITc_image_util_encode_set_output_buffer_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_run_p",ITc_image_util_encode_run_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run2_p",ITc_image_util_decode_run2_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_run_async_p",ITc_image_util_encode_run_async_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_run_async2_p",ITc_image_util_decode_run_async2_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_foreach_supported_colorspace_p",ITc_image_util_foreach_supported_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_colorspace_p",ITc_image_util_decode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
-       {"ITc_image_util_encode_set_colorspace_p",ITc_image_util_encode_set_colorspace_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_decode_set_jpeg_downscale_p",ITc_image_util_decode_set_jpeg_downscale_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_encode_set_quality_p",ITc_image_util_encode_set_quality_p,ITs_image_util_startup,ITs_image_util_cleanup},
        {"ITc_image_util_create_destroy_image_p",ITc_image_util_create_destroy_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
@@ -86,6 +80,14 @@ testcase tc_array[] = {
        {"ITc_image_util_get_image_p",ITc_image_util_get_image_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_p",ITc_image_util_transform_run2_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
        {"ITc_image_util_transform_run2_async_p",ITc_image_util_transform_run2_async_p,ITs_image_util_image_startup,ITs_image_util_image_cleanup},
+       {"ITc_image_util_encode_run_to_file_p", ITc_image_util_encode_run_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_to_buffer_p", ITc_image_util_encode_run_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_file_p", ITc_image_util_encode_run_async_to_file_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_encode_run_async_to_buffer_p", ITc_image_util_encode_run_async_to_buffer_p, ITs_image_util_startup,ITs_image_util_cleanup},
+       {"ITc_image_util_agif_encode_create_destroy_p", ITc_image_util_agif_encode_create_destroy_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_add_frame_p", ITc_image_util_agif_encode_add_frame_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_file_p", ITc_image_util_agif_encode_save_to_file_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
+       {"ITc_image_util_agif_encode_save_to_buffer_p", ITc_image_util_agif_encode_save_to_buffer_p, ITs_image_util_agif_encode_startup, ITs_image_util_agif_encode_cleanup},
        {NULL, NULL}
 };