Change-Id: I3a3b8bdf037f27ae166b8552ed2e89ed05959751
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
if (aspectOfImageSize > aspectOfDesiredSize)
{
adjustedDesiredWidth = requestedWidth;
- adjustedDesiredHeight = static_cast<uint64_t>(bitmapHeight) * requestedWidth / bitmapWidth;
+ adjustedDesiredHeight = (static_cast<uint64_t>(bitmapHeight) * requestedWidth + bitmapWidth / 2) / bitmapWidth; ///< round up
}
else
{
- adjustedDesiredWidth = static_cast<uint64_t>(bitmapWidth) * requestedHeight / bitmapHeight;
+ adjustedDesiredWidth = (static_cast<uint64_t>(bitmapWidth) * requestedHeight + bitmapHeight / 2) / bitmapHeight; ///< round up
adjustedDesiredHeight = requestedHeight;
}