Exposing Exif Image metadata
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / pixel-buffer.h
index dfe228b..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
 {
@@ -179,6 +181,34 @@ public:
    */
   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:
 
   /**