Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee73341bbf | ||
|
|
6c7cc7ec30 | ||
|
|
24d347ecf5 | ||
|
|
a439baa948 | ||
|
|
6e23274bea |
No files matched your search
@@ -4,8 +4,3 @@ rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
||||
script:
|
||||
- if [[ "$TRAVIS_RUST_VERSION" == *stable* ]]; then rustup component add rustfmt; cargo fmt --version; cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false); fi
|
||||
- cargo build -v
|
||||
- cargo test -v
|
||||
@@ -1,3 +1,12 @@
|
||||
# Version 0.5.0
|
||||
|
||||
* Added support for 32-bit and 64-bit decoded values.
|
||||
* Added CMYK(16|32|64) color type support.
|
||||
* Check many internal integer conversions to increase stability. This should
|
||||
only lead to images being reported as faulty that would previously silently
|
||||
break platform limits. If there are any false positives, please report them.
|
||||
* Remove an erroneous check of decoded length in lzw compressed images.
|
||||
|
||||
# Version 0.4.0
|
||||
|
||||
* Several enumerations are now non_exhaustive for future extensions.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tiff"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
authors = [
|
||||
"ccgn",
|
||||
"bvssvni <bvssvni@gmail.com>",
|
||||
|
||||
+2
-2
@@ -584,7 +584,7 @@ impl<R: Read + Seek> Decoder<R> {
|
||||
let (bytes, reader) = LZWReader::new(
|
||||
&mut self.reader,
|
||||
usize::try_from(length)?,
|
||||
max_uncompressed_length
|
||||
max_uncompressed_length * buffer.byte_len()
|
||||
)?;
|
||||
(bytes, Box::new(reader))
|
||||
}
|
||||
@@ -744,7 +744,7 @@ impl<R: Read + Seek> Decoder<R> {
|
||||
|
||||
let buffer_size = usize::try_from(self.width)? * strip_height * self.bits_per_sample.len();
|
||||
|
||||
if buffer.len() < buffer_size || usize::try_from(byte_count)? / buffer.byte_len() > buffer_size {
|
||||
if buffer.len() < buffer_size {
|
||||
return Err(TiffError::FormatError(
|
||||
TiffFormatError::InconsistentSizesEncountered,
|
||||
));
|
||||
|
||||
@@ -149,6 +149,12 @@ fn test_decode_data() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_69() {
|
||||
test_image_sum_u16("issue_69_lzw.tiff", ColorType::Gray(16), 1015486);
|
||||
test_image_sum_u16("issue_69_packbits.tiff", ColorType::Gray(16), 1015486);
|
||||
}
|
||||
|
||||
// TODO: GrayA support
|
||||
//#[test]
|
||||
//fn test_gray_alpha_u8()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user