Update zune-jpeg to 0.5 (#304)

This commit is contained in:
Jacob Adam W. authored and GitHub committed 2025-10-25 13:53:04 -07:00
1 parent 695208cffe
commit 4adba46b9f
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -442,13 +442,14 @@ impl Image {
let mut jpeg_data = Vec::new();
jpeg_reader.read_to_end(&mut jpeg_data)?;
let mut decoder = zune_jpeg::JpegDecoder::new(jpeg_data);
let mut decoder =
zune_jpeg::JpegDecoder::new(zune_core::bytestream::ZCursor::new(jpeg_data));
let mut options: zune_core::options::DecoderOptions = Default::default();
// Disable color conversion by setting the output colorspace to the input
// colorspace.
decoder.decode_headers()?;
if let Some(colorspace) = decoder.get_input_colorspace() {
if let Some(colorspace) = decoder.input_colorspace() {
options = options.jpeg_set_out_colorspace(colorspace);
}