File: zune-jpeg.diff

package info (click to toggle)
rust-tiff 0.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,060 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -119,3 +119,3 @@
 [dependencies.zune-jpeg]
-version = "0.4.17"
+version = "0.5.1"
 optional = true
--- a/src/decoder/image.rs
+++ b/src/decoder/image.rs
@@ -442,13 +442,14 @@
                 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);
                 }