Add SamplingMode type for high quality sampling 69/317969/6
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 23 Sep 2024 07:14:46 +0000 (16:14 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 24 Sep 2024 13:06:45 +0000 (22:06 +0900)
Let we make new enum for lanczos resize method.

Change-Id: I2f7f0db85c33f6d913318b6be90a69217ae68cbe
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/common/image-attributes.cpp
dali/public-api/images/image-operations.h

index 3a3b12e2576c9a2d20b9bf9950a7b6cd8f36b0bf..a92db2afde3d3464eb64e6694a5a780b972be292 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -57,8 +57,8 @@ struct ImageAttributes::ImageAttributesImpl
 
   uint16_t    width;                      ///< image width in pixels
   uint16_t    height;                     ///< image height in pixels
-  ScalingMode scaling : 3;                ///< scaling option, ShrinkToFit is default
-  FilterMode  filtering : 4;              ///< filtering option. Box is the default
+  ScalingMode scaling : 4;                ///< scaling option, ShrinkToFit is default
+  FilterMode  filtering : 5;              ///< filtering option. Box is the default
   bool        mOrientationCorrection : 1; ///< If true, image pixels are reordered according to orientation metadata on load.
 };
 
index 8642976cfd4d91b1d207b78aca5a1a09e0e5fab0..6af7cba54d31438adcc7bcdae3c661133704b71f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_IMAGE_OPERATIONS_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -92,9 +92,9 @@ const Type DEFAULT = SHRINK_TO_FIT;
 namespace SamplingMode
 {
 /**
  * @brief Enumeration for SamplingMode type.
  * @SINCE_1_0.0
  */
+ * @brief Enumeration for SamplingMode type.
+ * @SINCE_1_0.0
+ */
 enum Type
 {
   BOX,              ///< Iteratively box filter to generate an image of 1/2, 1/4,
@@ -119,9 +119,15 @@ enum Type
                     ///  is enabled, the borders of the image may be trimmed to
                     ///  match the aspect ratio of the desired dimensions.
                     ///  @SINCE_1_0.0
-  DONT_CARE         ///< For caching algorithms where a client strongly prefers a
+  DONT_CARE,        ///< For caching algorithms where a client strongly prefers a
                     ///  cache-hit to reuse a cached image.
                     ///  @SINCE_1_0.0
+  LANCZOS,          ///< Use filter with Lanczos resample algorithm.
+                    ///  @SINCE_2_3.43
+  BOX_THEN_LANCZOS, ///< Iteratively box filter to generate an image of 1/2, 1/4,
+                    ///  1/8 etc width and height and approximately the desired
+                    ///  size, then apply Lanczos resample algorithm.
+                    ///  @SINCE_2_3.43
 };
 const Type DEFAULT = BOX;
 } // namespace SamplingMode