Make non-animated webp file can be loaded.
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / common / loader-jpeg.h
old mode 100755 (executable)
new mode 100644 (file)
index 987b338..45c99e4
@@ -1,8 +1,8 @@
-#ifndef __DALI_TIZEN_PLATFORM_LOADER_JPEG_H__
-#define __DALI_TIZEN_PLATFORM_LOADER_JPEG_H__
+#ifndef DALI_TIZEN_PLATFORM_LOADER_JPEG_H
+#define DALI_TIZEN_PLATFORM_LOADER_JPEG_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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 <stdio.h>
+#include <dali/devel-api/adaptor-framework/image-loader-input.h>
+#include <dali/internal/legacy/tizen/image-encoder.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/images/pixel.h>
-#include <dali/internal/legacy/tizen/image-encoder.h>
-#include <dali/devel-api/adaptor-framework/image-loader-input.h>
+#include <stdio.h>
 
 namespace Dali
 {
@@ -31,10 +31,8 @@ namespace Devel
 class PixelBuffer;
 }
 
-
 namespace TizenPlatform
 {
-
 class ResourceLoadingClient;
 
 namespace Jpeg
@@ -50,7 +48,7 @@ const unsigned char MAGIC_BYTE_2 = 0xD8;
  * @param[out] bitmap The bitmap class where the decoded image will be stored
  * @return  true if file decoded successfully, false otherwise
  */
-bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap );
+bool LoadBitmapFromJpeg(const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& bitmap);
 
 /**
  * Loads the header of a JPEG file and fills in the width and height appropriately.
@@ -63,7 +61,7 @@ bool LoadBitmapFromJpeg( const Dali::ImageLoader::Input& input, Dali::Devel::Pix
  * @param[in/out]  height  Is set with the height of the image
  * @return true if the file's header was read successully, false otherwise
  */
-bool LoadJpegHeader( const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height );
+bool LoadJpegHeader(const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height);
 
 /**
  * Encode raw pixel data to JPEG format.
@@ -74,10 +72,10 @@ bool LoadJpegHeader( const Dali::ImageLoader::Input& input, unsigned int& width,
  * @param[in]  pixelFormat    Input pixel format (must be Pixel::RGB888)
  * @param[in]  quality        JPEG quality on usual 1 to 100 scale.
  */
-bool EncodeToJpeg(const unsigned char* pixelBuffer, Vector< unsigned char >& encodedPixels, std::size_t width, std::size_t height, Pixel::Format pixelFormat, unsigned quality = 80);
+bool EncodeToJpeg(const unsigned char* pixelBuffer, Vector<unsigned char>& encodedPixels, std::size_t width, std::size_t height, Pixel::Format pixelFormat, unsigned quality = 80);
 
 } // namespace TizenPlatform
 
 } // namespace Dali
 
-#endif // __DALI_TIZEN_PLATFORM_LOADER_JPEG_H__
+#endif // DALI_TIZEN_PLATFORM_LOADER_JPEG_H