Skip to content

Commit 2f76309

Browse files
committed
minor
1 parent 5d73356 commit 2f76309

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

R/compress_images.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ compress_images <- function(input, output = NULL, verbose = TRUE, overwrite = FA
4848
jpg_quality = "75", png_quality = "20-50", gif_colors = "64"){
4949

5050
compimg_dir <- working_directory()
51-
51+
if(!compress_images_available())
52+
stop("compress-images is not available, run `compress_images_install()` to install it.")
5253
if(substr(output, nchar(output), nchar(output) ) != "/") {
5354
output <- paste0(output, "/")
5455
}

README.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ opts_chunk$set(
2323
[![R-CMD-check](https://github.com/ardata-fr/minimage/workflows/R-CMD-check/badge.svg)](https://github.com/ardata-fr/minimage/actions)
2424
<!-- badges: end -->
2525

26-
The goal of minimage is to ket users minify size images.
26+
The goal of minimage is to let users minify size images.
2727

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

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](h
1010
[![R-CMD-check](https://github.com/ardata-fr/minimage/workflows/R-CMD-check/badge.svg)](https://github.com/ardata-fr/minimage/actions)
1111
<!-- badges: end -->
1212

13-
The goal of minimage is to ket users minify size images.
13+
The goal of minimage is to let users minify size images.
1414

1515
The main function allows to compress the images contained in a directory
1616
to another directory, optionally changing some compression parameters.
@@ -50,7 +50,7 @@ compress_images("test-files/", "test-new-files/", png_quality = "90-100",
5050

5151
| input | size\_in | path\_out | size\_out | percent | algorithm | copied |
5252
| :--------------------- | -------: | :------------------------- | --------: | ------: | :-------- | :----- |
53-
| test-files/file\_2.png | 10409 | test-new-files/file\_2.png | 2288 | 78.02 | pngquant | TRUE |
5453
| test-files/file\_1.png | 10386 | test-new-files/file\_1.png | 2299 | 77.86 | pngquant | TRUE |
54+
| test-files/file\_2.png | 10409 | test-new-files/file\_2.png | 2288 | 78.02 | pngquant | TRUE |
5555

5656
</div>

0 commit comments

Comments
 (0)