README.md

minimage

Lifecycle:
experimental R-CMD-check

The goal of minimage is to let users minify size images.

The main function allows to compress the images contained in a directory to another directory, optionally changing some compression parameters.

Installation

You can install minimage from GitHub with:

# install.packages("devtools")
devtools::install_github("ardata-fr/minimage")

Example

library(minimage)
compress_images("test-files/", "test-new-files/", verbose = FALSE)
| input | size\_in | path\_out | size\_out | percent | algorithm | copied | | :--------------------- | -------: | :------------------------- | --------: | ------: | :-------- | :----- | | test-files/file\_1.png | 10386 | test-new-files/file\_1.png | 1714 | 83.50 | pngquant | TRUE | | test-files/file\_2.png | 10409 | test-new-files/file\_2.png | 1825 | 82.47 | pngquant | TRUE |
compress_images("test-files/", "test-new-files/", png_quality = "90-100", 
                verbose = FALSE, overwrite = TRUE)
| input | size\_in | path\_out | size\_out | percent | algorithm | copied | | :--------------------- | -------: | :------------------------- | --------: | ------: | :-------- | :----- | | test-files/file\_1.png | 10386 | test-new-files/file\_1.png | 2299 | 77.86 | pngquant | TRUE | | test-files/file\_2.png | 10409 | test-new-files/file\_2.png | 2288 | 78.02 | pngquant | TRUE |


ardata-fr/minimage documentation built on Aug. 24, 2021, 2:21 a.m.