Overview

I investigated cases where ImageMagick does not work properly when creating pyramidal TIFFs for IIIF image delivery.

References

Conversion methods are explained on pages like the following.

https://samvera.github.io/serverless-iiif/docs/source-images#creating-tiled-tiffs

Using the VIPS command line

#v#viiFpFp&&osos&&rrtevraiaximftp3fsrst-soaecauctmhvrtipaec_f_nebfinsasmeoinaalumdvgraeescgs.oeeotvu_ueriwrmcmicpeate_gh_iieimm.amaatnaggigeefae.l.voptuhiotafuptuctptheu_amtinp_mn_iaeimglmaeag.gete.i.tfvif0-t-i-tlniel3e-\p-ypryarmaimdid-c-ocmopmrpersessisoinonjpjepgeg-t-itliel-ew-iwditdhth252656-t-itliel-eh-ehiegihgtht252656\

Using ImageMagick

con---'vddcpeeeotrffmitiipfnnr:seeeoosuuttstriipcffjueffpt_::e_itggimiemaln\ageege-re.ga.tettioeifm-fep'-tyarrlyap=mh2ia5d6sox=f2tf5r6ue

Target Data

The following image was used.

“Izumi no Kuni Ezu” (Map of Izumi Province), manuscript copy. National Diet Library Digital Collection https://dl.ndl.go.jp/pid/1286201 (accessed 2025-03-11)

https://dl.ndl.go.jp/api/iiif/1286201/R0000001/full/full/0/default.jpg

wget-Oinput.jpghttps://dl.ndl.go.jp/api/iiif/1286201/R0000001/full/full/0/default.jpg

VIPS command line

Perform the conversion.

vipstiffsaveinput.jpgoutput_vips.tif-tile-pyramid-compressionjpeg-tile-width256-tile-height256

Then verify the result with the following.

