Introduction To comfortably view high-resolution images on the web, pyramidal structures (multiple resolutions) and tile segmentation are essential. In this article, we used vips to create pyramidal tiled TIFFs from JPEG2000 images and compared the file sizes of various compression methods.
Test Environment vips 8.17.3 macOS (darwin) Source image: 764029-1.jp2 (274MB) Source: National Archives of Japan Digital Archive vips Commands JPEG Compression (Lossy) # v # v # v i i i Q p Q p Q p u s u s u s a a a l t l t l t i i i i i i t f t f t f y f y f y f s s s 1 a 7 a 2 a 0 v 5 v 5 v 0 e e e ( ( ( i b i h i n n a n i n e p l p g p a u a u h u r t n t t l . c . c . y j e j o j p d p m p l 2 ) 2 p 2 o r s o o e o s u u s u l t t s t e p p i p s u u o u s t t n t ) _ _ ) _ q q q 1 7 2 0 5 5 0 . . . t t t i i i f f f - - - t t t i i i l l l e e e - - - p p p y y y r r r a a a m m m i i i d d d - - - c c c o o o m m m p p p r r r e e e s s s s s s i i i o o o n n n = = = j j j p p p e e e g g g - - - Q Q Q = = = 7 2 1 5 5 0 0 Lossless Compression # v # v # v i i i D p L p U p e s Z s n s f W c l t t o t a i c i m i t f o f p f e f m f r f s p s e s c a r a s a o v e v s v m e s e e e p s d r i i i i e n o n ( n s p n p B p s u u i u i t t g t o . . T . n j j I j p p F p ( 2 2 F 2 z l o o f o i u u o u b t t r t ) p p m p u u a u t t t t _ _ _ d l r n e z e o f w q n l . u e a t i . t i r t e f e i . d f t i - i f t f - i t l i - e v l t e e i r l - e p 4 - y G p r B y - a ) r p m a y i m r d i a d m i - d c - o c m o - p m c r p o e r m s e p s s r i s e o i s n o s = n i l = o z n n w o = n d e e f l - a b t i e g t i f f Test Results File Compression Method Size Ratio to Original Notes Original JPEG2000 274MB - Input q25.tif JPEG Q=25 57MB 0.21x Lossy, high compression q75.tif JPEG Q=75 167MB 0.61x Lossy, balanced q100.tif JPEG Q=100 2.4GB 8.8x Lossy, high quality deflate.tif Deflate 2.8GB 10.2x Lossless lzw.tif LZW 3.2GB 11.7x Lossless none.tif Uncompressed 4.3GB 15.7x Lossless Image Quality Comparison We visually compared the differences in JPEG compression quality (from left: Q=25, Q=75, Q=100).
...