Removed unused params & revised docstring
This commit is contained in:
@@ -37,14 +37,14 @@ namespace data {
|
||||
* @return Boolean value indicating success if it is an image.
|
||||
*/
|
||||
inline bool ImageFormatSupported(const std::string& fileName,
|
||||
bool save = false);
|
||||
const bool save = false);
|
||||
|
||||
class ImageInfo
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Instantiate the ImageInfo object with the given image width, height,
|
||||
* channels parameter.
|
||||
* number of channels and quality parameter.
|
||||
*
|
||||
* @param width Image width.
|
||||
* @param height Image height.
|
||||
@@ -88,12 +88,6 @@ class ImageInfo
|
||||
|
||||
// Compression of the image if saved as jpg (0 - 100).
|
||||
size_t quality;
|
||||
|
||||
// Image format.
|
||||
std::string format;
|
||||
|
||||
// Flip the image vertical upon loading/saving.
|
||||
bool flipVertical;
|
||||
};
|
||||
|
||||
} // namespace data
|
||||
|
||||
@@ -27,7 +27,7 @@ static const std::vector<std::string> loadFileTypes({"jpg", "png", "tga",
|
||||
static const std::vector<std::string> saveFileTypes({"jpg", "png", "tga",
|
||||
"bmp", "hdr"});
|
||||
|
||||
inline bool ImageFormatSupported(const std::string& fileName, bool save)
|
||||
inline bool ImageFormatSupported(const std::string& fileName, const bool save)
|
||||
{
|
||||
if (save)
|
||||
{
|
||||
@@ -58,9 +58,7 @@ inline ImageInfo::ImageInfo(const size_t width,
|
||||
width(width),
|
||||
height(height),
|
||||
channels(channels),
|
||||
quality(quality),
|
||||
format(""),
|
||||
flipVertical(true)
|
||||
quality(quality)
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ using namespace std;
|
||||
BOOST_AUTO_TEST_SUITE(ImageLoadTest);
|
||||
|
||||
/**
|
||||
* Test the invalid extension.
|
||||
* Test if an image with an unsupported extension throws an expected
|
||||
* exception.
|
||||
*/
|
||||
BOOST_AUTO_TEST_CASE(LoadInvalidExtensionFile)
|
||||
{
|
||||
@@ -33,7 +34,7 @@ BOOST_AUTO_TEST_CASE(LoadInvalidExtensionFile)
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the images is loaded correctly into the matrix using the API.
|
||||
* Test that the image is loaded correctly into the matrix using the API.
|
||||
*/
|
||||
BOOST_AUTO_TEST_CASE(LoadImageAPITest)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user