From f2a4ba7cc5b81699949218e352d88dd071e48f0a Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Fri, 10 Apr 2020 21:52:56 +0900 Subject: [PATCH] To set saved jpeg image quality of Capture - Adds parameter at the Capture::Start to control saved jpeg quality Change-Id: I9b0edc0e22e77672a7acf460303585ee4ebcdc3b Signed-off-by: Seungho, Baek --- dali/devel-api/adaptor-framework/bitmap-saver.cpp | 19 +++++++--- dali/devel-api/adaptor-framework/bitmap-saver.h | 25 ++++++++++++- .../native-image-source-devel.cpp | 5 +++ .../adaptor-framework/native-image-source-devel.h | 13 +++++++ .../android/native-image-source-impl-android.cpp | 14 -------- .../android/native-image-source-impl-android.h | 7 +--- .../imaging/common/native-image-source-impl.h | 41 ++++++++++++++++++---- .../tizen/native-image-source-impl-tizen.cpp | 24 +++---------- .../imaging/tizen/native-image-source-impl-tizen.h | 9 ++--- .../ubuntu-x11/native-image-source-impl-x.cpp | 14 -------- .../ubuntu-x11/native-image-source-impl-x.h | 7 +--- .../windows/native-image-source-impl-win.cpp | 14 -------- .../imaging/windows/native-image-source-impl-win.h | 7 +--- dali/internal/system/common/capture-impl.cpp | 15 ++++++-- dali/internal/system/common/capture-impl.h | 9 +++++ .../adaptor-framework/native-image-source.cpp | 4 +-- dali/public-api/capture/capture.cpp | 5 +++ dali/public-api/capture/capture.h | 15 +++++++- 18 files changed, 143 insertions(+), 104 deletions(-) diff --git a/dali/devel-api/adaptor-framework/bitmap-saver.cpp b/dali/devel-api/adaptor-framework/bitmap-saver.cpp index c39bb70..68adfc7 100644 --- a/dali/devel-api/adaptor-framework/bitmap-saver.cpp +++ b/dali/devel-api/adaptor-framework/bitmap-saver.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -91,13 +91,14 @@ bool EncodeToFormat( const unsigned char* pixelBuffer, FileFormat formatEncoding, std::size_t width, std::size_t height, - Pixel::Format pixelFormat ) + Pixel::Format pixelFormat, + const uint32_t quality ) { switch( formatEncoding ) { case JPG_FORMAT: { - return TizenPlatform::EncodeToJpeg( pixelBuffer, encodedPixels, width, height, pixelFormat ); + return TizenPlatform::EncodeToJpeg( pixelBuffer, encodedPixels, width, height, pixelFormat, quality ); break; } case PNG_FORMAT: @@ -122,10 +123,20 @@ bool EncodeToFile(const unsigned char* const pixelBuffer, const std::size_t width, const std::size_t height ) { + return EncodeToFile( pixelBuffer, filename, pixelFormat, width, height, DEFAULT_JPG_QUALITY ); +} + +bool EncodeToFile(const unsigned char* const pixelBuffer, + const std::string& filename, + const Pixel::Format pixelFormat, + const std::size_t width, + const std::size_t height, + const uint32_t quality ) +{ DALI_ASSERT_DEBUG(pixelBuffer != 0 && filename.size() > 4 && width > 0 && height > 0); Vector< unsigned char > pixbufEncoded; const FileFormat format = GetFormatFromFileName( filename ); - const bool encodeResult = EncodeToFormat( pixelBuffer, pixbufEncoded, format, width, height, pixelFormat ); + const bool encodeResult = EncodeToFormat( pixelBuffer, pixbufEncoded, format, width, height, pixelFormat, quality ); if(!encodeResult) { DALI_LOG_ERROR("Encoding pixels failed\n"); diff --git a/dali/devel-api/adaptor-framework/bitmap-saver.h b/dali/devel-api/adaptor-framework/bitmap-saver.h index e1f6ab7..1a5a8b1 100755 --- a/dali/devel-api/adaptor-framework/bitmap-saver.h +++ b/dali/devel-api/adaptor-framework/bitmap-saver.h @@ -2,7 +2,7 @@ #define DALI_ADAPTOR_BITMAP_SAVER_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -27,6 +27,8 @@ namespace Dali { +static constexpr uint32_t DEFAULT_JPG_QUALITY = 100; + /** * Store the given pixel data to a file. * The suffix of the filename determines what type of file will be stored, @@ -46,6 +48,27 @@ DALI_ADAPTOR_API bool EncodeToFile(const unsigned char* const pixelBuffer, const std::size_t width, const std::size_t height); +/** + * Store the given pixel data to a file. + * The suffix of the filename determines what type of file will be stored, + * currently only jpeg and png formats are supported. + * + * @param[in] pixelBuffer Pointer to the pixel data + * @param[in] filename Filename to save + * @param[in] pixelFormat The format of the buffer's pixels + * @param[in] width The width of the image in pixels + * @param[in] height The height of the image in pixels + * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100] + * + * @return true if the file was saved + */ +DALI_ADAPTOR_API bool EncodeToFile(const unsigned char* const pixelBuffer, + const std::string& filename, + const Pixel::Format pixelFormat, + const std::size_t width, + const std::size_t height, + const uint32_t quality); + } // namespace Dali diff --git a/dali/devel-api/adaptor-framework/native-image-source-devel.cpp b/dali/devel-api/adaptor-framework/native-image-source-devel.cpp index 3072690..3250d44 100755 --- a/dali/devel-api/adaptor-framework/native-image-source-devel.cpp +++ b/dali/devel-api/adaptor-framework/native-image-source-devel.cpp @@ -28,6 +28,11 @@ namespace Dali namespace DevelNativeImageSource { +bool EncodeToFile( NativeImageSource& image, const std::string& filename, const uint32_t quality ) +{ + return Dali::Internal::Adaptor::NativeImageSource::GetImplementation( image ).EncodeToFile( filename, quality ); +} + uint8_t* AcquireBuffer( NativeImageSource& image, uint16_t& width, uint16_t& height, uint16_t& stride ) { return Dali::Internal::Adaptor::NativeImageSource::GetImplementation( image ).AcquireBuffer( width, height, stride ); diff --git a/dali/devel-api/adaptor-framework/native-image-source-devel.h b/dali/devel-api/adaptor-framework/native-image-source-devel.h index 0c470c8..eeea436 100755 --- a/dali/devel-api/adaptor-framework/native-image-source-devel.h +++ b/dali/devel-api/adaptor-framework/native-image-source-devel.h @@ -27,6 +27,19 @@ namespace DevelNativeImageSource { /** + * @brief Converts the current pixel contents to either a JPEG or PNG format + * and write that to the filesystem. + * + * @param[in] image The instance of NativeImageSource. + * @param[in] filename Identify the filesystem location at which to write the encoded image. + * The extension determines the encoding used. + * The two valid encoding are (".jpeg"|".jpg") and ".png". + * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100] + * @return @c true if the pixels were written, and @c false otherwise + */ +DALI_ADAPTOR_API bool EncodeToFile( NativeImageSource& image, const std::string& filename, const uint32_t quality ); + +/** * @brief Acquire buffer and information of an internal native image. * * AcquireBuffer() and ReleaseBuffer() are a pair. diff --git a/dali/internal/imaging/android/native-image-source-impl-android.cpp b/dali/internal/imaging/android/native-image-source-impl-android.cpp index 53fdc8c..19312b5 100755 --- a/dali/internal/imaging/android/native-image-source-impl-android.cpp +++ b/dali/internal/imaging/android/native-image-source-impl-android.cpp @@ -29,7 +29,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include @@ -191,19 +190,6 @@ bool NativeImageSourceAndroid::GetPixels(std::vector& pixbuf, uns return success; } -bool NativeImageSourceAndroid::EncodeToFile(const std::string& filename) const -{ - std::vector< unsigned char > pixbuf; - unsigned int width(0), height(0); - Pixel::Format pixelFormat; - - if( GetPixels( pixbuf, width, height, pixelFormat ) ) - { - return Dali::EncodeToFile( &pixbuf[0], filename, pixelFormat, width, height ); - } - return false; -} - void NativeImageSourceAndroid::SetSource( Any source ) { if( mPixmap ) diff --git a/dali/internal/imaging/android/native-image-source-impl-android.h b/dali/internal/imaging/android/native-image-source-impl-android.h index 7d941ca..3b68f1c 100755 --- a/dali/internal/imaging/android/native-image-source-impl-android.h +++ b/dali/internal/imaging/android/native-image-source-impl-android.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -69,11 +69,6 @@ public: bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - bool EncodeToFile(const std::string& filename) const override; - - /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) */ void SetSource( Any source ) override; diff --git a/dali/internal/imaging/common/native-image-source-impl.h b/dali/internal/imaging/common/native-image-source-impl.h index d5f292f..0833f51 100755 --- a/dali/internal/imaging/common/native-image-source-impl.h +++ b/dali/internal/imaging/common/native-image-source-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_IMPL_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -20,6 +20,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -37,6 +38,8 @@ class NativeImageSource { public: + static constexpr uint32_t DEFAULT_QUALITY = 100; + /** * Create a new NativeImageSource internally. * Depending on hardware the width and height may have to be a power of two. @@ -61,11 +64,6 @@ public: virtual bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const = 0; /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - virtual bool EncodeToFile(const std::string& filename) const = 0; - - /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) */ virtual void SetSource( Any source ) = 0; @@ -130,6 +128,37 @@ public: */ virtual bool ReleaseBuffer() = 0; + /** + * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) + */ + inline bool EncodeToFile( const std::string& filename ) const + { + return EncodeToFile( filename, DEFAULT_QUALITY ); + } + + /** + * @brief Converts the current pixel contents to either a JPEG or PNG format + * and write that to the filesystem. + * + * @param[in] filename Identify the filesystem location at which to write the encoded image. + * The extension determines the encoding used. + * The two valid encoding are (".jpeg"|".jpg") and ".png". + * @param[in] quality The quality of encoded jpeg image + * @return @c true if the pixels were written, and @c false otherwise + */ + inline bool EncodeToFile( const std::string& filename, const uint32_t quality ) const + { + std::vector< uint8_t > pixbuf; + uint32_t width( 0 ), height( 0 ); + Pixel::Format pixelFormat; + + if( GetPixels( pixbuf, width, height, pixelFormat ) ) + { + return Dali::EncodeToFile( &pixbuf[0], filename, pixelFormat, width, height, quality ); + } + return false; + } + public: inline static Internal::Adaptor::NativeImageSource& GetImplementation( Dali::NativeImageSource& image ) { return *image.mImpl; } }; diff --git a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp index 2682522..096944c 100755 --- a/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp +++ b/dali/internal/imaging/tizen/native-image-source-impl-tizen.cpp @@ -30,9 +30,6 @@ #include #include -// Allow this to be encoded and saved: -#include - namespace Dali { @@ -301,10 +298,10 @@ bool NativeImageSourceTizen::GetPixels(std::vector& pixbuf, unsig { cOffset = c*4; offset = cOffset + r*stride; - *(bufptr+cOffset) = ptr[offset]; - *(bufptr+cOffset+1) = ptr[offset+3]; - *(bufptr+cOffset+2) = ptr[offset+2]; - *(bufptr+cOffset+3) = ptr[offset+1]; + *(bufptr+cOffset) = ptr[offset+2]; + *(bufptr+cOffset+1) = ptr[offset+1]; + *(bufptr+cOffset+2) = ptr[offset]; + *(bufptr+cOffset+3) = ptr[offset+3]; } } break; @@ -333,19 +330,6 @@ bool NativeImageSourceTizen::GetPixels(std::vector& pixbuf, unsig return false; } -bool NativeImageSourceTizen::EncodeToFile(const std::string& filename) const -{ - std::vector< unsigned char > pixbuf; - unsigned int width(0), height(0); - Pixel::Format pixelFormat; - - if(GetPixels(pixbuf, width, height, pixelFormat)) - { - return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height); - } - return false; -} - void NativeImageSourceTizen::SetSource( Any source ) { Dali::Mutex::ScopedLock lock( mMutex ); diff --git a/dali/internal/imaging/tizen/native-image-source-impl-tizen.h b/dali/internal/imaging/tizen/native-image-source-impl-tizen.h index d40142c..9264a25 100755 --- a/dali/internal/imaging/tizen/native-image-source-impl-tizen.h +++ b/dali/internal/imaging/tizen/native-image-source-impl-tizen.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_IMPL_TIZEN_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -69,12 +69,7 @@ public: /** * @copydoc Dali::NativeImageSource::GetPixels() */ - bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; - - /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - bool EncodeToFile(const std::string& filename) const override; + bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp index 51c89d3..c222d3b 100755 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include namespace Dali @@ -264,19 +263,6 @@ bool NativeImageSourceX::GetPixels(std::vector& pixbuf, unsigned& return success; } -bool NativeImageSourceX::EncodeToFile(const std::string& filename) const -{ - std::vector< unsigned char > pixbuf; - unsigned int width(0), height(0); - Pixel::Format pixelFormat; - - if(GetPixels(pixbuf, width, height, pixelFormat)) - { - return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height); - } - return false; -} - void NativeImageSourceX::SetSource( Any source ) { mPixmap = GetPixmapFromAny( source ); diff --git a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h index 5306938..1f37eaa 100755 --- a/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h +++ b/dali/internal/imaging/ubuntu-x11/native-image-source-impl-x.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -69,11 +69,6 @@ public: bool GetPixels(std::vector &pixbuf, uint32_t &width, uint32_t &height, Pixel::Format& pixelFormat ) const override; /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - bool EncodeToFile(const std::string& filename) const override; - - /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) */ void SetSource( Any source ) override; diff --git a/dali/internal/imaging/windows/native-image-source-impl-win.cpp b/dali/internal/imaging/windows/native-image-source-impl-win.cpp index 12db4fd..aabcdff 100755 --- a/dali/internal/imaging/windows/native-image-source-impl-win.cpp +++ b/dali/internal/imaging/windows/native-image-source-impl-win.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include namespace Dali @@ -119,19 +118,6 @@ bool NativeImageSourceWin::GetPixels(std::vector& pixbuf, unsigned& wid return success; } -bool NativeImageSourceWin::EncodeToFile(const std::string& filename) const -{ - std::vector< uint8_t > pixbuf; - uint32_t width(0), height(0); - Pixel::Format pixelFormat; - - if(GetPixels(pixbuf, width, height, pixelFormat)) - { - return Dali::EncodeToFile(&pixbuf[0], filename, pixelFormat, width, height); - } - return false; -} - void NativeImageSourceWin::SetSource( Any source ) { mPixmap = GetPixmapFromAny( source ); diff --git a/dali/internal/imaging/windows/native-image-source-impl-win.h b/dali/internal/imaging/windows/native-image-source-impl-win.h index 6fe3fab..bc2a257 100755 --- a/dali/internal/imaging/windows/native-image-source-impl-win.h +++ b/dali/internal/imaging/windows/native-image-source-impl-win.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -64,11 +64,6 @@ public: bool GetPixels(std::vector &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const override; /** - * @copydoc Dali::NativeImageSource::EncodeToFile(const std::string& ) - */ - bool EncodeToFile(const std::string& filename) const override; - - /** * @copydoc Dali::NativeImageSource::SetSource( Any source ) */ void SetSource( Any source ) override; diff --git a/dali/internal/system/common/capture-impl.cpp b/dali/internal/system/common/capture-impl.cpp index 8dc77b9..2724dd2 100644 --- a/dali/internal/system/common/capture-impl.cpp +++ b/dali/internal/system/common/capture-impl.cpp @@ -28,6 +28,7 @@ // INTERNAL INCLUDES #include +#include namespace { @@ -44,7 +45,8 @@ namespace Adaptor { Capture::Capture() -: mTimer(), +: mQuality( DEFAULT_QUALITY ), + mTimer(), mPath(), mNativeImageSourcePtr( NULL ), mFileSave( false ) @@ -52,7 +54,8 @@ Capture::Capture() } Capture::Capture( Dali::CameraActor cameraActor ) -: mCameraActor( cameraActor ), +: mQuality( DEFAULT_QUALITY ), + mCameraActor( cameraActor ), mTimer(), mPath(), mNativeImageSourcePtr( NULL ), @@ -79,6 +82,12 @@ CapturePtr Capture::New( Dali::CameraActor cameraActor ) return pWorker; } +void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor, const uint32_t quality ) +{ + mQuality = quality; + Start( source, size, path, clearColor ); +} + void Capture::Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor ) { DALI_ASSERT_ALWAYS(path.size() > 4 && "Path is invalid."); @@ -306,7 +315,7 @@ bool Capture::SaveFile() { DALI_ASSERT_ALWAYS(mNativeImageSourcePtr && "mNativeImageSourcePtr is NULL"); - return mNativeImageSourcePtr->EncodeToFile( mPath ); + return Dali::DevelNativeImageSource::EncodeToFile( *mNativeImageSourcePtr, mPath, mQuality ); } } // End of namespace Adaptor diff --git a/dali/internal/system/common/capture-impl.h b/dali/internal/system/common/capture-impl.h index 61e116a..11c29e9 100644 --- a/dali/internal/system/common/capture-impl.h +++ b/dali/internal/system/common/capture-impl.h @@ -48,6 +48,9 @@ typedef IntrusivePtr CapturePtr; class Capture : public BaseObject, public ConnectionTracker { public: + + static constexpr uint32_t DEFAULT_QUALITY = 100; + /** * @brief Constructor. */ @@ -68,6 +71,11 @@ public: /** * @copydoc Dali::Capture::Start */ + void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor, const uint32_t quality ); + + /** + * @copydoc Dali::Capture::Start + */ void Start( Dali::Actor source, const Dali::Vector2& size, const std::string &path, const Dali::Vector4& clearColor ); /** @@ -186,6 +194,7 @@ private: Capture& operator=( const Capture& rhs ); private: + uint32_t mQuality; Dali::Texture mNativeTexture; Dali::FrameBuffer mFrameBuffer; Dali::RenderTask mRenderTask; diff --git a/dali/public-api/adaptor-framework/native-image-source.cpp b/dali/public-api/adaptor-framework/native-image-source.cpp index 9672c60..5aa9262 100755 --- a/dali/public-api/adaptor-framework/native-image-source.cpp +++ b/dali/public-api/adaptor-framework/native-image-source.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -53,7 +53,7 @@ bool NativeImageSource::GetPixels( std::vector &pixbuf, unsigned bool NativeImageSource::EncodeToFile(const std::string& filename) const { - return mImpl->EncodeToFile(filename); + return mImpl->EncodeToFile( filename ); } void NativeImageSource::SetSource( Any source ) diff --git a/dali/public-api/capture/capture.cpp b/dali/public-api/capture/capture.cpp index 701db7d..ca7c098 100644 --- a/dali/public-api/capture/capture.cpp +++ b/dali/public-api/capture/capture.cpp @@ -62,6 +62,11 @@ Capture& Capture::operator=( const Capture& rhs ) return *this; } +void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality ) +{ + GetImpl( *this ).Start( source, size, path, clearColor, quality ); +} + void Capture::Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor ) { GetImpl( *this ).Start( source, size, path, clearColor ); diff --git a/dali/public-api/capture/capture.h b/dali/public-api/capture/capture.h index c1696f3..29ee5b5 100755 --- a/dali/public-api/capture/capture.h +++ b/dali/public-api/capture/capture.h @@ -171,6 +171,19 @@ public: /** * @brief Start capture and save the image as a file. * + * @SINCE_1_5.11 + * + * @param[in] source source actor to be used for capture. + * @param[in] size captured size. + * @param[in] path image file path to be saved as a file. + * @param[in] clearColor background color of captured scene + * @param[in] quality The value to control image quality for jpeg file format in the range [1, 100] + */ + void Start( Actor source, const Vector2& size, const std::string &path, const Vector4& clearColor, const uint32_t quality ); + + /** + * @brief Start capture and save the image as a file. + * * @SINCE_1_3_4 * * @param[in] source source actor to be used for capture. @@ -195,7 +208,7 @@ public: /** * @brief Get NativeImageSourcePtr that is saved captured image. * - * @SINCE_1_5_10 + * @SINCE_1_5.10 */ Dali::NativeImageSourcePtr GetNativeImageSource() const; -- 2.7.4