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

cannot decode AVIF images #1855

Closed
Quackdoc opened this issue Feb 7, 2023 · 1 comment
Closed

cannot decode AVIF images #1855

Quackdoc opened this issue Feb 7, 2023 · 1 comment

Comments

@Quackdoc
Copy link

Quackdoc commented Feb 7, 2023

given code below

Expected

decode and convert to png

Actual behaviour

RUST_BACKTRACE=1 ./target/debug/image-rs-test out.avif
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Decoding(DecodingError { format: Exact(Avif), underlying: Some(Error(-11)) })', src/main.rs:8:34
stack backtrace:
   0: rust_begin_unwind
             at /rustc/af3e06f1bf4ca49407562b1b84744e27905bea98/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/af3e06f1bf4ca49407562b1b84744e27905bea98/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/af3e06f1bf4ca49407562b1b84744e27905bea98/library/core/src/result.rs:1790:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/af3e06f1bf4ca49407562b1b84744e27905bea98/library/core/src/result.rs:1112:23
   4: image_rs_test::main
             at ./src/main.rs:8:15
   5: core::ops::function::FnOnce::call_once
             at /rustc/af3e06f1bf4ca49407562b1b84744e27905bea98/library/core/src/ops/function.rs:507:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Reproduction steps

Provide source code, a repository link, or steps

use image::GenericImageView;
use std::{env, io, fs};

fn main() {
    // Use the open function to load an image from a Path.
    // `open` returns a `DynamicImage` on success.
    let input = env::args().nth(1).unwrap();
    let img = image::open(input).unwrap();

    // The dimensions method returns the images width and height.
    println!("dimensions {:?}", img.dimensions());

    // The color method returns the image's `ColorType`.
    println!("{:?}", img.color());

    // Write the contents of this image to the Writer in PNG format.
    img.save("test.png").unwrap();
}

avif out.avif made with
ffmpeg -i ~\Pictures\E137mwnVgAEogCB.jpg -c:v libsvtav1 out.avif

image-rs-test.zip
https://slow.pics/c/e3P3d1i5

Netflix-chimera is a seperate issue but one I tested anyways, the zip and slowpics contain the same images

@Quackdoc
Copy link
Author

Quackdoc commented Feb 7, 2023

sounds like it's related to rust-av/dav1d-rs#64 and #1647 so closing in favour off

@Quackdoc Quackdoc closed this as completed Feb 7, 2023
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

1 participant