[4.0] Exposing Exif Image metadata
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / pixel-buffer.h
index 91c7161..b062998 100644 (file)
@@ -18,6 +18,7 @@
  *
  */
 
+// INTERNAL INCLUDES
 #include <dali/public-api/images/pixel.h>
 #include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/object/base-handle.h>
@@ -33,6 +34,7 @@ class PixelBuffer;
 }
 }
 
+
 // Use namespace to separate from PixelBuffer typedef in buffer-image.h
 namespace Devel
 {
@@ -170,6 +172,43 @@ public:
    */
   void ApplyMask( PixelBuffer mask, float contentScale=1.0f, bool cropToMask=false );
 
+  /**
+   * Apply a Gaussian blur to this pixel data with the given radius.
+   *
+   * @note A bigger radius will yield a blurrier image. Only works for pixel data in RGBA format.
+   *
+   * @param[in] blurRadius The radius for Gaussian blur. A value of 0 or negative value indicates no blur.
+   */
+  void ApplyGaussianBlur( const float blurRadius );
+
+  /**
+   * @brief Crops this buffer to the given crop rectangle.
+   *
+   * The crop rectangle will be clamped to the edges of the buffer if it is larger.
+   * @param[in] x The top left corner's X
+   * @param[in] y The top left corner's y
+   * @param[in] width The crop width
+   * @param[in] height The crop height
+   */
+  void Crop( uint16_t x, uint16_t y, uint16_t width, uint16_t height );
+
+  /**
+   * @brief Resizes the buffer to the given dimensions.
+   *
+   * Uses either Lanczos4 for downscaling or Mitchell for upscaling
+   * @param[in] width The new width
+   * @param[in] height The new height
+   */
+  void Resize( uint16_t width, uint16_t height );
+
+  /**
+   * Returns Exif metadata as a property map
+   *
+   * @param[out] metadata Property map object to write into
+   * @return True on success
+   */
+  bool GetMetadata( Property::Map& metadata ) const;
+
 public:
 
   /**