mirror of
https://gitlab.waag.org/make/fablab/interns/2025/sam.git
synced 2025-08-03 20:04:56 +00:00
Noted imagemagick and lectures
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# ImageMagick
|
||||
|
||||
## What is ImageMagick and why use it?
|
||||
ImageMagick is a tool to resize, convert or compress images. You can do all sorts of things with it. But right now we will be using it to compress images. So other people don't have to download hunderds of megabytes when cloning your project or viewing your website.
|
||||
ImageMagick is a tool to resize, convert or compress images. You can do all sorts of things with it. But right now we will be using it to compress images. So other people don't have to download hunderds of megabytes when cloning your project or viewing your website. Using this is also way faster than opening photoshop for every image you make.
|
||||
|
||||
## How do I install it?
|
||||
ImageMagick can be installed on arch based systems using:
|
||||
@@ -27,7 +27,17 @@ Same as above but resizes the image to 800 width and keeps the aspect ratio.
|
||||
magick source.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -resize 800x result.jpg
|
||||
```
|
||||
|
||||
### How to make a image smaller
|
||||
```bash
|
||||
convert input.jpg -resize 20% small.jpg
|
||||
```
|
||||
Where 20% is placed you could also place anything else, For example 800x800 or just 800x then it will keep the aspect ratio.
|
||||
|
||||
## Rules for uploading images to git
|
||||
Use jpg's instead of png. Jpg's are compressed and way smaller. Try to keep images under 200 kilobytes.
|
||||
|
||||
## Sources
|
||||
* [installing ImageMagick](https://imagemagick.org/script/download.php)
|
||||
* [command source](https://stackoverflow.com/questions/7261855/recommendation-for-compressing-jpg-files-with-imagemagick)
|
||||
* [image resizing](https://legacy.imagemagick.org/Usage/resize/)
|
||||
|
@@ -4,11 +4,13 @@
|
||||
You need to know these commands if you wanna navigate a Unix like system like linux or macOS in the terminal. The terminal is used a lot for git so knowing these commands is a must.
|
||||
|
||||
## Commands
|
||||
| Command | Description |
|
||||
| --------- | ------------------------------------- |
|
||||
| cat | read a file and output it to terminal |
|
||||
| cd | change directory |
|
||||
| ls | view all files in the current folder |
|
||||
| ls -la | same as ls but also view hidden files |
|
||||
| rm <file> | remove a file |
|
||||
| Command | Description |
|
||||
| --------- | -------------------------------------------------------------------------------------- |
|
||||
| cat | read a file and output it to terminal |
|
||||
| cd | change directory |
|
||||
| ls | view all files in the current folder |
|
||||
| ls -la | same as ls but also view hidden files |
|
||||
| rm <file> | remove a file |
|
||||
| ls -altr | give a list of files in order of time and reversed so the latest file is at the bottom |
|
||||
| | |
|
||||
|
||||
|
Reference in New Issue
Block a user