Skip to content

Commit

Permalink
bake in png quantize
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed May 10, 2023
1 parent 4be59b1 commit f228ea6
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.Rmd
Expand Up @@ -226,6 +226,23 @@ plot(cc_location(template, type = "tasmap_tasmap25k")) ## also 100k, 250k, 500k



```{r smash,include=FALSE}
quantize_figs <- function(dir = "man/figures") {
f <- fs::dir_ls(dir, regexp = "png$")
for (i in seq_along(f)) {
tf <- tempfile(fileext = ".png")
im <- magick::image_read(f[i])
magick::image_write(magick::image_quantize(im), tf)
## I don't know how to properly unlink the original pointer, this just a guess (not sure it matters)
rm(im)
fs::file_delete(f[i])
fs::file_move(tf, f[i])
}
}
quantize_figs()
```



---
Expand Down
Binary file modified man/figures/README-example01-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-extent1-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-extent2-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-nz-spData-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-tasmap-8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-1-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f228ea6

Please sign in to comment.