#define DALI_ANIMATED_IMAGE_LOADING_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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 <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/math/uint-16-pair.h>
#include <dali/public-api/object/base-handle.h>
+#include <dali/public-api/images/image-operations.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
AnimatedImageLoading& operator=(const AnimatedImageLoading& rhs) = default;
/**
- * @brief Destructor
+ * @brief Move constructor.
+ *
+ * @param[in] move The AnimatedImageLoading to move
*/
- ~AnimatedImageLoading();
+ AnimatedImageLoading(AnimatedImageLoading&& move) = default;
/**
- * @brief Load the next N Frames of the animated image.
+ * @brief Move assignment operator
*
- * @note This function will load the entire animated image into memory if not already loaded.
- * @param[in] frameStartIndex The frame counter to start from. Will usually be the next frame
- * after the previous invocation of this method, or 0 to start.
- * @param[in] count The number of frames to load
- * @param[out] pixelData The vector in which to return the frame data
- * @return True if the frame data was successfully loaded
+ * @param[in] rhs The AnimatedImageLoading to move
+ * @return A reference to this
+ */
+ AnimatedImageLoading& operator=(AnimatedImageLoading&& rhs) = default;
+
+ /**
+ * @brief Destructor
*/
- bool LoadNextNFrames(uint32_t frameStartIndex, int count, std::vector<Dali::PixelData>& pixelData);
+ ~AnimatedImageLoading();
/**
* @brief Load a frame of the animated image.
*
* @note This function will load the entire animated image into memory if not already loaded.
* @param[in] frameIndex The frame index to load.
+ * @param[in] size The width and height to fit the loaded image to.
+ * @param[in] fittingMode The FittingMode of the resource to load
+ * @param[in] samplingMode The SamplingMode of the resource to load
+ *
* @return Dali::Devel::PixelBuffer The loaded PixelBuffer. If loading is fail, return empty handle.
*/
-
- Dali::Devel::PixelBuffer LoadFrame(uint32_t frameIndex);
+ Dali::Devel::PixelBuffer LoadFrame(uint32_t frameIndex,
+ ImageDimensions size = ImageDimensions(),
+ Dali::FittingMode::Type fittingMode = Dali::FittingMode::SCALE_TO_FILL,
+ Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::BOX_THEN_LINEAR);
/**
* @brief Get the size of a animated image.