Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjcarroll
Copy link
Contributor

No description provided.

@@ -0,0 +1,48 @@
/*
* Copyright (C) 2023 Open Source Robotics Foundation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <string>

Comment on lines +45 to +48
}


} // namespace gz::common
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
} // namespace gz::common
}
} // namespace gz::common

@@ -0,0 +1,62 @@
/*
* Copyright (C) 2023 Open Source Robotics Foundation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (C) 2023 Open Source Robotics Foundation
* Copyright (C) 2024 Open Source Robotics Foundation

{
struct ImageData
{
std::string filename {""};
Copy link
Contributor

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;
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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(*)
Copy link
Contributor

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>();
Copy link
Contributor

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));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
@azeey
Copy link
Contributor

azeey commented Aug 12, 2024

Per our discussion in the PMC meeting, this is unlikely to make it into Ionic, so I'll go ahead and remove the beta label.

@azeey azeey removed the beta Targeting beta release of upcoming collection label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants