Skip to content

Commit

Permalink
support animated JXL
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Oct 11, 2024
1 parent 77e36ff commit c27251a
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Codespell

on: [push, pull_request]

permissions: {}

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
92 changes: 92 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: build and test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Build and run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cc: gcc
- os: macos-latest
cc: clang
- os: windows-latest
cc: clang
- os: windows-latest
cc: cl
steps:
- uses: actions/checkout@v4

- name: Install build and test dependencies (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
sudo apt-get update
sudo apt-get install -y --no-install-suggests --no-install-recommends \
build-essential \
check \
clang \
llvm \
meson \
pkg-config \
uthash-dev \
valgrind
sudo apt-get clean
- name: Install build and test dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: brew install check meson uthash

- name: Install build and test dependencies (Windows)
if: startsWith(matrix.os, 'windows')
run: pip install meson ninja

- name: Build and install library
shell: bash
run: |
export CC=${{ matrix.cc }}
sudo=
case "${{ matrix.os }}" in
ubuntu*)
sudo=sudo
;;
windows*)
case "${{ matrix.cc }}" in
cl)
# ignore CK_DIAGNOSTIC_POP warnings in check
setup_args="--vsenv -Dcheck:werror=false"
;;
clang)
# Ignore unused parameter warnings from check.h
export CFLAGS=-Wno-unused-parameter
# https://github.com/mesonbuild/meson/issues/10022
export CC_LD=lld-link
;;
esac
;;
esac
meson setup builddir --werror $setup_args
DEBUG_DICT=1 meson compile -C builddir
$sudo meson install -C builddir
- name: Run unit tests
# Don't run tests for private copy of Check
run: meson test -C builddir --suite libdicom

- name: Print unit test logs
if: always()
run: cat builddir/meson-logs/testlog.txt

- name: Run valgrind
if: startsWith(matrix.os, 'ubuntu')
run: |
valgrind --leak-check=full dcm-dump ./data/test_files/sm_image.dcm > /dev/null
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- better behaviour for image interpretations like MATRIX
- window menu has next-image / prev-image in the top line [euzada]
- add "preserve view settings on new image"
- add animated JXL support

# 3.0.4 1/3/24

Expand Down
3 changes: 2 additions & 1 deletion src/tilesource.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ tilesource_open(Tilesource *tilesource, int level)
NULL);
}
else if (vips_isprefix("webp", tilesource->loader) ||
vips_isprefix("gif", tilesource->loader)) {
vips_isprefix("gif", tilesource->loader) ||
vips_isprefix("jxl", tilesource->loader)) {
/* These formats have pages all the same size and support page and n.
*/
image = vips_image_new_from_file(tilesource->filename,
Expand Down

0 comments on commit c27251a

Please sign in to comment.