aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-01-20 02:23:33 +0900
committernsfisis <nsfisis@gmail.com>2025-01-20 02:23:33 +0900
commitdb851c2e63e0025e379ddd02ef295d64a37901d6 (patch)
tree79eeced917ea6154f683a2150a56d2b829605c6c
parent6a4373396f4fcb9287e20588c236b7346c7e8065 (diff)
downloadphpstudy-N-slides-template-db851c2e63e0025e379ddd02ef295d64a37901d6.tar.gz
phpstudy-N-slides-template-db851c2e63e0025e379ddd02ef295d64a37901d6.tar.zst
phpstudy-N-slides-template-db851c2e63e0025e379ddd02ef295d64a37901d6.zip
allow figbox to load png images
-rw-r--r--Dockerfile4
-rw-r--r--patches/figbox.satyh.patch19
2 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index e73579a..38d7e0a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,3 +12,7 @@ RUN eval $(opam env) && \
satyrographos install --copy
WORKDIR /work
+
+COPY patches/figbox.satyh.patch /root/.satysfi/dist/packages/figbox/figbox.satyh.patch
+RUN cd /root/.satysfi/dist/packages/figbox && \
+ patch -p0 < figbox.satyh.patch
diff --git a/patches/figbox.satyh.patch b/patches/figbox.satyh.patch
new file mode 100644
index 0000000..5226b06
--- /dev/null
+++ b/patches/figbox.satyh.patch
@@ -0,0 +1,19 @@
+--- figbox.satyh 2025-01-19 23:30:37.843791596 +0900
++++ figbox.satyh 2025-01-19 23:31:17.251295982 +0900
+@@ -144,15 +144,7 @@
+ let (_, ext) = Option.from (0, ` `) (splitlst |> List.nth (List.length splitlst - 1)) in
+ match ext with
+ | `pdf` -> use-image-by-width (load-pdf-image pth pg) wid
+- | `jpg` -> use-image-by-width (load-image pth) wid
+- | `jpeg` -> use-image-by-width (load-image pth) wid
+- | `jpe` -> use-image-by-width (load-image pth) wid
+- | `jfif` -> use-image-by-width (load-image pth) wid
+- | `jfi` -> use-image-by-width (load-image pth) wid
+- | `jif` -> use-image-by-width (load-image pth) wid
+- | _ ->
+- let () = display-message (`Failed to include image: [` ^ pth ^ `]`) in
+- inline-nil
++ | _ -> use-image-by-width (load-image pth) wid
+ in
+ Box(embedf)
+