Skip to content

Commit 73ed44f

Browse files
committed
Merge pull request image-rs#369 from nwin/master
bump version
2 parents 3b70146 + 6282bb3 commit 73ed44f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "image"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
license = "MIT"
55
description = "Imaging library written in Rust. Provides basic filters and decoders for the most common image formats."
66
authors = [
@@ -22,13 +22,13 @@ name = "image"
2222
path = "./src/lib.rs"
2323

2424
[dependencies.byteorder]
25-
version = "0.3.3"
25+
version = "0.3.5"
2626

2727
[dependencies.num]
28-
version = "0.1.18"
28+
version = "0.1.20"
2929

3030
[dev-dependencies.glob]
31-
version = "0.2.7"
31+
version = "0.2.9"
3232

3333
[features]
3434
default = ["gif", "jpeg", "png", "ppm", "tga", "tiff", "webp"]

src/png/decoder.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use std::io::{ self, Read };
2-
use std::{ cmp, mem, iter, str, slice };
2+
use std::{ cmp, iter, str, slice };
33
use std::iter::repeat;
44
use std::num::{ FromPrimitive, Float };
55
use byteorder::{ ReadBytesExt, BigEndian };
@@ -436,14 +436,12 @@ impl<R: Read> PNGDecoder<R> {
436436
expand_trns_line_nbits(
437437
buf,
438438
trns[0],
439-
rlength as usize,
440439
self.bit_depth
441440
);
442441
} else {
443442
expand_trns_line(
444443
buf,
445444
trns,
446-
rlength as usize,
447445
color::num_components(self.data_pixel_type)
448446
);
449447
}
@@ -595,7 +593,7 @@ where F: Fn(u8, &mut[u8]) {
595593
}
596594
}
597595

598-
fn expand_trns_line(buf: &mut[u8], trns: &[u8], entries: usize, channels: usize) {
596+
fn expand_trns_line(buf: &mut[u8], trns: &[u8], channels: usize) {
599597
let channels = channels as isize;
600598
let i = (buf.len() as isize / (channels+1) * channels - channels..-(channels)).step_by(-channels);
601599
let j = (buf.len() as isize - (channels+1)..-(channels+1)).step_by(-(channels+1));
@@ -614,7 +612,7 @@ fn expand_trns_line(buf: &mut[u8], trns: &[u8], entries: usize, channels: usize)
614612
}
615613
}
616614

617-
fn expand_trns_line_nbits(buf: &mut[u8], trns: u8, entries: usize, bit_depth: u8) {
615+
fn expand_trns_line_nbits(buf: &mut[u8], trns: u8, bit_depth: u8) {
618616
let scaling_factor = (255)/((1u16 << bit_depth) - 1) as u8;
619617
expand_packed(buf, 2, bit_depth, |pixel, chunk| {
620618
if pixel == trns {

0 commit comments

Comments
 (0)