Tizen::Media::ImageFormat imgFormat;
int imgWidth = 0, imgHeight = 0;
result r = Tizen::Media::ImageBuffer::GetImageInfo(filepath, imgFormat, imgWidth, imgHeight);
+
if (IsFailed(r))
{
- return -1;
+ SetLastResult(E_INVALID_ARG);
+ return -1;
}
- if ((imgWidth < __minSupportedSize || imgHeight < __minSupportedSize) || (imgWidth*imgHeight > __maxSupportedResolution))
+ if ((imgWidth < __minSupportedSize || imgHeight < __minSupportedSize) || (imgWidth * imgHeight > __maxSupportedResolution))
{
- return -1;
+ SetLastResult(E_INVALID_ARG);
+ return -1;
}
Tizen::Media::ImageBuffer imBuf;
r = imBuf.Construct(filepath, null, false);
- if (IsFailed(r))
+
+ if(IsFailed(r))
{
+ SetLastResult(E_INVALID_ARG);
return -1;
}
return -1;
}
- if ((width < __minSupportedSize || height < __minSupportedSize) || (width*height > __maxSupportedResolution))
+ if ((width < __minSupportedSize || height < __minSupportedSize) || (width * height > __maxSupportedResolution))
{
- return -1;
+ SetLastResult(E_INVALID_ARG);
+ return -1;
}
Tizen::Text::Utf8Encoding utf8;