// CLASS HEADER
#include "sync-image-loader.h"
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
namespace Dali
SamplingMode::Type samplingMode,
bool orientationCorrection )
{
- BitmapLoader loader = BitmapLoader::New( url, dimensions, fittingMode, samplingMode, orientationCorrection );
-
// Load the image synchronously (block the thread here).
- loader.Load();
-
- return loader.GetPixelData();
+ Devel::PixelBuffer pixelBuffer = Dali::LoadImageFromFile( url, dimensions, fittingMode, samplingMode, orientationCorrection );
+ if( pixelBuffer )
+ {
+ return Devel::PixelBuffer::Convert( pixelBuffer );
+ }
+ return Dali::PixelData(); // return empty handle
}