-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype of using STB rather than FreeImage #590
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Carroll <[email protected]>
@@ -0,0 +1,48 @@ | |||
/* | |||
* Copyright (C) 2023 Open Source Robotics Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (C) 2023 Open Source Robotics Foundation | |
* Copyright (C) 2024 Open Source Robotics Foundation |
|
||
std::shared_ptr<ImageData> ImageLoader::Load(const std::string &_filename) const | ||
{ | ||
std::string fullName = _filename; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <string>
} | ||
|
||
|
||
} // namespace gz::common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} // namespace gz::common | |
} | |
} // namespace gz::common |
@@ -0,0 +1,62 @@ | |||
/* | |||
* Copyright (C) 2023 Open Source Robotics Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (C) 2023 Open Source Robotics Foundation | |
* Copyright (C) 2024 Open Source Robotics Foundation |
{ | ||
struct ImageData | ||
{ | ||
std::string filename {""}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <string>
protected: std::shared_ptr<ImageData> LoadImpl_8bit(const std::string &_filename) const; | ||
protected: std::shared_ptr<ImageData> LoadImpl_16bit(const std::string &_filename) const; | ||
|
||
protected: virtual std::shared_ptr<ImageData> LoadImpl(const std::string &_filename) const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <string>
, <memory>
@@ -0,0 +1,80 @@ | |||
/* | |||
* Copyright (C) 2016 Open Source Robotics Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (C) 2016 Open Source Robotics Foundation | |
* Copyright (C) 2024 Open Source Robotics Foundation |
|
||
class ImageLoaderTest : public common::testing::AutoLogFixture { }; | ||
|
||
const std::string kTestDataGazeboJpeg = // NOLINT(*) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <string>
///////////////////////////////////////////////// | ||
TEST_F(ImageLoaderTest, LoadBmp) | ||
{ | ||
auto loader = std::make_unique<TestImageLoader>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <memory>
{ | ||
auto loader = std::make_unique<TestImageLoader>(); | ||
ASSERT_NE(nullptr, loader->Load(kTestData)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per our discussion in the PMC meeting, this is unlikely to make it into Ionic, so I'll go ahead and remove the |
No description provided.