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

Support constructing a planar image from interleaved image #552

Merged
merged 5 commits into from
Jan 30, 2021

Conversation

theroyn
Copy link
Contributor

@theroyn theroyn commented Jan 29, 2021

Description

Due to the different layout of planar images (e.g. rgb8_planar_image_t), construction of them using interleaved images(e.g. rgb8_image_t) failed on std::unintialized_copy() and this workflow needed special care.

This implementation of the constructor does-

  1. allocate buffer according to the interleaved's dimensions.
  2. default-constructs the elements.
  3. copies the interleaved image.

References

fixes #478 which was opened by @mloskot

Tasklist

  • Add test case(s)
  • Ensure all CI builds pass
  • Review and approve

@mloskot mloskot added the cat/enhancement Improvements, but not fixes addressing identified bugs label Jan 29, 2021
Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

The implementation looks good to me. I just offered a few nitpicks :-)

include/boost/gil/algorithm.hpp Outdated Show resolved Hide resolved
include/boost/gil/algorithm.hpp Outdated Show resolved Hide resolved
include/boost/gil/algorithm.hpp Outdated Show resolved Hide resolved
include/boost/gil/algorithm.hpp Outdated Show resolved Hide resolved
@theroyn theroyn requested a review from mloskot January 29, 2021 19:50
@mloskot mloskot added this to the Boost 1.76+ milestone Jan 30, 2021
Copy link
Member

@mloskot mloskot left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you

@mloskot mloskot added cat/bug But reports and bug fixes cat/enhancement Improvements, but not fixes addressing identified bugs and removed cat/enhancement Improvements, but not fixes addressing identified bugs labels Jan 30, 2021
@mloskot mloskot merged commit 2e27642 into boostorg:develop Jan 30, 2021
meshtag pushed a commit to meshtag/gil that referenced this pull request Mar 17, 2021
meshtag pushed a commit to meshtag/gil that referenced this pull request Apr 21, 2021
meshtag pushed a commit to meshtag/gil that referenced this pull request Apr 22, 2021
@mloskot mloskot mentioned this pull request May 12, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/bug But reports and bug fixes cat/enhancement Improvements, but not fixes addressing identified bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rgb8_planar_image_t construction from rgb8_image_t is not supported
2 participants