jpeg2k

Crates.iojpeg2k
lib.rsjpeg2k
version0.9.1
sourcesrc
created_at2021-12-28 20:12:51.227715
updated_at2024-07-11 13:21:18.590929
descriptionJPEG 2000 image loader.
homepagehttps://github.com/Neopallium/jpeg2k
repositoryhttps://github.com/Neopallium/jpeg2k
max_upload_size
id504418
size68,726
Robert Gabriel Jakabosky (Neopallium)

documentation

README

jpeg2k

JPEG 2000 image loader.

Example: Convert a Jpeg 2000 image to a png image.

use image::DynamicImage;

use jpeg2k::*;

fn main() {
  // Load jpeg 2000 file from file.
  let jp2_image = Image::from_file("./assets/example.j2k")
		.expect("Failed to load j2k file.");

  // Convert to a `image::DynamicImage`
  let img: DynamicImage = jp2_image.try_into()?;

  // Save as png file.
  img.save("out.png")?;
}
Commit count: 60

cargo fmt