Browse Source

Use better image conversion command

This looks more correct on the device to my eye and is a bit simpler.
pull/29/head
Ian Chamberlain 3 years ago
parent
commit
be94b04d1d
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
  1. BIN
      ctru-rs/examples/assets/ferris.rgb
  2. 12
      ctru-rs/examples/graphics-bitmap.rs

BIN
ctru-rs/examples/assets/ferris.rgb

Binary file not shown.

12
ctru-rs/examples/graphics-bitmap.rs

@ -1,5 +1,5 @@
use ctru::console::Console; use ctru::console::Console;
use ctru::gfx::{Screen as _, Side}; use ctru::gfx::Screen as _;
use ctru::services::hid::KeyPad; use ctru::services::hid::KeyPad;
use ctru::services::{Apt, Hid}; use ctru::services::{Apt, Hid};
use ctru::Gfx; use ctru::Gfx;
@ -9,16 +9,12 @@ use ctru::Gfx;
/// command from the `examples` directory: /// command from the `examples` directory:
/// ///
/// ```sh /// ```sh
/// convert assets/ferris.png -channel B -separate \ /// magick assets/ferris.png -channel-fx "red<=>blue" -rotate 90 assets/ferris.rgb
/// assets/ferris.png -channel G -separate \
/// assets/ferris.png -channel R -separate \
/// -channel RGB -combine -rotate 90 \
/// assets/ferris.rgb
/// ``` /// ```
/// ///
/// This creates an image appropriate for the default frame buffer format of /// This creates an image appropriate for the default frame buffer format of
/// BGR888 and rotates the image 90° to account for the screen actually being /// [`Bgr8`](ctru::services::gspgpu::FramebufferFormat::Bgr8)
/// in portrait mode. /// and rotates the image 90° to account for the portrait mode screen.
static IMAGE: &[u8] = include_bytes!("assets/ferris.rgb"); static IMAGE: &[u8] = include_bytes!("assets/ferris.rgb");
fn main() { fn main() {

Loading…
Cancel
Save