Skip to content

fix matrixload sniff for some matrix files #4372

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

Merged
merged 1 commit into from
Jan 31, 2025
Merged

fix matrixload sniff for some matrix files #4372

merged 1 commit into from
Jan 31, 2025

Conversation

jcupitt
Copy link
Member

@jcupitt jcupitt commented Jan 31, 2025

matrixload is_a could fail to detect files like this:

2 2
0 0
1 1

The header parser was not stopping at EOL and thought that this file had scale 0, which it would then reject.

matrixload is_a could fail to detect files like this:

```
2 2
0 0
1 1
```

The header parser was not stopping at EOL and thought that this file had scale
0, which it would then reject.
@jcupitt jcupitt merged commit 0bf64e9 into 8.16 Jan 31, 2025
10 checks passed
@kleisauke kleisauke mentioned this pull request Feb 1, 2025
jcupitt added a commit that referenced this pull request Feb 1, 2025
* add matrixmultiply

needed for nip4 compat mode

* fix matrixload sniff for some matrix files (#4372)

matrixload is_a could fail to detect files like this:

```
2 2
0 0
1 1
```

The header parser was not stopping at EOL and thought that this file had scale
0, which it would then reject.

* fix invertlut in some cases (#4373)

If the measurements filled the entire x range, we were not writing the
final value.

For example:

```
2 2
0 0
1 1
```

```
$ vips invertlut linear.mat x2.v
$ vips getpoint x2.v 255 0
-nan
```

With this PR you get 1, as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant