-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix the textures loading in .glb file #5443
Conversation
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
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.
Reviewed 2 of 4 files at r1.
Reviewable status: 2 of 4 files reviewed, 2 unresolved discussions (waiting on @errissa and @ZhengyuDiao)
cpp/open3d/io/ImageIO.h
line 55 at r1 (raw file):
/// The function calls read functions based on format of image. /// \return return true if the read function is successful, false otherwise. bool ReadImageFromMemroy(const std::string &image_format,
Spelling error with Memroy
-> Memory
cpp/open3d/io/ImageIO.cpp
line 114 at r1 (raw file):
} bool ReadImageFromMemroy(const std::string &image_format,
Same spelling error - see above.
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.
Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @errissa)
cpp/open3d/io/ImageIO.h
line 55 at r1 (raw file):
Previously, errissa (Rene) wrote…
Spelling error with
Memroy
->Memory
Done.
cpp/open3d/io/ImageIO.cpp
line 114 at r1 (raw file):
Previously, errissa (Rene) wrote…
Same spelling error - see above.
Done.
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.
Reviewed 2 of 4 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @errissa and @ZhengyuDiao)
cpp/open3d/io/ImageIO.h
line 55 at r2 (raw file):
/// The function calls read functions based on format of image. /// \return return true if the read function is successful, false otherwise. bool ReadImageFromMemory(const std::string &image_format,
- Use the
\param
tag to describe each parameter. - I would also specify what
image_format
can be in the doc strings.
cpp/open3d/io/file_format/FileASSIMP.cpp
line 27 at r2 (raw file):
// ---------------------------------------------------------------------------- #include <png.h>
we can move this header to the image reader function, it should be possible to remove the header in fileassimp.cpp
cpp/open3d/io/file_format/FileASSIMP.cpp
line 101 at r2 (raw file):
auto image = io::CreateImageFromMemory( "png", reinterpret_cast<const unsigned char*>(
Pointer cast can be static_cast
. If static_cast
works, prefer static_cast
to reinterpret_cast
.
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.
Reviewable status: 1 of 5 files reviewed, 5 unresolved discussions (waiting on @errissa and @yxlao)
cpp/open3d/io/ImageIO.h
line 55 at r2 (raw file):
Previously, yxlao (Yixing Lao) wrote…
- Use the
\param
tag to describe each parameter.- I would also specify what
image_format
can be in the doc strings.
Done.
cpp/open3d/io/file_format/FileASSIMP.cpp
line 27 at r2 (raw file):
Previously, yxlao (Yixing Lao) wrote…
we can move this header to the image reader function, it should be possible to remove the header in fileassimp.cpp
Done.
cpp/open3d/io/file_format/FileASSIMP.cpp
line 101 at r2 (raw file):
Previously, yxlao (Yixing Lao) wrote…
Pointer cast can be
static_cast
. Ifstatic_cast
works, preferstatic_cast
toreinterpret_cast
.
static_cast
doesn't work here.
|
Now both .png and .jpg textures are supported.
This change is