Skip to content

Commit e10981f

Browse files
committed
Attempt to address CI failures in #3061
- Install libpng-dev on Linux GCC workflow so that mrconvert tests involving the PNG format can succeed. - Modify DEBUG call in ImageIO::PNG::load(): concatenation of an empty string seemingly causing a string overflow when compiling on Windows.
1 parent 8545aef commit e10981f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: install dependencies
9191
run: |
9292
sudo apt-get update
93-
sudo apt-get install g++-9 qt6-base-dev libglvnd-dev zlib1g-dev libfftw3-dev ninja-build python3-numpy
93+
sudo apt-get install g++-9 qt6-base-dev libglvnd-dev zlib1g-dev libfftw3-dev ninja-build python3-numpy libpng-dev
9494
9595
- name: Run sccache-cache
9696
uses: mozilla-actions/[email protected]

cpp/core/image_io/png.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
namespace MR::ImageIO {
2626

2727
void PNG::load(const Header &header, size_t) {
28-
DEBUG(std::string("loading PNG image") + (files.size() > 1 ? "s" : "") + " \"" + header.name() + "\"");
28+
DEBUG(std::string("loading PNG ") //
29+
+ (files.size() > 1 ? "images" : "image") //
30+
+ " \"" + header.name() + "\""); //
2931
segsize = (header.datatype().bits() * voxel_count(header) + 7) / 8;
3032
addresses.resize(1);
3133
addresses[0].reset(new uint8_t[segsize]);

0 commit comments

Comments
 (0)