From 79ff0dfdf9a21903b98e502ea8cee19174f44a4c Mon Sep 17 00:00:00 2001 From: Sunghyun kim Date: Tue, 22 Jan 2019 11:01:36 +0900 Subject: [PATCH] Add api for get original image size Change-Id: I3a137213ffcfc19f0bdaf429023355e9e5479d2d --- dali/devel-api/adaptor-framework/image-loading.cpp | 4 ++++ dali/devel-api/adaptor-framework/image-loading.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/dali/devel-api/adaptor-framework/image-loading.cpp b/dali/devel-api/adaptor-framework/image-loading.cpp index af05256..aed3189 100644 --- a/dali/devel-api/adaptor-framework/image-loading.cpp +++ b/dali/devel-api/adaptor-framework/image-loading.cpp @@ -67,6 +67,10 @@ ImageDimensions GetClosestImageSize( const std::string& filename, return dimension; } +ImageDimensions GetOriginalImageSize( const std::string& filename ) +{ + return TizenPlatform::ImageLoader::GetClosestImageSize( filename, ImageDimensions(0, 0), FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true ); +} Devel::PixelBuffer DownloadImageSynchronously( const std::string& url, ImageDimensions size, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, bool orientationCorrection ) { diff --git a/dali/devel-api/adaptor-framework/image-loading.h b/dali/devel-api/adaptor-framework/image-loading.h index a7995ba..7230a19 100755 --- a/dali/devel-api/adaptor-framework/image-loading.h +++ b/dali/devel-api/adaptor-framework/image-loading.h @@ -72,6 +72,15 @@ DALI_ADAPTOR_API ImageDimensions GetClosestImageSize( bool orientationCorrection = true ); /** + * @brief Get the size of an original image + * @param[in] filename name of the image. + * + * @return dimensions to original image + */ +DALI_ADAPTOR_API ImageDimensions GetOriginalImageSize( + const std::string& filename); + +/** * @brief Load an image synchronously from a remote resource. * * @param [in] url The URL of the image file to load. -- 2.7.4