Yihui Xie 3/29/2026

tinyimg: An R Package for Compressing Images

Read Original

This article presents tinyimg, an R package created by Yihui Xie for compressing PNG images without external dependencies. It uses two Rust crates (oxipng for lossless optimization and exoquant for lossy palette reduction) bundled within the package, making installation simple via install.packages('tinyimg'). The main function, tinypng(), supports lossless compression with adjustable levels (0-6) and lossy compression using a CIELAB color-difference threshold. The article discusses use cases like reducing vignette sizes in R packages and provides benchmarks showing typical compression gains of 25-35%. It is relevant to IT/TECHNOLOGY as it covers a technical tool for image optimization in software development.

tinyimg: An R Package for Compressing Images

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet