Update docs/random_docs/Image.md

This commit is contained in:
2024-01-26 01:55:47 +00:00
parent 97f103dacb
commit 1ed8871d4d

View File

@@ -1,6 +1,3 @@
Certainly! Here's a simple guide in raw markdown format for installing ImageMagick via Homebrew on a Mac and using it to resize an image:
```markdown
# Image Resizing on Mac with ImageMagick via Homebrew # Image Resizing on Mac with ImageMagick via Homebrew
This guide provides steps to install ImageMagick using Homebrew and resize an image on a Mac. This guide provides steps to install ImageMagick using Homebrew and resize an image on a Mac.
@@ -13,7 +10,6 @@ This guide provides steps to install ImageMagick using Homebrew and resize an im
```bash ```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
``` ```
3. **Install ImageMagick:** Once Homebrew is installed, run this command to install ImageMagick: 3. **Install ImageMagick:** Once Homebrew is installed, run this command to install ImageMagick:
```bash ```bash
brew install imagemagick brew install imagemagick
@@ -27,9 +23,11 @@ This guide provides steps to install ImageMagick using Homebrew and resize an im
``` ```
2. **Resize the Image:** Use the `convert` command from ImageMagick to resize the image. For example, to resize an image named `original.jpg` to a width of 600 pixels while keeping the aspect ratio, use: 2. **Resize the Image:** Use the `convert` command from ImageMagick to resize the image. For example, to resize an image named `original.jpg` to a width of 600 pixels while keeping the aspect ratio, use:
```bash ```bash
convert original.jpg -resize 600x resized.jpg convert original.jpg -resize 600x resized.jpg
``` ```
This will create a new resized image named `resized.jpg` in the same directory. This will create a new resized image named `resized.jpg` in the same directory.
## Notes ## Notes
@@ -37,6 +35,5 @@ This guide provides steps to install ImageMagick using Homebrew and resize an im
- The `600x` in the resize command specifies the width in pixels. The height will be adjusted automatically to maintain the aspect ratio. - The `600x` in the resize command specifies the width in pixels. The height will be adjusted automatically to maintain the aspect ratio.
- If you want to overwrite the original image, use the same name for the output file. - If you want to overwrite the original image, use the same name for the output file.
- For more advanced options, refer to the ImageMagick documentation or use `man convert` in Terminal to see the manual. - For more advanced options, refer to the ImageMagick documentation or use `man convert` in Terminal to see the manual.
```
This guide should help you install ImageMagick using Homebrew and resize images easily on your Mac. This guide should help you install ImageMagick using Homebrew and resize images easily on your Mac.