Revert "Revert "[4.0] Exposing Exif Image metadata""
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-adaptor-internal / image-loaders.h
index 2385104..4c1d34d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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,7 +20,7 @@
 
 #include <dali/dali.h>
 #include <dali/integration-api/bitmap.h>
-#include "platform-abstractions/tizen/resource-loader/resource-loading-client.h"
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include "platform-abstractions/tizen/image-loaders/image-loader-input.h"
 
 // Simple structure to close the file when finished with it.
@@ -67,7 +67,7 @@ struct ImageDetails
   unsigned int reportedWidth;
   unsigned int reportedHeight;
   unsigned int refBufferSize;
-  Dali::PixelBuffer* const refBuffer;
+  Dali::PixelBuffer* refBuffer;
 
 private:
 
@@ -83,7 +83,7 @@ private:
  */
 struct LoadFunctions
 {
-  typedef bool (*LoadBitmapFunction)( const Dali::TizenPlatform::ResourceLoadingClient& client, const Dali::TizenPlatform::ImageLoader::Input& input, Dali::Integration::Bitmap& );
+  typedef bool (*LoadBitmapFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, Dali::Devel::PixelBuffer& );
   typedef bool (*LoadBitmapHeaderFunction)( const Dali::TizenPlatform::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
 
   LoadFunctions( LoadBitmapHeaderFunction _header, LoadBitmapFunction _loader );
@@ -103,6 +103,15 @@ struct LoadFunctions
 void TestImageLoading( const ImageDetails& image, const LoadFunctions& functions, Dali::Integration::Bitmap::Profile bitmapProfile = Dali::Integration::Bitmap::BITMAP_2D_PACKED_PIXELS );
 
 /**
+ * Helper method to compare the resultant loaded image data of the specified image with a golden master data.
+ *
+ * @param[in] image         The image to load
+ * @param[in] functions     The functions to use to load the image
+ * @param[in] master        Golden master data to compare the resultant loaded image with
+ */
+void CompareLoadedImageData( const ImageDetails& image, const LoadFunctions& functions, const uint32_t* master );
+
+/**
  * Helper function which should be used when first creating a reference buffer file.
  * Set output file to a file in the /tmp/ directory e.g:
  *   DumpImageBufferToTempFile( "images/pattern.gif" , "/tmp/pattern.gif.buffer" );