Hi,
I'm trying to convert my PSD image to PNG, and when using psd.rgba()
I always get the same error
thread 'tokio-runtime-worker' panicked at xxx\psd-0.3.5\src\psd_channel.rs:130:29:
index out of bounds: the len is 96641024 but the index is 96641025
96641024 looks like a maximum value.
I tried a few other files and it seems the size cannot exceed a certain value, looking at my image size in Photoshop it is 6016*4016.
Here is my code:
let psd = Psd::from_bytes(std::fs::read(path).unwrap().as_bytes()).unwrap();
metadata.image_width = psd.width();
metadata.image_height = psd.height();
println!("{}*{}",metadata.image_width,metadata.image_height);
let final_image = psd.rgba();
I cloned the source code, and the problem seems to be that when converting 16-bit color to 8-bit color, only the Red channel is converted. What is the reason for doing this.
Hi, I'm trying to convert my PSD image to PNG, and when using
psd.rgba()
I always get the same error96641024 looks like a maximum value. I tried a few other files and it seems the size cannot exceed a certain value, looking at my image size in Photoshop it is 6016*4016.
Here is my code:
what should I do :)