Skip to content

Commit d37c93a

Browse files
Fix: iipsrv black image
1 parent 76f254c commit d37c93a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

iipsrv/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ RUN apk add --no-cache \
1111

1212
RUN wget https://github.com/ruven/iipsrv/archive/refs/heads/master.zip && unzip master.zip
1313
WORKDIR /iipsrv-master
14+
# Patch upstream OpenJPEG 8-bit decode bug: the mask for 8-bit output data is
15+
# 0x000000f (4-bit / low nibble only), which renders every 8-bit JP2 ~32x too
16+
# dark. It must be 0x000000ff (full 8-bit byte). See src/OpenJPEGImage.cc.
17+
RUN sed -i 's/& 0x000000f)/\& 0x000000ff)/' src/OpenJPEGImage.cc \
18+
&& grep -q '& 0x000000ff)' src/OpenJPEGImage.cc
1419
RUN ./autogen.sh
1520
RUN ./configure --enable-openjpeg
1621
RUN make

0 commit comments

Comments
 (0)