t=T=T=T=T=T=T=Ti=I=I=I=I=I=I=If=FITRBSCPOSPJ=FSITRBCPOSPJ=FSITRBCPOSPJ=FSITRBCPOSPJ=FSITRBCPOSPJ=FSITRBCPOSPJ=FSITRBCPOSPJfFmieiaohralPFumieiohralPFumieiohralPFumieiohralPFumieiohralPFumieiohralPFumieiohralPiTalstmmoimaETbalstmoimaETbalstmoimaETbalstmoimaETbalstmoimaETbalstmoimaETbalstmoimaEnIDgeospptepnGIDfgeosptepnGIDfgeosptepnGIDfgeosptepnGIDfgeosptepnGIDfgeosptepnGIDfgeosptepnGfFiel/lronlaFiiel/ronlaFiiel/ronlaFiiel/ronlaFiiel/ronlaFiiel/ronlaFiiel/ronlaoFrWuSeemterTFrlWuSemterTFrlWuSemterTFrlWuSemterTFrlWuSemterTFrlWuSemterTFrlWuSemterTeWitaseasaeeWitaseasaeeWitaseasaeeWitaseasaeeWitaseasaeeWitaseasaeeWitaseasaodcidimFstt/Cbdcidimstt/Cbdcidimstt/Cbdcidimstt/Cbdcidimstt/Cbdcidimstt/Cbdcidimstt/CbuitdtopoiriPolitTdtopiriPolitTdtopiriPolitTdtopiriPolitTdtopiriPolitTdtopiriPolitTdtopiriPoltrothnlroioineroythnloioineroythnloioineroythnloioineroythnloioineroythnloioineroythnloioineperh::emncnxfserph::encnxfserph::encnxfserph::encnxfserph::encnxfserph::encnxfserph::encnxfsucy::a:ei:cye:::ei:cye:::ei:cye:::ei:cye:::ei:cye:::ei:cye:::ei:tt27tSIlgt:27SIlgt:27SIlgt:27SIlgt:27SIlgt:27SIlgt:27SIlg_oa1528:cnr:u(oa6528cnr:u(oa3528cnr:u(oa1528cnr:u(oa8528cnr:u(oa4528cnr:u(oa2528cnr:u(vrt36,htor5rtr66,htor5rtr36,htor5rtr66,htor5rtr36,htor5rtr16,htor5rtr06,htor5iy3ueew3a7ye5eew3a7ye2eew3a7ye6eew3a7ye1eew3a7ye5eew3a7ye7eew3a7po0T7nmrt4od0T7mrt4od5T7mrt4od2T7mrt4odT7mrt4odT7mrt4odT7mrt4s0f0i2sep0i1fui2ep0i2fui2ep0i3fui2ep0i4fuIi2ep0i5fuIi2ep0i6fuIi2ep0i.fli:robfcIl:robfcIl:robfcIl:robfcml:robfcml:robfcml:robt=sIepgetny=semepetny=semepetny=semepetny=seaepetny=seaepetny=seaepetnyi=eminJto:t=edaiJto:t=edaiJto:t=edaiJto:t=edgiJto:t=edgiJto:t=edgiJto:tf=taLxePape=t-gLxPape=t-gLxPape=t-gLxPape=t-eLxPape=t-eLxPape=t-eLxPapegeedEt,ssreeeEt,ssreeeEt,ssreeeEt,ssreeEt,ssreeEt,ssreeEt,ss0enlGii)0enlGii)0enlGii)0enlGii)0eLnlGii)0eLnlGii)0eLnlGii)xgsiocnxsLgsocnxsLgsocnxsLgsocnxsegsocnxsegsocnxsegsocn9Lt/nnogcoet/nogdoet/nogdoet/nogdont/nogdont/nogdont/nog6ehit:ll8lnhi:ll7lnhi:llblnhi:llclghi:llclghi:llclghi:ll2n:needug:ne4ug:ne5ug:ne7ut:necut:neeut:ne9gcgY04ttcY07ttcY02ttcY02thcY0athcY06thcY00t2heCi6ih2hCi1ih2hCi2ih2hCici:2hCi7i:2hCi2i:2hCi8h5rblm8o:5blm0o:5blm8o:5blm4o5blm6o5blmao5blm:6Chan6Chan6Chan6Chan66Chan36Chan16Cha(rsg(5rsg(2rsg(1rsg(5rsg(2rsg(6rsg91e1i2e1i6e1i3e1i0e1i5e1i2e803m04m04m04m4m4m44p1a0p1a0p3a0p4ap4ap4ap00l6gl0gl7gl4gl6gl7gl90a1ea8ea3ea7ea9ea6ea0n5n4n4n3n7n8n4e7(e3(e1(e0(e5(e4(e)612161010121))))))======000000xxxxxx111111))))))

Multiple TIFF directories (layers) exist, and it appears to have been properly created as a pyramidal TIFF (multi-resolution TIFF).

ImageMagick

Perform the conversion.

con---'vddcpeeeotrffmitiipfnnr:ieeeonsupttstuiiptffju.ffptj::e_ptggcgieoln\n-eea-relgarpetthoe.am-tepiotyffrr'fya=m\2i5d6sx=2t5r6ue

Then verify the result with the following.

t=Ti=If=FITBCPFOSPPWPJfFmiiohiralahrPiTaltmolimagiiEnIDgesptlepnetmGfFie/roOnlaeaoFrWSemrterNrTeWiasedasuPyaodcidmstet/CmoCbuitdtpirriPobihltrothloi:oinenreperh:encnxfrtosucy::m:ei::m:tt2SIslga_oa158cnbr:u00t(crt36ht-or-.i2oy3eetw3a13c8no0Tmrot1i9v0f0iep-0i2tefl:rlo7ibr=sIeestn-eyt=emJtbo:0st.=taLPap.:etgeEt,s3si0enGii20)fxgocn9.1Ltnog69eh:ll48n:e09gR00ft2Gi04h5Blm06:6ha,csg0(1oe.20l364op370rl070a09n04e06,20).300000,0.600000,0.150000,0.060000

Only TIFF directory 0 exists, indicating that it is very likely not a pyramidal TIFF (multi-resolution TIFF).

Summary

The results seem to vary depending on the ImageMagick version, but we were able to confirm cases where pyramidal TIFFs cannot be created.

I was not able to identify the specific cause, but it appears necessary to consider using VIPS or other tools instead.

This is somewhat incomplete information, but I hope it serves as a helpful reference.