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

bugfix/missing-comma-was-creating-a-new-file-format #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
- uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up FFMPEG
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
3 changes: 2 additions & 1 deletion bioio_imageio/reader_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def get_supported_extensions() -> List[str]:
"mpo",
"msp",
"pdf",
"png" "ppm",
"png",
"ppm",
"ps",
"zif",
]
Expand Down
4 changes: 2 additions & 2 deletions bioio_imageio/tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
@pytest.mark.parametrize(
"filename, set_scene, expected_shape, expected_dims_order",
[
("example.bmp", "Image:0", (480, 640, 4), "YXS"),
("example.bmp", "Image:0", (480, 640, 3), "YXS"),
("example.png", "Image:0", (800, 537, 4), "YXS"),
("example.jpg", "Image:0", (452, 400, 3), "YXS"),
("example.gif", "Image:0", (72, 268, 268, 4), "TYXS"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why'd we lose a scene here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S is not scene, it's "Samples", as in 3 means RGB and 4 means RGBA

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh gotcha my mistake. I think my question persists though. What happened to our 4th sample?

("example.gif", "Image:0", (72, 268, 268, 3), "TYXS"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example.gif we have an issue with the reader here.

            elif image_length > 1:
                # Read and stack all frames
                frames = []
                for frame in reader:
                    frames.append(frame)

                image_data = np.stack(frames)

We have a first frame that is uneven
locals

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evamaxfield @toloudis any thoughts here? np.stack expects same-size arrays, not sure why the first one is missing a dim.

(
"example_invalid_frame_count.mp4",
"Image:0",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies = [
"bioio-base>=0.3.0",
"dask[array]>=2021.4.1",
"fsspec>=2022.8.0",
"imageio[ffmpeg]>=2.11.0,<2.28.0",
"imageio[ffmpeg]>=2.31.0",
"numpy>=1.21.0",
"Pillow>=9.3.0",
"xarray>=2022.6.0",
Expand Down
Loading