apriltag icon indicating copy to clipboard operation
apriltag copied to clipboard

Replace DEFAULT_ALIGNMENT_* macros with exported constant

Open jerry73204 opened this issue 5 years ago • 1 comments

Hi apriltag devs. I'm working on the Rust bindings for this library, and here is my humble suggestion to better glue the library with Rust bindings.

The image_u8_create() function assumes the default alignment DEFAULT_ALIGNMENT_U8, which is a compile-time macro and is not exported in compiled library. The Rust side has no way take the value, and can only be done by copy-and-paste manner in code. It would be prone to error if these constants change in future releases. It's better to be an extern variable.

jerry73204 avatar Feb 09 '20 07:02 jerry73204

Can you send a PR for this?

christian-rauch avatar Jun 28 '22 13:06 christian-rauch