-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
59 lines (44 loc) · 1.53 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
output:
github_document:
df_print: kable
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
library(knitr)
opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# minimage
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/ardata-fr/minimage/workflows/R-CMD-check/badge.svg)](https://github.com/ardata-fr/minimage/actions)
<!-- badges: end -->
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](https://github.com/ardata-fr/minimage/) with:
``` r
# install.packages("devtools")
devtools::install_github("ardata-fr/minimage")
```
## Example
```{r include=FALSE}
file.copy(system.file(package = "minimage", "test-files"), to = ".", recursive = TRUE)
dir.create("test-new-files", recursive = TRUE)
```
```{r example}
library(minimage)
compress_images("test-files/", "test-new-files/", verbose = FALSE)
compress_images("test-files/", "test-new-files/", png_quality = "90-100",
verbose = FALSE, overwrite = TRUE)
```
```{r include=FALSE}
unlink("test-files", force = TRUE, recursive = TRUE)
unlink("test-new-files", force = TRUE, recursive = TRUE)
```