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
This guide provides steps to install ImageMagick using Homebrew and resize an image on a Mac.
@@ -11,32 +8,32 @@ This guide provides steps to install ImageMagick using Homebrew and resize an im
2. **Install Homebrew:** If you don't have Homebrew installed, execute the following command in Terminal:
```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:
```bash
brew install imagemagick
```
3. **Install ImageMagick:** Once Homebrew is installed, run this command to install ImageMagick:
```bash
brew install imagemagick
```
## Resizing an Image
## Resizing an Image
1. **Navigate to Image Folder:** Change the directory to where your image is located.
```bash
cd /path/to/your/image/directory
```
1. **Navigate to Image Folder:** Change the directory to where your image is located.
```bash
cd /path/to/your/image/directory
```
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
convert original.jpg -resize 600x resized.jpg
```
This will create a new resized image named `resized.jpg` in the same directory.
```bash
convert original.jpg -resize 600x resized.jpg
```
## Notes
This will create a new resized image named `resized.jpg` in the same directory.
- 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.
- For more advanced options, refer to the ImageMagick documentation or use `man convert` in Terminal to see the manual.
```
## Notes
This guide should help you install ImageMagick using Homebrew and resize images easily on your Mac.
- 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.
- 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.