Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / image-loader / sync-image-loader.cpp
index e8f8ad7..c035488 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
 #include "sync-image-loader.h"
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 
-
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace SyncImageLoader
 {
-
-
-PixelData Load( const std::string& url )
+PixelData Load(const std::string& url)
 {
-  return Load( url, ImageDimensions(), FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true );
+  return Load(url, ImageDimensions(), FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true);
 }
 
-PixelData Load( const std::string& url, ImageDimensions dimensions )
+PixelData Load(const std::string& url, ImageDimensions dimensions)
 {
-  return Load( url, dimensions, FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true );
+  return Load(url, dimensions, FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true);
 }
 
-PixelData Load( const std::string& url,
-                ImageDimensions dimensions,
-                FittingMode::Type fittingMode,
-                SamplingMode::Type samplingMode,
-                bool orientationCorrection )
+PixelData Load(const std::string& url,
+               ImageDimensions    dimensions,
+               FittingMode::Type  fittingMode,
+               SamplingMode::Type samplingMode,
+               bool               orientationCorrection)
 {
   // Load the image synchronously (block the thread here).
-  Devel::PixelBuffer pixelBuffer = Dali::LoadImageFromFile( url, dimensions, fittingMode, samplingMode, orientationCorrection );
-  if( pixelBuffer )
+  Devel::PixelBuffer pixelBuffer = Dali::LoadImageFromFile(url, dimensions, fittingMode, samplingMode, orientationCorrection);
+  if(pixelBuffer)
   {
-    return Devel::PixelBuffer::Convert( pixelBuffer );
+    return Devel::PixelBuffer::Convert(pixelBuffer);
   }
   return Dali::PixelData(); // return empty handle
 }
 
-
 } // namespace SyncImageLoader
 
 } // namespace Toolkit