Removed BitmapLoader references 60/135660/1
authorDavid Steele <david.steele@samsung.com>
Fri, 23 Jun 2017 16:02:08 +0000 (17:02 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 23 Jun 2017 16:02:08 +0000 (17:02 +0100)
Change-Id: I3b5ef31b0f8655a59c14fbabb1fa98c31699ff3c

examples/cube-transition-effect/cube-transition-effect-example.cpp
examples/renderer-stencil/renderer-stencil-example.cpp
shared/utility.h

index 5f338e4..8d8acbd 100644 (file)
@@ -394,9 +394,9 @@ bool CubeTransitionApp::OnTimerTick()
 Texture CubeTransitionApp::LoadStageFillingTexture( const char* filepath )
 {
   ImageDimensions dimensions( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y );
-  BitmapLoader loader = BitmapLoader::New( filepath, dimensions, FittingMode::SCALE_TO_FILL );
-  loader.Load();
-  PixelData pixelData = loader.GetPixelData();
+  Devel::PixelBuffer pixelBuffer = LoadImageFromFile( filepath, dimensions, FittingMode::SCALE_TO_FILL );
+  PixelData pixelData = Devel::PixelBuffer::Convert(pixelBuffer);
+
   Texture texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
   texture.Upload( pixelData );
   return texture;
index e16cc48..55939d5 100644 (file)
@@ -17,7 +17,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali-toolkit/dali-toolkit.h>
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 
 // INTERNAL INCLUDES
 #include "renderer-stencil-shaders.h"
index 76a814b..3ecab6d 100644 (file)
  */
 
 #include <dali/dali.h>
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/texture.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
 
 namespace DemoHelper
 {
 
-Dali::PixelData LoadPixelData( const char* imagePath,
-                               Dali::ImageDimensions size,
-                               Dali::FittingMode::Type fittingMode,
-                               Dali::SamplingMode::Type samplingMode )
-{
-  Dali::BitmapLoader loader = Dali::BitmapLoader::New( imagePath, size, fittingMode, samplingMode );
-  loader.Load();
-  return loader.GetPixelData();
-}
-
 Dali::Texture LoadTexture( const char* imagePath,
                            Dali::ImageDimensions size = Dali::ImageDimensions(),
                            Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,
                            Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT )
 {
-  Dali::PixelData pixelData = LoadPixelData(imagePath, size, fittingMode, samplingMode);
+  Dali::Devel::PixelBuffer pixelBuffer = LoadImageFromFile(imagePath, size, fittingMode, samplingMode);
   Dali::Texture texture  = Dali::Texture::New( Dali::TextureType::TEXTURE_2D,
-                                               pixelData.GetPixelFormat(),
-                                               pixelData.GetWidth(),
-                                               pixelData.GetHeight() );
+                                               pixelBuffer.GetPixelFormat(),
+                                               pixelBuffer.GetWidth(),
+                                               pixelBuffer.GetHeight() );
+
+  Dali::PixelData pixelData = Dali::Devel::PixelBuffer::Convert(pixelBuffer);
   texture.Upload( pixelData );
 
   return texture;