Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Commit

Permalink
rgba2gray: support more image formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Seeker14491 committed Jul 12, 2017
1 parent edb6859 commit ad8e8c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/rgba2gray.rs
Expand Up @@ -23,9 +23,9 @@ fn main() {
.read_to_string(ptx)
.unwrap();

let img = image::open(args.next().unwrap()).unwrap();
let img = image::open(args.next().unwrap()).unwrap().to_rgba();

run(ptx, img.as_rgba8().unwrap()).unwrap()
run(ptx, &img).unwrap()
}

fn run(ptx: &str, img: &RgbaImage) -> Result<()> {
Expand Down

0 comments on commit ad8e8c2

Please sign in to comment.