Crate bevy_jpeg2k

source ·
Expand description

§Bevy JPEG 2000 Asset loader.

JPEG 2000 image loader for Bevy.

§Example

use bevy::prelude::*;

use bevy_jpeg2k::*;

fn main() {
  App::new()
    .add_plugins(DefaultPlugins)

    // Load the Jpeg 2000 asset loader plugin.
    .add_plugins(Jpeg2KPlugin)

    .add_systems(Startup, setup)
    .run();
}

fn setup(
  asset_server: Res<AssetServer>,
) {
  // Load j2k, jp2, j2c, images.
  let image_handle: Handle<Image> = asset_server.load("example.j2k");
  // <Use the image handle>
}

Structs§

Functions§