Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example 1 doesn't work #44

Open
Wanpaku opened this issue May 9, 2024 · 0 comments
Open

Example 1 doesn't work #44

Wanpaku opened this issue May 9, 2024 · 0 comments
Assignees

Comments

@Wanpaku
Copy link

Wanpaku commented May 9, 2024

Yours "Example 1. Showing an image" doesn't work.

use show_image::{ImageView, ImageInfo, create_window};

#[show_image::main]
fn main() -> Result<(), Box<dyn std::error::Error>> {

  let image = ImageView::new(ImageInfo::rgb8(1920, 1080), pixel_data);

  // Create a window with default options and display the image.
  let window = create_window("image", Default::default())?;
  window.set_image("image-001", image)?;

  Ok(())
}

What is "pixel_data" and how to get it?

@de-vri-es de-vri-es self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants