openjp2 0.6.1

Rust port of Openjpeg.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
macro_rules! fprintf {
  ($file:expr, $fmt:expr, $($arg:expr),* $(,)?) => {
    let s = ::sprintf::sprintf!($fmt, $($arg),*);
    match &s {
      Ok(s) => {
        let bytes = s.as_bytes();
        let len = bytes.len();
        let nb = libc::fwrite(bytes.as_ptr() as *const libc::c_void, 1, len, $file);
        nb
      },
      Err(err) => {
        log::error!("sprintf failed: {err:?}");
        0
      }
    }
  };
}