From 7f53f0a87582d08a15423f0e6d95fe411898f4fc Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sat, 24 Aug 2024 00:35:34 +0000 Subject: [PATCH] add jxl --- Cargo.toml | 8 ++++++++ src/main.rs | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ab49493..b4344e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,9 +3,17 @@ name = "rust_opengl_helloworld" version = "1.0.0" edition = "2021" +[profile.release] +lto = "fat" +panic = "abort" +opt-level = "z" +codegen-units = 1 + [dependencies] gl = "0.14.0" glfw = { version = "0.57.0", features = ["wayland"] } +#jxl-oxide = { version = "0.8.1" } +rav1d = { version = "1.0.0", default-features = false, features = ["bitdepth_8", "bitdepth_16"] } #bytemuck = "1" #ogl33 = { version = "0.2.0", features = ["debug_error_checks"]} #beryllium = "0.13.3" diff --git a/src/main.rs b/src/main.rs index a7d5ecb..8234599 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,7 @@ use std::convert::TryInto; - +// use jxl_oxide::JxlImage; +use rav1d::include::dav1d; +use rav1d; use glfw; use glfw::Context; use gl; @@ -9,6 +11,10 @@ const HEIGHT: u32 = 320; const TITLE: &str = "Hello From OpenGL World!"; fn main() { + // let image = JxlImage::builder().open("combined.jxl").expect("Failed to read image header"); + // println!("{:?}", image.image_header()); // Prints the image header + //let image = dav1d::rav1d_open("combined.avif"); + use glfw::fail_on_errors; let mut glfw = glfw::init(fail_on_errors!()).unwrap(); glfw.window_hint(glfw::WindowHint::ContextVersion(3, 3));