jpeg2k

Crates.iojpeg2k
lib.rsjpeg2k
version0.7.0
sourcesrc
created_at2021-12-28 20:12:51.227715
updated_at2024-04-20 09:12:27.421228
descriptionJPEG 2000 image loader.
homepagehttps://github.com/Neopallium/jpeg2k
repositoryhttps://github.com/Neopallium/jpeg2k
max_upload_size
id504418
size695,327
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: 54

cargo fmt