57 lines
1.6 KiB
Markdown
57 lines
1.6 KiB
Markdown
# Image Tools
|
|
|
|
Use `resize-images.ps1` to make web-sized PNGs for the index page.
|
|
|
|
Run commands from the project root.
|
|
|
|
## Presets
|
|
|
|
| Preset | Size | Use |
|
|
| --- | --- | --- |
|
|
| `logo` | 1200px wide | Source logo used in the masthead |
|
|
| `masthead` | 860px wide | Large feature image or decorative logo |
|
|
| `feature` | 900x506 | Main "What is TenWholeYears?" image |
|
|
| `card` | 600x338 | Three-column Explore section images |
|
|
| `gallery` | 480x270 | Gallery thumbnails |
|
|
| `banner` | 1920x1080 | Large background or hero screenshots |
|
|
| `platform-icon` | 256x256 | Square padded platform logos for the downloads page |
|
|
| `profile` | 512x512 | Square cropped profile pictures for credits |
|
|
|
|
## Examples
|
|
|
|
Resize one image for the intro feature section:
|
|
|
|
```powershell
|
|
.\tools\resize-images.ps1 -InputPath "C:\Users\Holden\Desktop\screenshot.png" -Preset feature
|
|
```
|
|
|
|
Resize one image and choose the output filename:
|
|
|
|
```powershell
|
|
.\tools\resize-images.ps1 -InputPath "C:\Users\Holden\Desktop\screenshot.png" -Preset gallery -OutputName "gallery-museum.png"
|
|
```
|
|
|
|
Resize every PNG/JPG/BMP in a folder:
|
|
|
|
```powershell
|
|
.\tools\resize-images.ps1 -InputPath "C:\Users\Holden\Desktop\recroom-screenshots" -Preset gallery
|
|
```
|
|
|
|
Resize and crop a profile picture for the credits section:
|
|
|
|
```powershell
|
|
.\tools\resize-images.ps1 -InputPath "C:\Users\Holden\Desktop\person.png" -Preset profile -OutputDir "public/img/profiles" -OutputName "person.png"
|
|
```
|
|
|
|
By default, output files go here:
|
|
|
|
```text
|
|
public/img/generated/
|
|
```
|
|
|
|
Then use them in Astro like this:
|
|
|
|
```astro
|
|
<img src="/img/generated/gallery-museum.png" alt="Describe the screenshot" />
|
|
```
|