etemesi254 / zune-image

A fast and memory efficient image library in Rust
Other
319 stars 29 forks source link

Panic: zune-jpeg #188

Closed ava57r closed 5 months ago

ava57r commented 5 months ago

Hello I found this picture tBtdPVJPy2M

i run

use zune_jpeg::JpegDecoder;
use std::fs::read;

fn main() {
    // load some jpeg data
    let data = read("tBtdPVJPy2M.jpg").unwrap();
    // create a decoder
    let mut decoder = JpegDecoder::new(&data);
    // decode the file
    let _pixels = decoder.decode().unwrap();

I got

thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zune-jpeg-0.4.11/src/worker.rs:411:13:
assertion `left == right` failed
  left: 12800
 right: 6400
etemesi254 commented 5 months ago

Hi, the version 0.5.0-rc0 has a fix for this, but since I changed the read api to accept more io types it's a breaking change and I don't have the time to backport it to 0.4.0.

Closing it as fixed