* @param[in] pixelFormat The output pixel format of the decoded image
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The input data is invalid.
- * @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_FILE_NOT_FOUND The file cannot be found or accessed.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
* @remarks The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, and @c MEDIA_PIXEL_FORMAT_BGRA8888.
* @param[in] pixelFormat The output pixel format of the decoded image
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The input data is invalid.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
* @remarks The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, and @c MEDIA_PIXEL_FORMAT_BGRA8888.
int GetHeight(void) const;
/**
- * Decodes and gets the next frame in raw RGB format.
+ * Decodes and gets the next frame in the raw RGB format.
*
* @since 2.0
*
* @return The next decoded frame, @n
* else @c null if no frame is left or an error occurs
- * @param[out] duration The duration of returned frame in milliseconds
+ * @param[out] duration The duration of the returned frame in milliseconds
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The data of the next frame is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
Tizen::Base::ByteBuffer* GetNextFrameN(long& duration);
/**
- * Decodes and gets the next frame in bitmap format.
+ * Decodes and gets the next frame in the bitmap format.
*
* @since 2.0
*
* @return The next decoded frame, @n
* else @c null if no frame is left or an error occurs
- * @param[out] duration The duration of returned frame in milliseconds
+ * @param[out] duration The duration of the returned frame in milliseconds
* @param[in] bufferScaling The buffer scaling type of Tizen::Graphics::Bitmap
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The data of the next frame is invalid.
*
* The %IImageDecodeUrlEventListener interface provides a listener that receives events associated with the Image::DecodeUrl() method, including specifying the methods used to get the decoded bitmap data from the remote URL.
* The %Image::DecodeUrl() method works asynchronously. Therefore, it is important to implement this listener to ensure that the decoding flows correctly.
- * When an operation of each method is completed, an event is generated and a method of this interface is called.
+ * When the operation of each method is completed, an event is generated and a method of this interface is called.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/viewing_processing_still_images.htm">Viewing and Processing Still Images</a>.
*/
* @param[in] errorCode The error code
* @param[in] errorMessage The error message
* @remarks
- * - If the operation succeeds then the @c r will be E_SUCCESS, otherwise the @c r will be an error code.
+ * - If the operation succeeds then @c r is @c E_SUCCESS, otherwise @c r is an error code.
* - The Image object must not be deleted in this event listener.
* - This method passes an auto-scaled bitmap, @n
* so the dimension can be different from the requested dimension if the passed bitmap is locked.
* @brief This class is used for handling images.
*
* @since 2.0
- * @remarks The minimum dimension is 16x16 for JPEG encoding and 8x8 for PNG encoding.
+ * @remarks The minimum dimension for JPEG encoding is 16x16 and for PNG encoding is 8x8.
*
* The %Image class is used for handling images, including image decoding, encoding, and conversion. @n
*
result Construct(void);
/**
- * Decodes an image file into the decoded bitmap container. @n
+ * Decodes the image file into the decoded bitmap container. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* For more information, see @ref CompIoPathPage "here".
* @endif
*
- * @return A decoded bitmap that is not resized
+ * @return The decoded bitmap that is not resized
* @param[in] srcImagePath The local file path of the image file to open
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_INVALID_DATA The specified input instance has invalid data.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @remarks
- * - @c E_OUT_OF_MEMORY can be returned if there is no available memory when decoding a large image.
+ * - @c E_OUT_OF_MEMORY is returned if there is no available memory for decoding a large image.
* - The specific error code can be accessed using the GetLastResult() method.
* - This method returns an auto-scaled bitmap, @n
- * so the dimension can be different from the dimension of source image if the returned bitmap is locked.
+ * so the dimension can be different from the dimension of the source image, if the returned bitmap is locked.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::String& srcImagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat) const;
/**
- * Decodes an image file into the decoded bitmap container after resizing it as per the specified width and height. @n
+ * Decodes the image file into the decoded bitmap container after resizing it as per the specified width and height. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image. @n
- * It supports only the downscaling of an image.
+ * It supports only the downscaling of the image.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* For more information, see @ref CompIoPathPage "here".
* @endif
*
- * @return A decoded bitmap data with the specified destination width and height
+ * @return The decoded bitmap data with the specified destination width and height
* @param[in] srcImagePath The local file path of the image file to open
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @param[in] destWidth The intended width of the image @n
* @param[in] destHeight The intended height of the image @n
* An exception is returned if the value is less than @c 0.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_INVALID_DATA The specified input instance has invalid data.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
- * @exception E_OUT_OF_RANGE The specified size is out of range.
+ * @exception E_OUT_OF_RANGE The specified size is out of the valid range.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - This method returns an auto-scaled bitmap, @n
- * so the dimension can be different from the requested dimension if the returned bitmap is locked.
+ * so the dimension can be different from the requested dimension, if the returned bitmap is locked.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::String& srcImagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat, int destWidth, int destHeight) const;
/**
- * Decodes an image data into the decoded bitmap container after resizing it as per a specified width and height. @n
+ * Decodes the image data into the decoded bitmap container after resizing it as per the specified width and height. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image.
*
* @since 2.1
*
- * @return A decoded bitmap data with the specified destination width and height
+ * @return The decoded bitmap data with the specified destination width and height
* @param[in] srcImageBuf The data to decode
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @param[in] destWidth The intended width of the image
* @param[in] destHeight The intended height of the image
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The specified input instance has invalid data.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
- * For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
- * - This method returns an auto-scaled bitmap to support logical coordinate system, so the actual dimension of the returned bitmap can vary depending on the physical dimension of the target device.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is
+ * @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception,
+ * refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - This method returns an auto-scaled bitmap to support the logical coordinate system, so the actual dimension of the returned bitmap can
+ * vary depending on the physical dimension of the target device.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::ByteBuffer& srcImageBuf, Tizen::Graphics::BitmapPixelFormat pixelFormat, float destWidth, float destHeight) const;
/**
- * Decodes an image file into the decoded bitmap container after resizing it as per a specified width and height. @n
+ * Decodes the image file into the decoded bitmap container after resizing it as per the specified width and height. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image.
*
* @since 2.1
*
- * @return A decoded bitmap data with the specified destination width and height
+ * @return The decoded bitmap data with the specified destination width and height
* @param[in] srcImagePath The local file path of the image file to open
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @param[in] destWidth The intended width of the image
* @param[in] destHeight The intended height of the image
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_INVALID_DATA The specified input instance has invalid data.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
- * For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
- * - This method returns an auto-scaled bitmap to support logical coordinate system, so the actual dimension of the returned bitmap can vary depending on the physical dimension of the target device.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY
+ * or not. For more information on how to handle the out-of-memory exception,
+ * refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - This method returns an auto-scaled bitmap to support the logical coordinate system, so the actual dimension of the returned bitmap can
+ * vary depending on the physical dimension of the target device.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::String& srcImagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat, float destWidth, float destHeight) const;
/**
- * Decodes an image data into the decoded bitmap as per the specified width and height. @n
+ * Decodes the image data into the decoded bitmap as per the specified width and height. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeUrl() method retains the aspect ratio of the original image. @n
- * It supports only the downscaling of an image.
+ * It supports only the downscaling of the image.
*
* @since 2.0
*
* Set to @c TIMEOUT_INFINITE to make the @c timeout period infinite.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The specified input instance has invalid data.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
- * @exception E_OUT_OF_RANGE The specified size is out of range.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
+ * @exception E_OUT_OF_RANGE The specified size is out of the valid range.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_NETWORK_FAILED The network is unavailable.
- * @exception E_MAX_EXCEEDED The number of concurrent accesses to the URLs has reached the maximum limit.
+ * @exception E_MAX_EXCEEDED The number of concurrent accesses to the URLs have reached the maximum limit.
* @remarks
* - The maximum limit for downloading is @c 3.
* - The supported protocol is HTTP.
result DecodeUrl(const Tizen::Base::Utility::Uri& srcImageUrl, Tizen::Graphics::BitmapPixelFormat pixelFormat, int destWidth, int destHeight, RequestId& reqId, const IImageDecodeUrlEventListener& listener, long timeout) const;
/**
- * Decodes an image data into the decoded bitmap container without resizing. @n
+ * Decodes the image data into the decoded bitmap container without resizing. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image.
*
* @since 2.0
*
- * @return A decoded bitmap data that has not been resized
+ * @return The decoded bitmap data that has not been resized
* @param[in] srcImageBuf The data to decode
* @param[in] srcImageFormat The image format of the input file
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The specified input instance has invalid data.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
- * - @c E_OUT_OF_MEMORY is returned if the memory is not available when decoding a large image.
+ * - @c E_OUT_OF_MEMORY is returned if there is no available memory for decoding a large image.
* - The specific error code can be accessed using the GetLastResult() method.
* - This method returns an auto-scaled bitmap, @n
- * so the dimension can be different from the dimension of source image if the returned bitmap is locked.
+ * so the dimension can be different from the dimension of the source image if the returned bitmap is locked.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::ByteBuffer& srcImageBuf, ImageFormat srcImageFormat, Tizen::Graphics::BitmapPixelFormat pixelFormat) const;
/**
- * Decodes an image data into the decoded bitmap container after resizing it as per the specified width and height. @n
+ * Decodes the image data into the decoded bitmap container after resizing it as per the specified width and height. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP. @n
* The %DecodeN() method retains the aspect ratio of the original image. @n
- * It supports only the downscaling of an image.
+ * It supports only the downscaling of the image.
*
* @since 2.0
*
- * @return A decoded bitmap data with the specified destination width and height
+ * @return The decoded bitmap data with the specified destination width and height
* @param[in] srcImageBuf The data to decode
* @param[in] srcImageFormat The image format of the input file
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
* @param[in] destHeight The intended height of the image @n
* An exception is returned if the value is less than @c 0.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified pixel format is not supported.
+ * @exception E_INVALID_ARG The specified @c pixelFormat is not supported.
* @exception E_INVALID_DATA The specified input instance has invalid data.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
- * @exception E_OUT_OF_RANGE The specified size is out of range.
+ * @exception E_OUT_OF_RANGE The specified size is out of the valid range.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - This method returns an auto-scaled bitmap, @n
- * so the dimension can be different from the requested dimension if the returned bitmap is locked.
+ * so the dimension can be different from the requested dimension if the returned bitmap is locked.
*/
Tizen::Graphics::Bitmap* DecodeN(const Tizen::Base::ByteBuffer& srcImageBuf, ImageFormat srcImageFormat, Tizen::Graphics::BitmapPixelFormat pixelFormat, int destWidth, int destHeight) const;
/**
- * Encodes the specified bitmap data into a byte buffer. @n
+ * Encodes the specified bitmap data into the byte buffer. @n
* The currently supported encoding formats are JPEG, BMP, and PNG.
*
* @since 2.0
*
- * @return A byte buffer containing encoded image data
+ * @return The byte buffer that contains the encoded image data
* @param[in] srcBitmap The bitmap data to encode
* @param[in] destImageFormat The intended image format
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified bitmap data cannot be found.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - This method uses raw RGB data from locked bitmap, @n
- * so the dimension of encoded data can be different from the dimension of source bitmap if the bitmap is auto-scaled.
+ * - This method uses the raw RGB data from the locked bitmap, @n
+ * so the dimension of the encoded data can be different from the dimension of the source bitmap if the bitmap is auto-scaled.
*/
Tizen::Base::ByteBuffer* EncodeToBufferN(const Tizen::Graphics::Bitmap& srcBitmap, ImageFormat destImageFormat) const;
* The currently supported encoding formats are JPEG, BMP, and PNG.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* @return An error code
* @param[in] srcBitmap The bitmap data to encode
* @param[in] destImageFormat The intended image format
- * @param[in] destImagePath The intended name of encoded image file @n
- * The available paths start with prefixes retrieved from the functions such as: @n
- * Tizen::App::App::GetInstance()->GetAppRootPath() @n
- * Tizen::System::Environment::GetMediaPath() @n
- * Tizen::System::Environment::GetExternalStoragePath()
+ * @param[in] destImagePath The intended name of the encoded image file @n
+ * The available paths start with the prefixes retrieved from the functions such as: @n
+ * Tizen::App::App::GetInstance()->GetAppRootPath() @n
+ * Tizen::System::Environment::GetMediaPath() @n
+ * Tizen::System::Environment::GetExternalStoragePath().
* @param[in] overwrite Set to @c true to overwrite the file, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_STORAGE_FULL The storage is full.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - The application should use Tizen::Content::ContentManager::CreateContent() to register the created file into the Contents database.
- * - This method uses raw RGB data from locked bitmap, @n
- * so the dimension of encoded data can be different from the dimension of source bitmap if the bitmap is auto-scaled.
+ * - The application should use the Tizen::Content::ContentManager::CreateContent() method to register the created file into the Contents database.
+ * - This method uses the raw RGB data from the locked bitmap, @n
+ * so the dimension of the encoded data can be different from the dimension of the source bitmap if the bitmap is auto-scaled.
*/
result EncodeToFile(const Tizen::Graphics::Bitmap& srcBitmap, ImageFormat destImageFormat, const Tizen::Base::String& destImagePath, bool overwrite) const;
/**
* Converts the image file to the specified image format. @n
- * This is a synchronous method. The converting formats currently supported are JPEG, BMP, and PNG.
+ * This is a synchronous method. The currently supported converting formats are JPEG, BMP, and PNG.
*
* @if OSPCOMPAT
* @brief <i> [Compatibility] </i>
* For more information, see @ref CompIoPathPage "here".
* @endif
*
- * @return The byte buffer containing image data
+ * @return The byte buffer that contains the image data
* @param[in] srcImagePath The local file path of the image file to open
* @param[in] destImageFormat The intended image format
* @exception E_SUCCESS The method is successful.
/**
* @cond OSPDEPREC
- * Compresses an encoded image file to reduce its size as per the specified limit. @n
+ * Compresses the encoded image file to reduce its size as per the specified limit. @n
* The only supported compression format is JPEG.
*
* @if OSPCOMPAT
- * @brief <i> [Deprecated] [Compatibility] </i>
+ * @brief <i> [Deprecated] [Compatibility] </i>
* @deprecated This method is deprecated.
* @endif
* @since 2.0
* @return An error code
* @param[in] srcImagePath The local file path of the image file to open
* @param[in] destImagePath The destination file path @n
- * If the file already exists, it is overwritten. @n
- * The available paths start with prefix such as: @n
+ * If the file already exists, it is overwritten @n
+ * The available paths start with the prefixes retrieved from the functions such as: @n
* Tizen::App::App::GetInstance()->GetAppRootPath() @n
* Tizen::System::Environment::GetMediaPath() @n
- * Tizen::System::Environment::GetExternalStoragePath()
+ * Tizen::System::Environment::GetExternalStoragePath().
* @param[in] limitSize The maximum compressed data size in bytes @n
- * If the data size is too small, the width and height of the original
- * image can be reduced. @n The size must be less than the original size
- * and greater than @c 1024 byte.
+ * If the data size is too small, the width and the height of the original image can be reduced @n
+ * The size must be less than the original size and greater than @c 1024 bytes.
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_STORAGE_FULL The file cannot be created because the file has reached its size limit.
- * @exception E_OUT_OF_RANGE The specified size is out of range.
+ * @exception E_STORAGE_FULL The file cannot be created as it has reached the maximum size limit.
+ * @exception E_OUT_OF_RANGE The specified size is out of the valid range.
* @endcond
*/
result CompressJpeg(const Tizen::Base::String& srcImagePath, const Tizen::Base::String& destImagePath, int limitSize) const;
/**
* @if OSPDEPREC
- * Compresses an encoded image data to the byte buffer to reduce its data size as per the specified limit. @n
+ * Compresses the encoded image data into the byte buffer to reduce its data size as per the specified limit. @n
* The only supported compression format is JPEG.
*
- * @brief <i> [Deprecated] </i>
+ * @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated.
* @since 2.0
*
- * @return A byte buffer containing the compressed image data as per the specified size
+ * @return The byte buffer that contains the compressed image data as per the specified size
* @param[in] srcImageBuf The encoded image source in the byte buffer
- * @param[in] limitSize The limit size to compress in bytes @n
+ * @param[in] limitSize The size limit within which to compress in bytes @n
* The size must be less than the original size and greater than @c 1024 bytes.
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The specified input instance has overflowed.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
* @exception E_SYSTEM A system error has occurred.
- * @exception E_OUT_OF_RANGE The specified size is out of range.
+ * @exception E_OUT_OF_RANGE The specified size is out of the valid range.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @endif
*/
Tizen::Base::ByteBuffer* CompressJpegN(const Tizen::Base::ByteBuffer& srcImageBuf, int limitSize) const;
/**
- * Decodes an image data into the decoded byte buffer container without resizing. @n
+ * Decodes the image data into the decoded byte buffer container without resizing. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP.
*
* @since 2.0
*
- * @return A decoded byte data that is not resized, @n
+ * @return The decoded byte data that is not resized, @n
* else @c null if an exception occurs
* @param[in] srcImageBuf The data to decode
* @param[in] srcImageFormat The image format of the input data
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
- * @param[out] imageWidth The original width of the image @n
+ * @param[out] imageWidth The original width of the image @n
* An exception is returned if the value is less than @c 0.
- * @param[out] imageHeight The original height of the image @n
+ * @param[out] imageHeight The original height of the image @n
* An exception is returned if the value is less than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified color format is not supported.
Tizen::Base::ByteBuffer* DecodeToBufferN(const Tizen::Base::ByteBuffer& srcImageBuf, ImageFormat srcImageFormat, Tizen::Graphics::BitmapPixelFormat pixelFormat, int& imageWidth, int& imageHeight) const;
/**
- * Decodes an image file into the decoded byte buffer container without resizing. @n
+ * Decodes the image file into the decoded byte buffer container without resizing. @n
* The currently supported decoding formats are JPEG, GIF, PNG, BMP, TIFF, and WBMP.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* For more information, see @ref CompIoPathPage "here".
* @endif
*
- * @return A decoded byte data that is not resized, @n
+ * @return The decoded byte data that is not resized, @n
* else @c null if an exception occurs
* @param[in] srcImagePath The local file path of the image file to decode
* @param[in] pixelFormat The output pixel format defined by Tizen::Graphics::BitmapPixelFormat
- * @param[out] imageWidth The original width of the image @n
+ * @param[out] imageWidth The original width of the image @n
* An exception is returned if the value is less than @c 0.
- * @param[out] imageHeight The original height of the image @n
+ * @param[out] imageHeight The original height of the image @n
* An exception is returned if the value is less than @c 0.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified color format is not supported.
* Gets the format of the image in the specified file.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
Tizen::Media::ImageFormat GetImageFormat(const Tizen::Base::String& srcImagePath) const;
/**
- * Gets the image format from an image buffer.
+ * Gets the image format from the image buffer.
*
* @since 2.0
*
* @return The format of the image
- * @param[in] srcImageBuf The Tizen::Base::ByteBuffer containing the image data
+ * @param[in] srcImageBuf The Tizen::Base::ByteBuffer that contains the image data
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
* Currently only 32-bit PNG images are supported.
*
* @if OSPCOMPAT
- * @brief <i> [Compatibility] </i>
+ * @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
*
* @return @c true if the image has alpha channels, @n
* else @c false
- * @param[in] srcImageBuf The Tizen::Base::ByteBuffer containing the image data
+ * @param[in] srcImageBuf The Tizen::Base::ByteBuffer that contains the image data
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OBJ_NOT_FOUND The specified image buffer cannot be found.
* @brief This class is used for handling decoded image data.
*
* @since 2.0
- * @remarks The minimum dimension is 16x16 for JPEG encoding and 8x8 for PNG encoding.
+ * @remarks The minimum dimension for JPEG encoding is 16x16 and for PNG encoding is 8x8.
*
* The %ImageBuffer class is used for handling decoded image data, including image decoding and encoding.
*
- * The following example demonstrates how to use the %ImageBuffer class to decode and encode image.
+ * The following example demonstrates how to use the %ImageBuffer class to decode and encode images.
*
* @code
#include <FMedia.h>
* @return An error code
* @param[in] width The width of the image
* @param[in] height The height of the image
- * @param[in] pixelFormat The pixel format of the image should be one of the values returned by GetSupportedPixelFormatListN()
- * @param[in] pData The raw pixel data of the image @n If @c pData is not @c null, then it is copied into the internal buffer of this instance.
- * If @c null, then the default color data is filled.
- * @param[in] length The size of the data
+ * @param[in] pixelFormat The pixel format of the image should be one of the values returned by the GetSupportedPixelFormatListN() method
+ * @param[in] pData The raw pixel data of the image @n
+ * If this value is not @c null, it is copied into the internal buffer of this instance, and the size of the data must be specified, @n
+ * else the default color data is filled.
+ * @param[in] length The size of the data @n
+ * This value must be set if @c pData is not @c null.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified @c pixelFormat is not supported.
*
* @return An error code
* @param[in] srcImagePath The source image path
- * @param[in] pDecodingRegion The region that is decoded @n If this is @c null, then the whole image is decoded.
- * @param[in] autoRotate If @c true the image is rotated automatically based on the EXIF orientation tag before decoding @n
- * If @c false the image is decoded without rotation.
+ * @param[in] pDecodingRegion The region that is decoded @n
+ * If @c pDecodingRegion is @c null, then the whole image is decoded.
+ * @param[in] autoRotate If @c true then the image is rotated automatically before decoding based on the EXIF orientation tag @n
+ * If @c false then the image is decoded without rotation.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_OVERFLOW The specified input instance exceeds the supported maximum file size or dimension.
+ * @exception E_OVERFLOW The specified input instance exceeds the maximum supported file size or dimension.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
*
* @return An error code
* @param[in] srcImageBuf The buffer that contains the compressed image data
- * @param[in] pDecodingRegion The region that is decoded @n If this is @c null, then the whole image is decoded.
- * @param[in] autoRotate If @c true the image is rotated automatically based on the EXIF orientation tag before decoding @n
+ * @param[in] pDecodingRegion The region that is decoded @n
+ * If @c pDecodingRegion is @c null, then the whole image is decoded.
+ * @param[in] autoRotate If @c true then the image is rotated automatically before decoding based on the EXIF orientation tag @n
* If @c false the image is decoded without rotation.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_OVERFLOW The specified input instance exceeds the supported maximum file size or dimension.
+ * @exception E_OVERFLOW The specified input instance exceeds the maximum supported file size or dimension.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
* For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
/**
* Initializes this instance of %ImageBuffer with the given bitmap data. @n
* The %Construct() method copies the raw RGB data from the @c srcBitmap,
- * so the dimension of this instance can be different from that of @c srcBitmap if the @c srcBitmap is an auto-scaled bitmap.
+ * so the dimension of this instance can be different from that of @c srcBitmap, if @c srcBitmap is an auto-scaled bitmap.
*
* @since 2.0
*
* @param[in] srcBitmap The source bitmap data
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- * @exception E_OVERFLOW The specified input instance exceeds the supported maximum file size or dimension.
+ * @exception E_OVERFLOW The specified input instance exceeds the maximum supported file size or dimension.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result Construct(const Tizen::Graphics::Bitmap &srcBitmap);
/**
- * Initializes this instance of %ImageBuffer that is decoded with the data of the given image path with the specified parameters.
+ * Initializes this instance of %ImageBuffer that is decoded using the given image path data, with the specified parameters.
*
* @since 2.1
*
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @remarks
- * - There is a high probability for an occurrence of an out-of-memory exception.
- * If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. @n
- * For more information on how to handle the out-of-memory exception, refer
- * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
+ * For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
* - This method does not retain the aspect ratio of the original image.
*/
result Construct(const Tizen::Base::String &srcImagePath, int destWidth, int destHeight, ImageScalingMethod scalingMethod);
/**
- * Initializes this instance of %ImageBuffer that is decoded with the data of the given image buffer with the specified parameters.
+ * Initializes this instance of %ImageBuffer that is decoded using the given image buffer data, with the specified parameters.
*
* @since 2.1
*
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
- * - There is a high probability for an occurrence of an out-of-memory exception.
- * If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. @n
- * For more information on how to handle the out-of-memory exception, refer
- * <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
+ * - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
+ * For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.
* - This method does not retain the aspect ratio of the original image.
*/
result Construct(const Tizen::Base::ByteBuffer &srcImageBuf, int destWidth, int destHeight, ImageScalingMethod scalingMethod);
/**
* Gets the current exif orientation of the image data. @n
- * If automatic rotation is enabled during Construct() then the orientation is reset to the default value.
+ * If automatic rotation is enabled during the Construct() method then the orientation is reset to the default value.
*
* @since 2.1
*
/**
- * Converts an instance of the Tizen::Base::Object class to an instance of %ImageBuffer and then
- * compares it with the calling %ImageBuffer instance.
+ * Compares the specified Tizen::Base::Object instance with the current %ImageBuffer instance.
*
* @since 2.0
*
- * @return @c true if the value of @c rhs matches the value of the calling %ImageBuffer instance, @n
+ * @return @c true if the value of @c rhs matches the value of the current %ImageBuffer instance, @n
* else @c false
- * @param[in] rhs A reference to the Tizen::Base::Object instance that is to compare with the calling %ImageBuffer instance
+ * @param[in] rhs A reference to the Tizen::Base::Object instance that is compared with the current %ImageBuffer instance
* @see Tizen::Base::Object::Equals()
*/
virtual bool Equals(const Object& rhs) const;
/**
- * Gets the hash value of the current instance by overriding the GetHashCode() method in the Tizen::Base::Object class.
+ * Gets the hash value of the current instance by overriding the %GetHashCode() method in the Tizen::Base::Object class.
*
* @since 2.0
*
MediaPixelFormat GetPixelFormat(void) const;
/**
- * Encodes the data of this instance into a byte buffer. @n
+ * Encodes the data of this instance into the byte buffer. @n
* The supported encoding formats are JPEG, BMP, and PNG.
*
* @since 2.0
*
- * @return A pointer to the Tizen::Base::ByteBuffer instance containing the encoded image data
+ * @return A pointer to the Tizen::Base::ByteBuffer instance that contains the encoded image data
* @param[in] destImageFormat The intended image format
* @param[in] quality The encoding quality @n
- * Valid range of this parameter is @c 1 to @c 100.
+ * The valid range for this parameter is @c 1 to @c 100.
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is out of range.
+ * @exception E_OUT_OF_RANGE A specified input parameter is out of the valid range.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
Tizen::Base::ByteBuffer* EncodeToBufferN(ImageFormat destImageFormat, int quality = 90) const;
/**
- * Encodes the data of this instance to a file. @n
+ * Encodes the data of this instance into the file. @n
* The supported encoding formats are JPEG, BMP, and PNG.
*
* @since 2.0
* @param[in] overwrite Set to @c true to overwrite the file, @n
* else @c false
* @param[in] quality The encoding quality @n
- * Valid range of this parameter is @c 1 to @c 100.
+ * The valid range for this parameter is @c 1 to @c 100.
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_ILLEGAL_ACCESS The specified file cannot be found or accessed.
* @exception E_FILE_ALREADY_EXIST The specified file already exists and the value of @c overwrite is @c false.
- * @exception E_OUT_OF_RANGE A specified input parameter is out of range.
- * @remarks The application should use Tizen::Content::ContentManager::CreateContent() to
- * register the created file into the Contents database.
+ * @exception E_OUT_OF_RANGE A specified input parameter is out of the valid range.
+ * @remarks The application should use the Tizen::Content::ContentManager::CreateContent() method to register the created file into the Contents database.
*/
result EncodeToFile(const Tizen::Base::String &destImagePath, ImageFormat destImageFormat, bool overwrite, int quality = 90) const;
Tizen::Graphics::Bitmap* GetBitmapN(Tizen::Graphics::BitmapPixelFormat pixelFormat, Tizen::Graphics::BufferScaling bufferScaling) const;
/**
- * Gets an instance of Tizen::Graphics::Bitmap with the data of this instance after resizing it as per a specified width and height.
+ * Gets an instance of Tizen::Graphics::Bitmap with the data of this instance after resizing it as per the specified width and height.
*
* @since 2.1
*
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
- * - This method returns an auto-scaled bitmap to support logical coordinate system,
+ * - This method returns an auto-scaled bitmap to support the logical coordinate system,
* so the actual dimension of the returned bitmap can vary depending on the physical dimension of the target device.
*/
Tizen::Graphics::Bitmap* GetBitmapN(Tizen::Graphics::BitmapPixelFormat pixelFormat, float destWidth, float destHeight) const;
Tizen::Base::ByteBuffer* GetByteBufferN(MediaPixelFormat pixelFormat) const;
/**
- * Creates and returns a copy of this instance.
+ * Creates and returns a copy of the %ImageBuffer instance.
*
* @since 2.0
*
- * @return A copy of this instance
+ * @return A copy of the %ImageBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*
* @since 2.0
*
- * @return A pointer to the %ImageBuffer instance containing the converted %ImageBuffer by the specified MediaPixelFormat
- * @param[in] pixelFormat The pixel format for returned %ImageBuffer
+ * @return A pointer to the %ImageBuffer instance that contains the %ImageBuffer which is converted to the specified MediaPixelFormat
+ * @param[in] pixelFormat The pixel format for the returned %ImageBuffer
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
* @exception E_INVALID_DATA The current data is invalid for this operation. @n
- * This will happen when the width or height is not even value,
- * and the requested pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P.
+ * This happens when the @c width or @c height is not an even value,
+ * and the requested pixel format is a sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
ImageBuffer* ConvertPixelFormatN(MediaPixelFormat pixelFormat) const;
/**
- * Gets a resized %ImageBuffer with the current image data. @n
- * The aspect ratio of the data will not be preserved.
+ * Gets the resized %ImageBuffer with the current image data. @n
+ * The aspect ratio of the data is not preserved.
*
* @since 2.0
*
- * @return A pointer to the %ImageBuffer instance containing the resized image data
+ * @return A pointer to the %ImageBuffer instance that contains the resized image data
* @param[in] width The width of the destination image
* @param[in] height The height of the destination image
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is out of range.
+ * @exception E_OUT_OF_RANGE A specified input parameter is out of the valid range.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_INVALID_DATA The current data is invalid for this operation. @n
- * This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P
- * and the requested @c width or @c height is not even value.
+ * This happens when the current pixel format is a sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P,
+ * and the requested @c width or @c height is not an even value.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
*
* @since 2.0
*
- * @return A pointer to the %ImageBuffer instance containing the flipped image data
+ * @return A pointer to the %ImageBuffer instance that contains the flipped image data
* @param[in] flipType The flip type
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
ImageBuffer* FlipN(ImageFlipType flipType) const;
/**
- * Gets a rotated image in clockwise direction from the current image.
+ * Rotates the image in the clockwise direction.
*
* @since 2.0
*
- * @return A pointer to the %ImageBuffer instance containing the rotated image data
- * @param[in] rotateType The rotation type
+ * @return A pointer to the %ImageBuffer instance that contains the rotated image data
+ * @param[in] rotateType The rotation type
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_INVALID_DATA The current data is invalid for this operation. @n
- * This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUYV422
- * and the height is odd value and the requested rotation type is @c IMAGE_ROTATION_90 or @c IMAGE_ROTATION_270.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * This happens when the current pixel format is a sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUYV422,
+ * the height is an odd value, and the requested rotation type is @c IMAGE_ROTATION_90 or @c IMAGE_ROTATION_270.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
*
* @since 2.0
*
- * @return A pointer to the %ImageBuffer instance containing the cropped image data
+ * @return A pointer to the %ImageBuffer instance that contains the cropped image data
* @param[in] x The x position
* @param[in] y The y position
* @param[in] width The width of the destination image
* @param[in] height The height of the destination image
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE A specified input parameter is out of range.
+ * @exception E_OUT_OF_RANGE A specified input parameter is out of the valid range.
* @exception E_INVALID_DATA The current data is invalid for this operation. @n
- * This will happen when the current pixel format is sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P
- * and the requested @c x, @c y, @c width, or @c height is not even value.
+ * This happens when the current pixel format is a sub-sampled pixel format like @c MEDIA_PIXEL_FORMAT_YUV420P,
+ * and the requested @c x, @c y, @c width, or @c height is not an even value.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - There is a high probability for an occurrence of an out-of-memory exception. If possible, check whether the exception is @c E_OUT_OF_MEMORY or not.
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] srcImagePath The source image path
* @param[out] imageFormat The format of the image
* @param[out] width The width of the image
*
* @since 2.0
*
- * @return An error code
- * @param[in] srcImageBuf The buffer that contains the compressed image data
- * @param[out] imageFormat The format of the image
- * @param[out] width The width of the image
- * @param[out] height The height of the image
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM A system error has occurred.
+ * @return An error code
+ * @param[in] srcImageBuf The buffer that contains the compressed image data
+ * @param[out] imageFormat The format of the image
+ * @param[out] width The width of the image
+ * @param[out] height The height of the image
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM A system error has occurred.
*/
static result GetImageInfo(const Tizen::Base::ByteBuffer& srcImageBuf, ImageFormat &imageFormat, int &width, int &height);
/**
- * Gets a list of the supported pixel formats.
+ * Gets the list of supported pixel formats.
*
* @since 2.0
*
- * @return A list of the pixel formats supported by the %ImageBuffer class, @n
+ * @return The list of supported pixel formats, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
/**
* @class ImageUtil
- * @brief This class provides methods for converting the color space of the image, flipping, rotating, and resizing.
+ * @brief This class provides methods for flipping, rotating, resizing, and converting the color space of an image.
*
* @since 2.0
*
- * The %ImageUtil class provides methods for %Image pixel format conversion and %Image scaling, such as resizing, rotating, and flipping.
+ * The %ImageUtil class provides methods for image pixel format conversion, and image scaling, such as resizing, rotating, and flipping.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/viewing_processing_still_images.htm">Viewing and Processing Still Images</a>.
*
*
* @since 2.0
*
- * @return An error code
- * @param[in] srcBuf The source buffer
+ * @return An error code
+ * @param[in] srcBuf The source buffer
* @param[out] destBuf The destination buffer
- * @param[in] srcPixelFormat The source pixel format
+ * @param[in] srcPixelFormat The source pixel format
* @param[in] destPixelFormat The destination pixel format
- * @param[in] dim The width and height of the source and destination images @n
- * The value of the width and height must be greater than or equal to @c 1.
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_INVALID_ARG The specified width and height are invalid, or the size of @c srcBuf or @c destBuf is insufficient.
- * @exception E_INVALID_DATA A source image data in the buffer is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_SYSTEM A system error has occurred.
+ * @param[in] dim The width and the height of the source and the destination images @n
+ * The values of the width and the height must be greater than or equal to @c 1.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified width and height are invalid.
+ * - The size of the specified @c srcBuf or the specified @c destBuf is insufficient.
+ * @exception E_INVALID_DATA The source image data in the buffer is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_SYSTEM A system error has occurred.
* @remarks
- * - The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, @c MEDIA_PIXEL_FORMAT_BGRA8888, and @c MEDIA_PIXEL_FORMAT_YUV420P. @n
- * The conversion is possible between: @n
- * - @c MEDIA_PIXEL_FORMAT_YUV420P and @c MEDIA_PIXEL_FORMAT_RGB565LE. @n
- * - @c MEDIA_PIXEL_FORMAT_YUV420P and @c MEDIA_PIXEL_FORMAT_BGRA8888. @n
- * - The position and limit of @c destBuf are set along with the size of the converted data.
+ * - The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, @c MEDIA_PIXEL_FORMAT_BGRA8888, and @c MEDIA_PIXEL_FORMAT_YUV420P.
+ * - The conversion is possible between:
+ * - @c MEDIA_PIXEL_FORMAT_YUV420P and @c MEDIA_PIXEL_FORMAT_RGB565LE.
+ * - @c MEDIA_PIXEL_FORMAT_YUV420P and @c MEDIA_PIXEL_FORMAT_BGRA8888.
+ * - The position and the limit of @c destBuf are set along with the size of the converted data.
*/
static result ConvertPixelFormat(const Tizen::Base::ByteBuffer& srcBuf, Tizen::Base::ByteBuffer& destBuf, MediaPixelFormat srcPixelFormat, MediaPixelFormat destPixelFormat, const Tizen::Graphics::Dimension& dim);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] srcBuf The source buffer
- * @param[out] destBuf The destination buffer
- * @param[in] srcDim The width and height of the source image @n
- * The value of the width and height must be greater than or equal to @c 1.
- * @param[in] destDim The width and height of the destination image @n
- * The value of the width and height must be greater than or equal to @c 1.
- * @param[in] pixelFormat The source and destination pixel format
- * @exception E_SUCCESS The method is successful.
+ * @param[out] destBuf The destination buffer
+ * @param[in] srcDim The width and the height of the source image @n
+ * The values of the width and the height must be greater than or equal to @c 1.
+ * @param[in] destDim The width and the height of the destination image @n
+ * The values of the width and the height must be greater than or equal to @c 1.
+ * @param[in] pixelFormat The source and the destination pixel format
+ * @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_INVALID_ARG The specified width and height are invalid, or the size of @c srcBuf or @c destBuf is insufficient.
- * @exception E_INVALID_DATA A source image data in the buffer is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified width and height are invalid.
+ * - The size of the specified @c srcBuf or the specified @c destBuf is insufficient.
+ * @exception E_INVALID_DATA The source image data in the buffer is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, @c MEDIA_PIXEL_FORMAT_BGRA8888, and @c MEDIA_PIXEL_FORMAT_YUV420P.
- * - The position and limit of @c destBuf are set along with the size of the resized data. @n
- * The minimum resolution is 16x16.
+ * - The position and the limit of @c destBuf are set along with the size of the resized data.
+ * - The minimum resolution is 16x16.
*/
static result Resize(const Tizen::Base::ByteBuffer& srcBuf, Tizen::Base::ByteBuffer& destBuf, const Tizen::Graphics::Dimension& srcDim, const Tizen::Graphics::Dimension& destDim, MediaPixelFormat pixelFormat);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] srcBuf The source buffer
- * @param[out] destBuf The destination buffer
- * @param[in] dim The width and height of the source image @n
- * The value of the width and height must be equal to or greater than @c 1.
+ * @param[out] destBuf The destination buffer
+ * @param[in] dim The width and the height of the source image @n
+ * The values of the width and the height must be equal to or greater than @c 1.
* @param[in] rotate The rotation type
- * @param[in] pixelFormat The source and destination pixel formats
+ * @param[in] pixelFormat The source and the destination pixel formats
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_INVALID_ARG The specified width and height are invalid, or the size of @c srcBuf or @c destBuf is insufficient.
- * @exception E_INVALID_DATA A source image data in the buffer is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified width and height are invalid.
+ * - The size of the specified @c srcBuf or the specified @c destBuf is insufficient.
+ * @exception E_INVALID_DATA The source image data in the buffer is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, @c MEDIA_PIXEL_FORMAT_BGRA8888, and @c MEDIA_PIXEL_FORMAT_YUV420P.
- * - The position and limit of @c destBuf are set along with the size of the rotated data. @n
- * The dimension of the destination buffer must be calculated by an application.
- * @see ImageRotationType
+ * - The position and the limit of @c destBuf are set along with the size of the rotated data.
+ * - The dimension of the destination buffer must be calculated by the application.
+ * @see ImageRotationType
*/
static result Rotate(const Tizen::Base::ByteBuffer& srcBuf, Tizen::Base::ByteBuffer& destBuf, const Tizen::Graphics::Dimension& dim, ImageRotationType rotate, MediaPixelFormat pixelFormat);
/**
* Flips the image.
*
- * @since 2.0
+ * @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] srcBuf The source buffer
- * @param[out] destBuf The destination buffer
- * @param[in] dim The width and height of the source and destination images @n
- * The value of the width and height must be equal to or greater than @c 1.
+ * @param[out] destBuf The destination buffer
+ * @param[in] dim The width and the height of the source and the destination images @n
+ * The values of the width and the height must be equal to or greater than @c 1.
* @param[in] flip The flip type
- * @param[in] pixelFormat The source and destination pixel formats
+ * @param[in] pixelFormat The source and the destination pixel formats
* @exception E_SUCCESS The method is successful.
* @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
- * @exception E_INVALID_ARG The specified width and height are invalid, or the size of @c srcBuf or @c destBuf is insufficient.
- * @exception E_INVALID_DATA A source image data in the buffer is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified width and height are invalid.
+ * - The size of the specified @c srcBuf or the specified @c destBuf is insufficient.
+ * @exception E_INVALID_DATA The source image data in the buffer is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SYSTEM A system error has occurred.
* @remarks
* - The supported pixel formats are @c MEDIA_PIXEL_FORMAT_RGB565LE, @c MEDIA_PIXEL_FORMAT_BGRA8888, and @c MEDIA_PIXEL_FORMAT_YUV420P.
- * - The position and limit of @c destBuf are set along with the size of the flipped data.
+ * - The position and the limit of @c destBuf are set along with the size of the flipped data.
* @see ImageFlipType
*/
static result Flip(const Tizen::Base::ByteBuffer& srcBuf, Tizen::Base::ByteBuffer& destBuf, const Tizen::Graphics::Dimension& dim, ImageFlipType flip, MediaPixelFormat pixelFormat);
MEDIA_PROPERTY_VIDEO_GOP_SIZE, /**< The video Group of Picture (GOP) size (int) */
MEDIA_PROPERTY_VIDEO_PROFILE, /**< The video profile (int) */
MEDIA_PROPERTY_VIDEO_GOB_SIZE, /**< The video Group of Block (GOB) size (int) */
- MEDIA_PROPERTY_VIDEO_PACKET_SIZE, /**< The video packet size in byte (int) */
+ MEDIA_PROPERTY_VIDEO_PACKET_SIZE, /**< The video packet size in bytes (int) */
MEDIA_PROPERTY_VIDEO_SLICE_SIZE_MODE, /**< The slice mode (::VideoSliceMode) */
- MEDIA_PROPERTY_VIDEO_SLICE_SIZE_IN_BYTE, /**< The size of a video slice in bytes (int) */
+ MEDIA_PROPERTY_VIDEO_SLICE_SIZE_IN_BYTE, /**< The size of the video slice in bytes (int) */
MEDIA_PROPERTY_VIDEO_SLICE_SIZE_IN_MACROBLOCK, /**< The number of macroblocks in a slice (int) */
- MEDIA_PROPERTY_VIDEO_REFERENCE_PICTURE_COUNT, /**< The count of reference picture (int) */
+ MEDIA_PROPERTY_VIDEO_REFERENCE_PICTURE_COUNT, /**< The count of the reference pictures (int) */
MEDIA_PROPERTY_VIDEO_USE_FRAME_SKIP = 0x0200, /**< The media property type that uses the frame skip algorithm (int) */
MEDIA_PROPERTY_VIDEO_USE_DEBLOCKING_FILTER, /**< The media property type that uses the deblocking filter (int) @n
- It enables or disables the deblocking filter. */
+ It enables or disables the deblocking filter */
MEDIA_PROPERTY_VIDEO_USE_AC_PREDICTION, /**< The media property type that uses the AC prediction mode (int) */
MEDIA_PROPERTY_VIDEO_USE_HEADER_EXTENSION_CODE, /**< The media property type that uses the header extension code mode (int) */
- MEDIA_PROPERTY_VIDEO_FORCE_SKIP_FRAME = 0x0300, /**< The media property type that skips the encoding or decoding of the current frame (int) by force */
- MEDIA_PROPERTY_VIDEO_FORCE_INTRA_CODING, /**< The media property type that uses the intra coding for the current frame (int) by force */
+ MEDIA_PROPERTY_VIDEO_FORCE_SKIP_FRAME = 0x0300, /**< The media property type that skips the encoding or decoding of the current frame (int) forcefully */
+ MEDIA_PROPERTY_VIDEO_FORCE_INTRA_CODING, /**< The media property type that uses the intra coding for the current frame (int) forcefully */
- MEDIA_PROPERTY_VIDEO_H264_USE_ANNEX_B = 0x0400, /**< The media property type that uses H.264 Annex B for output bitstream format (int) */
+ MEDIA_PROPERTY_VIDEO_H264_USE_ANNEX_B = 0x0400, /**< The media property type that uses H.264 Annex B for the output bitstream format (int) */
MEDIA_PROPERTY_AUDIO_SAMPLE_RATE = 0x1000, /**< The audio sample rate (int) */
*/
enum VideoSliceMode
{
- VIDEO_SLICE_MODE_NONE = 0x00, /**< The no slicing mode */
+ VIDEO_SLICE_MODE_NONE = 0x00, /**< No slicing mode */
VIDEO_SLICE_MODE_FIXED_MACROBLOCK, /**< The slicing of a video by a fixed number of macroblocks */
VIDEO_SLICE_MODE_FIXED_BYTE, /**< The slicing of a video by a fixed number of bytes */
};
*/
enum VideoPlaneType
{
- VIDEO_PLANE_TYPE_NONE = 0, /**< The no video plane */
+ VIDEO_PLANE_TYPE_NONE = 0, /**< No video plane */
VIDEO_PLANE_TYPE_Y, /**< The Y video plane */
VIDEO_PLANE_TYPE_U, /**< The U video plane */
VIDEO_PLANE_TYPE_V, /**< The V video plane */
{
MEDIA_PIXEL_FORMAT_RGB565LE,
MEDIA_PIXEL_FORMAT_BGRA8888,
+ MEDIA_PIXEL_FORMAT_UYVY422,
MEDIA_PIXEL_FORMAT_YUV420P,
MEDIA_PIXEL_FORMAT_NV12,
MEDIA_PIXEL_FORMAT_NV21,
__pixelFormat = pixelFormat;
SysTryReturn(NID_MEDIA, IsSupportedPixelFormat(pixelFormat) == true , null, E_UNSUPPORTED_FORMAT,
- "[E_UNSUPPORTED_FORMAT] The specified pixelFormat is not supported.")
+ "[E_UNSUPPORTED_FORMAT] The specified pixelFormat is not supported.");
length = _ImageUtil::GetBufferSize(__pixelFormat, __width, __height);
SysTryReturn(NID_MEDIA, length > 0, E_INVALID_ARG, E_INVALID_ARG,