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

Add JxlEncoderUseBoxes for metadata encode #58

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions jpegxl-rs/src/encode.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*
This file is part of jpegxl-rs.

jpegxl-rs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

jpegxl-rs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with jpegxl-rs. If not, see <https://www.gnu.org/licenses/>.
*/
* This file is part of jpegxl-rs.
*
* jpegxl-rs is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* jpegxl-rs is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with jpegxl-rs. If not, see <https://www.gnu.org/licenses/>.
*/

//! Encoder of JPEG XL format

Expand Down Expand Up @@ -395,7 +395,7 @@
self.check_enc_status(unsafe {
JxlEncoderAddBox(
self.enc,
Metadata::box_type(t),
&Metadata::box_type(t),

Check warning on line 398 in jpegxl-rs/src/encode.rs

View check run for this annotation

Codecov / codecov/patch

jpegxl-rs/src/encode.rs#L398

Added line #L398 was not covered by tests
data.as_ptr().cast(),
data.len(),
compress.into(),
Expand Down
32 changes: 16 additions & 16 deletions jpegxl-sys/src/encode.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*
This file is part of jpegxl-sys.

jpegxl-sys is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

jpegxl-sys is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with jpegxl-sys. If not, see <https://www.gnu.org/licenses/>.
*/
* This file is part of jpegxl-rs.
*
* jpegxl-rs is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* jpegxl-rs is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with jpegxl-rs. If not, see <https://www.gnu.org/licenses/>.
*/

use std::ffi::{c_char, c_void};

Expand Down Expand Up @@ -242,7 +242,7 @@ extern "C" {

pub fn JxlEncoderAddBox(
enc: *mut JxlEncoder,
box_type: JxlBoxType,
box_type: *const JxlBoxType,
contents: *const u8,
size: usize,
compress_box: JxlBool,
Expand Down
Loading