Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying output channels in io.image.read_image #2988

Merged
merged 16 commits into from
Nov 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replacing decoding with generic method on tests.
  • Loading branch information
datumbox committed Nov 16, 2020
commit c81548c8831c27978e36f71dd8cc1d3af371566b
4 changes: 2 additions & 2 deletions test/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_decode_jpeg(self):

img_pil = normalize_dimensions(img_pil)
data = read_file(img_path)
img_ljpeg = decode_jpeg(data, channels=channels)
img_ljpeg = decode_image(data, channels=channels)

# Permit a small variation on pixel values to account for implementation
# differences between Pillow and LibJPEG.
Expand Down Expand Up @@ -176,7 +176,7 @@ def test_decode_png(self):

img_pil = normalize_dimensions(img_pil)
data = read_file(img_path)
img_lpng = decode_png(data, channels=channels)
img_lpng = decode_image(data, channels=channels)

tol = 0 if conversion is None else 1
self.assertTrue(img_lpng.allclose(img_pil, atol=tol))
fmassa marked this conversation as resolved.
Show resolved Hide resolved
Expand Down