- Vector2 size;
- Internal::ThreadLocalStorage::Get().GetPlatformAbstraction().GetClosestImageSize( buffer, attributes, size );
- image->mWidth = (unsigned int) size.width;
- image->mHeight = (unsigned int) size.height;
+ Dali::Integration::PlatformAbstraction& platformAbstraction = Internal::ThreadLocalStorage::Get().GetPlatformAbstraction();
+ const ImageDimensions expectedSize = platformAbstraction.GetClosestImageSize( buffer, size, fittingMode, samplingMode, orientationCorrection );
+ image->mWidth = (unsigned int) expectedSize.GetWidth();
+ image->mHeight = (unsigned int) expectedSize.GetHeight();