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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -86,8 +86,8 @@
version = "1.8.0"
features = ["extern_crate_alloc"]
-[dependencies.byteorder-lite]
-version = "0.1.0"
+[dependencies.byteorder]
+version = "1.5"
[dependencies.color_quant]
version = "1.1"
--- a/src/codecs/bmp/decoder.rs
+++ b/src/codecs/bmp/decoder.rs
@@ -4,7 +4,7 @@
use std::slice::ChunksMut;
use std::{error, fmt};
-use byteorder_lite::{LittleEndian, ReadBytesExt};
+use byteorder::{LittleEndian, ReadBytesExt};
use crate::color::ColorType;
use crate::error::{
--- a/src/codecs/bmp/encoder.rs
+++ b/src/codecs/bmp/encoder.rs
@@ -1,4 +1,4 @@
-use byteorder_lite::{LittleEndian, WriteBytesExt};
+use byteorder::{LittleEndian, WriteBytesExt};
use std::io::{self, Write};
use crate::error::{
--- a/src/codecs/dds.rs
+++ b/src/codecs/dds.rs
@@ -8,7 +8,7 @@
use std::io::Read;
use std::{error, fmt};
-use byteorder_lite::{LittleEndian, ReadBytesExt};
+use byteorder::{LittleEndian, ReadBytesExt};
#[allow(deprecated)]
use crate::codecs::dxt::{DxtDecoder, DxtVariant};
--- a/src/codecs/farbfeld.rs
+++ b/src/codecs/farbfeld.rs
@@ -315,7 +315,7 @@
mod tests {
use crate::codecs::farbfeld::FarbfeldDecoder;
use crate::ImageDecoderRect;
- use byteorder_lite::{ByteOrder, NativeEndian};
+ use byteorder::{ByteOrder, NativeEndian};
use std::io::{Cursor, Seek, SeekFrom};
static RECTANGLE_IN: &[u8] = b"farbfeld\
--- a/src/codecs/ico/decoder.rs
+++ b/src/codecs/ico/decoder.rs
@@ -1,4 +1,4 @@
-use byteorder_lite::{LittleEndian, ReadBytesExt};
+use byteorder::{LittleEndian, ReadBytesExt};
use std::io::{BufRead, Read, Seek, SeekFrom};
use std::{error, fmt};
--- a/src/codecs/ico/encoder.rs
+++ b/src/codecs/ico/encoder.rs
@@ -1,4 +1,4 @@
-use byteorder_lite::{LittleEndian, WriteBytesExt};
+use byteorder::{LittleEndian, WriteBytesExt};
use std::borrow::Cow;
use std::io::{self, Write};
--- a/src/codecs/png.rs
+++ b/src/codecs/png.rs
@@ -178,7 +178,7 @@
}
fn read_image(mut self, buf: &mut [u8]) -> ImageResult<()> {
- use byteorder_lite::{BigEndian, ByteOrder, NativeEndian};
+ use byteorder::{BigEndian, ByteOrder, NativeEndian};
assert_eq!(u64::try_from(buf.len()), Ok(self.total_bytes()));
self.reader.next_frame(buf).map_err(ImageError::from_png)?;
@@ -633,7 +633,7 @@
height: u32,
color_type: ExtendedColorType,
) -> ImageResult<()> {
- use byteorder_lite::{BigEndian, ByteOrder, NativeEndian};
+ use byteorder::{BigEndian, ByteOrder, NativeEndian};
use ExtendedColorType::*;
let expected_buffer_len = color_type.buffer_size(width, height);
--- a/src/codecs/pnm/decoder.rs
+++ b/src/codecs/pnm/decoder.rs
@@ -14,7 +14,7 @@
use crate::image::{ImageDecoder, ImageFormat};
use crate::utils;
-use byteorder_lite::{BigEndian, ByteOrder, NativeEndian};
+use byteorder::{BigEndian, ByteOrder, NativeEndian};
/// All errors that can occur when attempting to parse a PNM
#[derive(Debug, Clone)]
--- a/src/codecs/pnm/encoder.rs
+++ b/src/codecs/pnm/encoder.rs
@@ -14,7 +14,7 @@
};
use crate::image::{ImageEncoder, ImageFormat};
-use byteorder_lite::{BigEndian, WriteBytesExt};
+use byteorder::{BigEndian, WriteBytesExt};
enum HeaderStrategy {
Dynamic,
--- a/src/codecs/pnm/mod.rs
+++ b/src/codecs/pnm/mod.rs
@@ -22,7 +22,7 @@
use super::*;
use crate::image::ImageDecoder;
use crate::ExtendedColorType;
- use byteorder_lite::{ByteOrder, NativeEndian};
+ use byteorder::{ByteOrder, NativeEndian};
fn execute_roundtrip_default(buffer: &[u8], width: u32, height: u32, color: ExtendedColorType) {
let mut encoded_buffer = Vec::new();
--- a/src/codecs/tga/decoder.rs
+++ b/src/codecs/tga/decoder.rs
@@ -6,7 +6,7 @@
},
image::{ImageDecoder, ImageFormat},
};
-use byteorder_lite::ReadBytesExt;
+use byteorder::ReadBytesExt;
use std::io::{self, Read};
struct ColorMap {
--- a/src/codecs/tga/header.rs
+++ b/src/codecs/tga/header.rs
@@ -1,6 +1,6 @@
use crate::error::{UnsupportedError, UnsupportedErrorKind};
use crate::{ExtendedColorType, ImageError, ImageFormat, ImageResult};
-use byteorder_lite::{LittleEndian, ReadBytesExt, WriteBytesExt};
+use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use std::io::{Read, Write};
pub(crate) const ALPHA_BIT_MASK: u8 = 0b1111;
--- a/src/metadata.rs
+++ b/src/metadata.rs
@@ -2,7 +2,7 @@
use std::io::{Cursor, Read};
-use byteorder_lite::{BigEndian, LittleEndian, ReadBytesExt};
+use byteorder::{BigEndian, LittleEndian, ReadBytesExt};
/// Describes the transformations to be applied to the image.
/// Compatible with [Exif orientation](https://web.archive.org/web/20200412005226/https://www.impulseadventure.com/photo/exif-orientation.html).
|