* @brief Starts decoding of the image and fills the output buffer set using image_util_decode_set_output_buffer().
* @since_tizen 3.0
*
-* @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer().
-* The function executes synchronously.
+* @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer().\n
+* The function executes synchronously.\n
+* When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.
*
* @param[in] handle The handle to image util decoding
* @param[out] width Width of the decoded image
* @since_tizen 3.0
*
* @remarks The output will be stored in the pointer set using image_util_decode_set_output_buffer().\n
-* The function executes asynchronously, which contains complete callback.
+* The function executes asynchronously, which contains complete callback.\n
+* When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.
*
* @param[in] handle The handle to image util decoding
* @param[in] callback The callback function to be invoked
* Errors would be returned if not supported.
*
* @param[in] handle The handle to image util encoding
-* @param[in] colorspace The decoded image colorspace
+* @param[in] colorspace The encoded image colorspace
*
* @return @c 0 on success,
* otherwise a negative error value
* @since_tizen 3.0
*
* @remarks One of image_util_encode_set_output_path() or image_util_encode_set_output_buffer() should be set.\n
-* If both are set then the latest output set is considered.
+* If both are set then the latest output set is considered.\n
+* Output buffer setting is not supported for bmp. IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT will be returned for bmp.
*
* @param[in] handle The handle to image util encoding
* @param[in] dst_buffer The output image buffer
* @retval #IMAGE_UTIL_ERROR_NONE Successful
* @retval #IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #IMAGE_UTIL_ERROR_INVALID_OPERATION Invalid operation
+* @retval #IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT Invalid operation
*
* @pre image_util_encode_create()
*
* @brief Starts encoding of the image and fills the output buffer, set using image_util_encode_set_output_buffer() or image_util_encode_set_output_path().
* @since_tizen 3.0
*
-* @remarks The output will be stored in the pointer set to image_util_encode_set_output_buffer() or image_util_encode_set_output_path().
-* The function executes synchronously.
+* @remarks The output will be stored in the pointer set to image_util_encode_set_output_buffer() or image_util_encode_set_output_path().\n
+* The function executes synchronously.\n
+* When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.
*
* @param[in] handle The handle to image util encoding
* @param[out] size Size of the encoded image
* @since_tizen 3.0
*
* @remarks The output will be stored in the pointer set to image_util_encode_set_output_buffer() or image_util_encode_set_output_path().\n
-* The function executes asynchronously, which contains complete callback.
+* The function executes asynchronously, which contains complete callback.\n
+* When any of the @pre functions are not called, IMAGE_UTIL_ERROR_INVALID_PARAMETER is returned.
*
* @param[in] handle The handle to image util encoding
* @param[in] callback The callback function to be invoked
image_util_error("Invalid Handle");
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
}
+ if (_handle->image_type == IMAGE_UTIL_BMP) {
+ image_util_error("BMP library does not support encoding to memory");
+ return IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT;
+ }
if (dst_buffer == NULL) {
image_util_error("Invalid output buffer");
return IMAGE_UTIL_ERROR_INVALID_PARAMETER;
if (_handle->path)
err = mm_util_encode_bmp_to_file(bmp_data, _handle->path);
else {
- fprintf(stderr, "\tNot yet implemented\n");
+ image_util_error("Not yet implemented");
return MM_UTIL_ERROR_INVALID_PARAMETER;
}