Revert "Revert "Revert "[4.0] Exposing Exif Image metadata"""
[platform/core/uifw/dali-adaptor.git] / platform-abstractions / tizen / tizen-platform-abstraction.cpp
index 2bf6e6f..1a8a876 100644 (file)
@@ -28,7 +28,6 @@
 // INTERNAL INCLUDES
 #include "image-loaders/image-loader.h"
 #include "portable/file-reader.h"
-#include <adaptors/common/pixel-buffer-impl.h>
 
 namespace Dali
 {
@@ -70,8 +69,7 @@ Integration::ResourcePointer TizenPlatformAbstraction::LoadImageSynchronously(co
 
 Integration::BitmapPtr TizenPlatformAbstraction::DecodeBuffer( const Integration::BitmapResourceType& resource, uint8_t * buffer, size_t size )
 {
-  Integration::BitmapPtr resultBitmap;
-  Dali::Devel::PixelBuffer bitmap;
+  Integration::BitmapPtr bitmap = 0;
 
   Dali::Internal::Platform::FileReader fileReader( buffer, size );
   FILE * const fp = fileReader.GetFile();
@@ -83,29 +81,9 @@ Integration::BitmapPtr TizenPlatformAbstraction::DecodeBuffer( const Integration
       bitmap.Reset();
       DALI_LOG_WARNING( "Unable to decode bitmap supplied as in-memory blob.\n" );
     }
-    else
-    {
-      Integration::Bitmap::Profile profile{Integration::Bitmap::Profile::BITMAP_2D_PACKED_PIXELS};
-
-      // For backward compatibility the Bitmap must be created
-      auto retval = Integration::Bitmap::New(profile, Dali::ResourcePolicy::OWNED_DISCARD);
-
-      retval->GetPackedPixelsProfile()->ReserveBuffer(
-              bitmap.GetPixelFormat(),
-              bitmap.GetWidth(),
-              bitmap.GetHeight(),
-              bitmap.GetWidth(),
-              bitmap.GetHeight()
-            );
-
-      auto& impl = Dali::GetImplementation(bitmap);
-
-      std::copy( impl.GetBuffer(), impl.GetBuffer()+impl.GetBufferSize(), retval->GetBuffer());
-      resultBitmap.Reset(retval);
-    }
   }
 
-  return resultBitmap;
+  return bitmap;
 }
 
 bool TizenPlatformAbstraction::LoadShaderBinaryFile( const std::string& filename, Dali::Vector< unsigned char >& buffer ) const