jpng 0.1.0

Library for handling JPNG images.
Documentation
  • Coverage
  • 33.33%
    7 out of 21 items documented0 out of 12 items with examples
  • Size
  • Source code size: 9.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 404.9 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Roughsketch/jpng
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Roughsketch

jpng

Library for handling JPNG files.

Currently this crate only supports splitting and saving individual parts of the JPNG.

Usage

To create a JPNG, you pass in a path to the constructor.

let jpng = jpng::Jpng::new("example.jpng")?;

This method will fail if the file can't be found, or if the given file is a malformed JPNG. From there, you can save either the image (JPEG), mask (PNG), or the combined image by using the following:

jpng.save("output"); // Save the combined image as the file "output.png"
jpng.save_image("image"); // Save the image portion of the JPNG as "image.jpg"
jpng.save_mask("mask"); // Save the mask portion of the JPNG as "mask.png"