@mediaproc/image 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +529 -67
- package/dist/cli.js +22 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/affine.d.ts +3 -0
- package/dist/commands/affine.d.ts.map +1 -0
- package/dist/commands/affine.js +154 -0
- package/dist/commands/affine.js.map +1 -0
- package/dist/commands/auto-orient.d.ts +3 -0
- package/dist/commands/auto-orient.d.ts.map +1 -0
- package/dist/commands/auto-orient.js +106 -0
- package/dist/commands/auto-orient.js.map +1 -0
- package/dist/commands/boolean.d.ts +3 -0
- package/dist/commands/boolean.d.ts.map +1 -0
- package/dist/commands/boolean.js +153 -0
- package/dist/commands/boolean.js.map +1 -0
- package/dist/commands/dilate.d.ts +3 -0
- package/dist/commands/dilate.d.ts.map +1 -0
- package/dist/commands/dilate.js +139 -0
- package/dist/commands/dilate.js.map +1 -0
- package/dist/commands/erode.d.ts +3 -0
- package/dist/commands/erode.d.ts.map +1 -0
- package/dist/commands/erode.js +139 -0
- package/dist/commands/erode.js.map +1 -0
- package/dist/commands/flatten.d.ts +3 -0
- package/dist/commands/flatten.d.ts.map +1 -0
- package/dist/commands/flatten.js +130 -0
- package/dist/commands/flatten.js.map +1 -0
- package/dist/commands/flop.d.ts +3 -0
- package/dist/commands/flop.d.ts.map +1 -0
- package/dist/commands/flop.js +87 -0
- package/dist/commands/flop.js.map +1 -0
- package/dist/commands/linear.d.ts +3 -0
- package/dist/commands/linear.d.ts.map +1 -0
- package/dist/commands/linear.js +133 -0
- package/dist/commands/linear.js.map +1 -0
- package/dist/commands/recomb.d.ts +3 -0
- package/dist/commands/recomb.d.ts.map +1 -0
- package/dist/commands/recomb.js +146 -0
- package/dist/commands/recomb.js.map +1 -0
- package/dist/commands/threshold.d.ts +3 -0
- package/dist/commands/threshold.d.ts.map +1 -0
- package/dist/commands/threshold.js +126 -0
- package/dist/commands/threshold.js.map +1 -0
- package/dist/commands/unflatten.d.ts +3 -0
- package/dist/commands/unflatten.d.ts.map +1 -0
- package/dist/commands/unflatten.js +105 -0
- package/dist/commands/unflatten.js.map +1 -0
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +22 -0
- package/dist/register.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# 📸 MediaProc Image Plugin
|
|
2
2
|
|
|
3
|
-
Professional image processing CLI powered by [Sharp](https://sharp.pixelplumbing.com/). Fast, efficient, and feature-rich image manipulation toolkit with **
|
|
3
|
+
Professional image processing CLI powered by [Sharp](https://sharp.pixelplumbing.com/). Fast, efficient, and feature-rich image manipulation toolkit with **49 comprehensive commands**.
|
|
4
4
|
|
|
5
5
|
## 📑 Table of Contents
|
|
6
6
|
|
|
7
7
|
- [Features](#-features)
|
|
8
8
|
- [Installation & Usage](#-installation--usage)
|
|
9
9
|
- [Quick Start](#-quick-start)
|
|
10
|
+
- [Global Options & Common Flags](#-global-options--common-flags)
|
|
10
11
|
- [Commands Overview](#-commands-overview)
|
|
11
12
|
- [Detailed Command Reference](#-detailed-command-reference)
|
|
12
|
-
- [Transform & Resize](#-transform--resize-
|
|
13
|
-
- [Color & Tone](#-color--tone-
|
|
14
|
-
- [Effects & Filters](#-effects--filters-
|
|
13
|
+
- [Transform & Resize](#-transform--resize-10-commands)
|
|
14
|
+
- [Color & Tone](#-color--tone-10-commands)
|
|
15
|
+
- [Effects & Filters](#-effects--filters-9-commands)
|
|
15
16
|
- [Advanced Operations](#-advanced-operations-6-commands)
|
|
16
17
|
- [Smart/AI Operations](#-smartai-operations-6-commands)
|
|
17
|
-
- [Utility Commands](#-utility-
|
|
18
|
+
- [Utility Commands](#-utility-8-commands)
|
|
18
19
|
- [Real-World Workflows](#-real-world-workflows)
|
|
19
|
-
- [Global Options](#-global-options)
|
|
20
20
|
- [Usage Tips](#-usage-tips)
|
|
21
21
|
- [Troubleshooting](#-troubleshooting)
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ Professional image processing CLI powered by [Sharp](https://sharp.pixelplumbing
|
|
|
25
25
|
## ✨ Features
|
|
26
26
|
|
|
27
27
|
- 🚀 **High Performance** - Built on libvips for blazing fast processing
|
|
28
|
-
- 🎨 **
|
|
28
|
+
- 🎨 **49 Commands** - Comprehensive image manipulation toolkit covering all Sharp operations
|
|
29
29
|
- 🔧 **Professional Features** - Quality control, dry-run mode, verbose logging
|
|
30
30
|
- 📦 **Modern Formats** - WebP, AVIF, JPEG, PNG, TIFF, GIF support
|
|
31
31
|
- 🎯 **Simple CLI** - Intuitive command-line interface
|
|
@@ -72,6 +72,7 @@ mediaproc-image convert photo.jpg -f webp
|
|
|
72
72
|
## 🎯 Quick Start
|
|
73
73
|
|
|
74
74
|
**With Universal CLI:**
|
|
75
|
+
|
|
75
76
|
```bash
|
|
76
77
|
# Resize an image
|
|
77
78
|
mediaproc image resize photo.jpg -w 800 -h 600
|
|
@@ -90,6 +91,7 @@ mediaproc image resize --help
|
|
|
90
91
|
```
|
|
91
92
|
|
|
92
93
|
**With Standalone Plugin:**
|
|
94
|
+
|
|
93
95
|
```bash
|
|
94
96
|
# Same commands, different prefix
|
|
95
97
|
mediaproc-image resize photo.jpg -w 800 -h 600
|
|
@@ -97,57 +99,285 @@ mediaproc-image convert photo.jpg -f webp -q 85
|
|
|
97
99
|
mediaproc-image thumbnail photo.jpg -s 150
|
|
98
100
|
```
|
|
99
101
|
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 🌐 Global Options & Common Flags
|
|
105
|
+
|
|
106
|
+
All image commands share a consistent set of common flags for unified behavior:
|
|
107
|
+
|
|
108
|
+
### Standard Flags (Available on All Commands)
|
|
109
|
+
|
|
110
|
+
| Flag | Alias | Description | Default |
|
|
111
|
+
| ------------------- | ----- | --------------------------------- | ------------------------- |
|
|
112
|
+
| `--output <path>` | `-o` | Output file path | `<input>-<command>.<ext>` |
|
|
113
|
+
| `--quality <1-100>` | `-q` | Output quality (1-100) | `90` |
|
|
114
|
+
| `--dry-run` | - | Preview changes without executing | `false` |
|
|
115
|
+
| `--verbose` | `-v` | Show detailed processing output | `false` |
|
|
116
|
+
| `--help` | - | Display command-specific help | - |
|
|
117
|
+
|
|
118
|
+
### How Commands Work
|
|
119
|
+
|
|
120
|
+
**1. Input Processing:**
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Commands accept file paths (relative or absolute)
|
|
124
|
+
mediaproc image resize photo.jpg -w 800
|
|
125
|
+
mediaproc image resize /path/to/photo.jpg -w 800
|
|
126
|
+
mediaproc image resize ../images/photo.jpg -w 800
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**2. Output Naming:**
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Default: <input>-<command>.<ext>
|
|
133
|
+
mediaproc image blur photo.jpg # → photo-blur.jpg
|
|
134
|
+
|
|
135
|
+
# Custom output path:
|
|
136
|
+
mediaproc image blur photo.jpg -o soft.jpg
|
|
137
|
+
|
|
138
|
+
# Preserve format or change:
|
|
139
|
+
mediaproc image blur photo.jpg -o output.webp # Changes format
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**3. Quality Control:**
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# High quality (larger file size)
|
|
146
|
+
mediaproc image resize photo.jpg -w 1920 -q 95
|
|
147
|
+
|
|
148
|
+
# Balanced (default)
|
|
149
|
+
mediaproc image resize photo.jpg -w 1920 -q 90
|
|
150
|
+
|
|
151
|
+
# Compressed (smaller file size)
|
|
152
|
+
mediaproc image resize photo.jpg -w 1920 -q 75
|
|
153
|
+
|
|
154
|
+
# Note: Quality applies to lossy formats (JPEG, WebP)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**4. Dry-Run Mode:**
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Preview what will happen without processing
|
|
161
|
+
mediaproc image resize photo.jpg -w 1920 --dry-run
|
|
162
|
+
|
|
163
|
+
# Shows: input, output paths, and operation details
|
|
164
|
+
# Useful for testing commands before batch processing
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**5. Verbose Output:**
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Show detailed processing information
|
|
171
|
+
mediaproc image resize photo.jpg -w 1920 -v
|
|
172
|
+
|
|
173
|
+
# Displays:
|
|
174
|
+
# - Configuration settings
|
|
175
|
+
# - Processing steps
|
|
176
|
+
# - Metadata information
|
|
177
|
+
# - File size comparisons
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Command-Specific Options
|
|
181
|
+
|
|
182
|
+
Each command has unique options for its specific operation:
|
|
183
|
+
|
|
184
|
+
**Transform Commands:**
|
|
185
|
+
|
|
186
|
+
- Resize: `--width`, `--height`, `--fit`, `--position`, `--kernel`
|
|
187
|
+
- Rotate: `--angle`, `--background`
|
|
188
|
+
- Crop: `--left`, `--top`, `--extract-strategy`
|
|
189
|
+
|
|
190
|
+
**Color Commands:**
|
|
191
|
+
|
|
192
|
+
- Modulate: `--brightness`, `--saturation`, `--hue`
|
|
193
|
+
- Gamma: `--value`
|
|
194
|
+
- Tint: `--color`
|
|
195
|
+
|
|
196
|
+
**Effect Commands:**
|
|
197
|
+
|
|
198
|
+
- Blur: `--sigma`
|
|
199
|
+
- Sharpen: `--amount`, `--mode`
|
|
200
|
+
- Threshold: `--value`
|
|
201
|
+
|
|
202
|
+
**Advanced Commands:**
|
|
203
|
+
|
|
204
|
+
- Composite: `--overlay`, `--blend`, `--gravity`
|
|
205
|
+
- Boolean: `--operation`, `--operand`
|
|
206
|
+
- Recomb: `--matrix`
|
|
207
|
+
|
|
208
|
+
### Getting Help
|
|
209
|
+
|
|
210
|
+
**View all available commands:**
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Universal CLI
|
|
214
|
+
mediaproc image --help
|
|
215
|
+
|
|
216
|
+
# Standalone plugin
|
|
217
|
+
mediaproc-image --help
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Get command-specific help:**
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Shows detailed usage, options, examples
|
|
224
|
+
mediaproc image resize --help
|
|
225
|
+
mediaproc image blur --help
|
|
226
|
+
mediaproc image composite --help
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Help includes:**
|
|
230
|
+
|
|
231
|
+
- 📝 Description and purpose
|
|
232
|
+
- 🎯 Usage syntax
|
|
233
|
+
- ⚙️ Available options and flags
|
|
234
|
+
- 💡 Practical examples
|
|
235
|
+
- 📚 Use cases and workflows
|
|
236
|
+
- 💪 Tips and best practices
|
|
237
|
+
|
|
238
|
+
### Format Support
|
|
239
|
+
|
|
240
|
+
**Input Formats:**
|
|
241
|
+
|
|
242
|
+
- JPEG (`.jpg`, `.jpeg`)
|
|
243
|
+
- PNG (`.png`)
|
|
244
|
+
- WebP (`.webp`)
|
|
245
|
+
- AVIF (`.avif`)
|
|
246
|
+
- TIFF (`.tiff`, `.tif`)
|
|
247
|
+
- GIF (`.gif`)
|
|
248
|
+
- SVG (`.svg`)
|
|
249
|
+
- HEIF (`.heic`, `.heif`)
|
|
250
|
+
|
|
251
|
+
**Output Formats:**
|
|
252
|
+
|
|
253
|
+
- JPEG - Best for photos (lossy)
|
|
254
|
+
- PNG - Best for graphics with transparency (lossless)
|
|
255
|
+
- WebP - 25-35% smaller than JPEG (lossy/lossless)
|
|
256
|
+
- AVIF - 50% smaller than JPEG (lossy/lossless)
|
|
257
|
+
- TIFF - Best for professional/print (lossless)
|
|
258
|
+
- GIF - Best for simple animations (limited colors)
|
|
259
|
+
|
|
260
|
+
### Performance Tips
|
|
261
|
+
|
|
262
|
+
**1. Format Selection:**
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Use WebP for web (smaller, fast)
|
|
266
|
+
mediaproc image convert photo.jpg -f webp -q 85
|
|
267
|
+
|
|
268
|
+
# Use PNG for graphics with transparency
|
|
269
|
+
mediaproc image convert logo.jpg -f png
|
|
270
|
+
|
|
271
|
+
# Use AVIF for maximum compression (slower encoding)
|
|
272
|
+
mediaproc image convert photo.jpg -f avif -q 80
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**2. Quality vs Size:**
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# High quality (minimal compression)
|
|
279
|
+
-q 95 # Large file, excellent quality
|
|
280
|
+
|
|
281
|
+
# Balanced (recommended)
|
|
282
|
+
-q 85 # Good file size, great quality
|
|
283
|
+
|
|
284
|
+
# Aggressive (maximum compression)
|
|
285
|
+
-q 70 # Small file, acceptable quality
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**3. Chaining Operations:**
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Instead of multiple commands:
|
|
292
|
+
mediaproc image resize input.jpg -w 1920 -o step1.jpg
|
|
293
|
+
mediaproc image blur step1.jpg -o step2.jpg
|
|
294
|
+
mediaproc image sharpen step2.jpg -o final.jpg
|
|
295
|
+
|
|
296
|
+
# Consider using pipeline/batch features:
|
|
297
|
+
mediaproc image batch images/ --operation "resize -w 1920"
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**4. Batch Processing:**
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
# Process multiple files efficiently
|
|
304
|
+
for file in *.jpg; do
|
|
305
|
+
mediaproc image optimize "$file" -q 85
|
|
306
|
+
done
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
100
311
|
## 📋 Commands Overview
|
|
101
312
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
108
|
-
- **
|
|
109
|
-
- **
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- **
|
|
113
|
-
- **
|
|
114
|
-
- **
|
|
115
|
-
- **
|
|
116
|
-
- **negate** - Create negative image
|
|
117
|
-
- **normalize** - Auto-enhance contrast
|
|
313
|
+
All **49 commands** organized by category:
|
|
314
|
+
|
|
315
|
+
### 🔄 Transform & Resize (10 commands)
|
|
316
|
+
|
|
317
|
+
- **resize** - Resize images with advanced fit modes (cover, contain, fill, inside, outside)
|
|
318
|
+
- **crop** - Extract rectangular regions with positioning options
|
|
319
|
+
- **rotate** - Rotate by any angle with background control
|
|
320
|
+
- **flip** - Vertical mirroring (top-to-bottom flip)
|
|
321
|
+
- **flop** - Horizontal mirroring (left-to-right flip)
|
|
322
|
+
- **auto-orient** - Auto-rotate based on EXIF orientation data
|
|
323
|
+
- **affine** - Apply affine transformation matrix (scale, shear, reflect)
|
|
324
|
+
- **trim** - Auto-remove uniform borders from edges
|
|
325
|
+
- **extend** - Add padding/borders with custom colors
|
|
326
|
+
- **thumbnail** - Generate thumbnails (64px to 512px)
|
|
118
327
|
|
|
119
|
-
###
|
|
120
|
-
|
|
121
|
-
- **
|
|
122
|
-
- **
|
|
328
|
+
### 🎨 Color & Tone (10 commands)
|
|
329
|
+
|
|
330
|
+
- **modulate** - Adjust brightness, saturation, and hue
|
|
331
|
+
- **gamma** - Apply gamma correction for midtones (0.1-3.0)
|
|
332
|
+
- **tint** - Apply color tint overlay (RGB hex colors)
|
|
333
|
+
- **grayscale** - Convert to black & white
|
|
334
|
+
- **negate** - Create negative/inverted image
|
|
335
|
+
- **normalize** - Auto-enhance contrast and brightness
|
|
336
|
+
- **linear** - Apply linear formula: output = (a * input) + b
|
|
337
|
+
- **recomb** - Recombine RGB channels using transformation matrix
|
|
338
|
+
- **flatten** - Remove alpha transparency with background color
|
|
339
|
+
- **unflatten** - Add alpha channel (RGB→RGBA)
|
|
340
|
+
|
|
341
|
+
### ✨ Effects & Filters (9 commands)
|
|
342
|
+
|
|
343
|
+
- **blur** - Gaussian blur effect (0.3-1000 sigma)
|
|
344
|
+
- **sharpen** - Enhance image details and edges
|
|
345
|
+
- **median** - Noise reduction filter (1-50 size)
|
|
123
346
|
- **sepia** - Vintage sepia tone effect
|
|
124
|
-
- **vignette** - Darken edges for focus
|
|
125
|
-
- **pixelate** - Retro pixel art effect
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- **
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- **
|
|
136
|
-
- **
|
|
137
|
-
- **
|
|
347
|
+
- **vignette** - Darken edges for artistic focus
|
|
348
|
+
- **pixelate** - Retro pixel art effect with custom pixel size
|
|
349
|
+
- **threshold** - Binary black/white conversion (0-255)
|
|
350
|
+
- **dilate** - Morphological dilation (expand bright regions)
|
|
351
|
+
- **erode** - Morphological erosion (expand dark regions)
|
|
352
|
+
|
|
353
|
+
### 🎯 Advanced Operations (6 commands)
|
|
354
|
+
|
|
355
|
+
- **composite** - Layer images with blend modes (overlay, multiply, screen)
|
|
356
|
+
- **extract** - Extract color channels (R, G, B, alpha) or regions
|
|
357
|
+
- **border** - Add decorative frames with custom colors
|
|
358
|
+
- **clahe** - Contrast-limited adaptive histogram equalization
|
|
359
|
+
- **convolve** - Apply custom convolution kernels (sharpen, emboss, edge)
|
|
360
|
+
- **boolean** - Perform boolean operations between images (AND, OR, XOR)
|
|
361
|
+
|
|
362
|
+
### 🤖 Smart/AI Operations (6 commands)
|
|
363
|
+
|
|
364
|
+
- **smart-crop** - Intelligent content-aware cropping (attention/entropy)
|
|
365
|
+
- **auto-enhance** - Automatic color and contrast enhancement
|
|
366
|
+
- **palette** - Extract dominant color palettes (2-256 colors)
|
|
138
367
|
- **dominant-color** - Quick dominant color extraction
|
|
139
368
|
- **grid** - Combine images into collage layouts
|
|
140
|
-
- **batch** - Process multiple images at once
|
|
141
|
-
|
|
142
|
-
### 🔧 Utility
|
|
143
|
-
|
|
144
|
-
- **
|
|
145
|
-
- **
|
|
146
|
-
- **
|
|
147
|
-
- **
|
|
369
|
+
- **batch** - Process multiple images at once with any operation
|
|
370
|
+
|
|
371
|
+
### 🔧 Utility (8 commands)
|
|
372
|
+
|
|
373
|
+
- **convert** - Format conversion (JPG, PNG, WebP, AVIF, TIFF, GIF)
|
|
374
|
+
- **optimize** - Size optimization (up to 70% reduction)
|
|
375
|
+
- **watermark** - Add watermarks with positioning and opacity
|
|
376
|
+
- **stats** - Detailed technical image statistics
|
|
377
|
+
- **split** - Split image into grid tiles
|
|
148
378
|
- **stack** - Stack images horizontally/vertically
|
|
149
|
-
- **mirror** - Create mirror/kaleidoscope effects
|
|
150
|
-
- **metadata** - View
|
|
379
|
+
- **mirror** - Create mirror/kaleidoscope effects (horizontal, vertical, quad)
|
|
380
|
+
- **metadata** - View, export, or remove EXIF data
|
|
151
381
|
|
|
152
382
|
---
|
|
153
383
|
|
|
@@ -158,11 +388,13 @@ mediaproc-image thumbnail photo.jpg -s 150
|
|
|
158
388
|
Resize images with advanced options for fit modes, aspect ratio control, and quality settings.
|
|
159
389
|
|
|
160
390
|
**Usage:**
|
|
391
|
+
|
|
161
392
|
```bash
|
|
162
393
|
mediaproc image resize <input> [options]
|
|
163
394
|
```
|
|
164
395
|
|
|
165
396
|
**Options:**
|
|
397
|
+
|
|
166
398
|
- `-w, --width <width>` - Target width in pixels
|
|
167
399
|
- `-h, --height <height>` - Target height in pixels
|
|
168
400
|
- `--fit <mode>` - Fit mode: cover, contain, fill, inside, outside (default: cover)
|
|
@@ -177,6 +409,7 @@ mediaproc image resize <input> [options]
|
|
|
177
409
|
- `--help` - Display help
|
|
178
410
|
|
|
179
411
|
**Examples:**
|
|
412
|
+
|
|
180
413
|
```bash
|
|
181
414
|
# Resize to 800x600 (crop to fit)
|
|
182
415
|
mediaproc image resize photo.jpg -w 800 -h 600
|
|
@@ -192,6 +425,7 @@ mediaproc image resize photo.jpg -w 2000 --kernel lanczos3 -q 95
|
|
|
192
425
|
```
|
|
193
426
|
|
|
194
427
|
**Fit Modes:**
|
|
428
|
+
|
|
195
429
|
- **cover** - Fill entire area, crop if needed (default)
|
|
196
430
|
- **contain** - Fit inside with padding
|
|
197
431
|
- **fill** - Stretch to fill (may distort)
|
|
@@ -205,11 +439,13 @@ mediaproc image resize photo.jpg -w 2000 --kernel lanczos3 -q 95
|
|
|
205
439
|
Convert images between formats with quality control and compression options.
|
|
206
440
|
|
|
207
441
|
**Usage:**
|
|
442
|
+
|
|
208
443
|
```bash
|
|
209
444
|
mediaproc image convert <input> [options]
|
|
210
445
|
```
|
|
211
446
|
|
|
212
447
|
**Options:**
|
|
448
|
+
|
|
213
449
|
- `-f, --format <format>` - Output format: jpg, png, webp, avif, tiff, gif (default: webp)
|
|
214
450
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
215
451
|
- `--compression <level>` - PNG compression level 0-9 (default: 9)
|
|
@@ -220,6 +456,7 @@ mediaproc image convert <input> [options]
|
|
|
220
456
|
- `--help` - Display help
|
|
221
457
|
|
|
222
458
|
**Examples:**
|
|
459
|
+
|
|
223
460
|
```bash
|
|
224
461
|
# Convert to WebP
|
|
225
462
|
mediaproc image convert photo.jpg -f webp
|
|
@@ -235,6 +472,7 @@ mediaproc image convert photo.jpg -f png --compression 9
|
|
|
235
472
|
```
|
|
236
473
|
|
|
237
474
|
**Format Guide:**
|
|
475
|
+
|
|
238
476
|
- **WebP** - Modern format, 25-35% smaller than JPG/PNG
|
|
239
477
|
- **AVIF** - Newest format, even smaller than WebP
|
|
240
478
|
- **JPG** - Best for photos, lossy compression
|
|
@@ -249,11 +487,13 @@ mediaproc image convert photo.jpg -f png --compression 9
|
|
|
249
487
|
Convert images to grayscale (black and white).
|
|
250
488
|
|
|
251
489
|
**Usage:**
|
|
490
|
+
|
|
252
491
|
```bash
|
|
253
492
|
mediaproc image grayscale <input> [options]
|
|
254
493
|
```
|
|
255
494
|
|
|
256
495
|
**Options:**
|
|
496
|
+
|
|
257
497
|
- `-o, --output <path>` - Output file path
|
|
258
498
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
259
499
|
- `--dry-run` - Preview without executing
|
|
@@ -261,6 +501,7 @@ mediaproc image grayscale <input> [options]
|
|
|
261
501
|
- `--help` - Display help
|
|
262
502
|
|
|
263
503
|
**Examples:**
|
|
504
|
+
|
|
264
505
|
```bash
|
|
265
506
|
# Convert to grayscale
|
|
266
507
|
mediaproc image grayscale photo.jpg
|
|
@@ -273,6 +514,7 @@ mediaproc image greyscale photo.jpg
|
|
|
273
514
|
```
|
|
274
515
|
|
|
275
516
|
**Use Cases:**
|
|
517
|
+
|
|
276
518
|
- Artistic black and white photography
|
|
277
519
|
- Document scanning
|
|
278
520
|
- Reducing file size
|
|
@@ -286,11 +528,13 @@ mediaproc image greyscale photo.jpg
|
|
|
286
528
|
Apply Gaussian blur effect with configurable strength.
|
|
287
529
|
|
|
288
530
|
**Usage:**
|
|
531
|
+
|
|
289
532
|
```bash
|
|
290
533
|
mediaproc image blur <input> [options]
|
|
291
534
|
```
|
|
292
535
|
|
|
293
536
|
**Options:**
|
|
537
|
+
|
|
294
538
|
- `-s, --sigma <sigma>` - Blur strength 0.3-1000 (default: 5)
|
|
295
539
|
- `-o, --output <path>` - Output file path
|
|
296
540
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -299,6 +543,7 @@ mediaproc image blur <input> [options]
|
|
|
299
543
|
- `--help` - Display help
|
|
300
544
|
|
|
301
545
|
**Examples:**
|
|
546
|
+
|
|
302
547
|
```bash
|
|
303
548
|
# Default blur
|
|
304
549
|
mediaproc image blur photo.jpg
|
|
@@ -311,6 +556,7 @@ mediaproc image blur photo.jpg -s 2
|
|
|
311
556
|
```
|
|
312
557
|
|
|
313
558
|
**Blur Strength Guide:**
|
|
559
|
+
|
|
314
560
|
- **1-5** - Light blur (slight softness)
|
|
315
561
|
- **5-15** - Medium blur (noticeable effect)
|
|
316
562
|
- **15-30** - Strong blur (heavy softness)
|
|
@@ -323,11 +569,13 @@ mediaproc image blur photo.jpg -s 2
|
|
|
323
569
|
Sharpen images to enhance details and edges.
|
|
324
570
|
|
|
325
571
|
**Usage:**
|
|
572
|
+
|
|
326
573
|
```bash
|
|
327
574
|
mediaproc image sharpen <input> [options]
|
|
328
575
|
```
|
|
329
576
|
|
|
330
577
|
**Options:**
|
|
578
|
+
|
|
331
579
|
- `-s, --sigma <sigma>` - Sharpening strength 0.01-10 (default: 1)
|
|
332
580
|
- `--flat <flat>` - Sharpening for flat areas (default: 1)
|
|
333
581
|
- `--jagged <jagged>` - Sharpening for jagged areas (default: 2)
|
|
@@ -338,6 +586,7 @@ mediaproc image sharpen <input> [options]
|
|
|
338
586
|
- `--help` - Display help
|
|
339
587
|
|
|
340
588
|
**Examples:**
|
|
589
|
+
|
|
341
590
|
```bash
|
|
342
591
|
# Default sharpening
|
|
343
592
|
mediaproc image sharpen photo.jpg
|
|
@@ -350,6 +599,7 @@ mediaproc image sharpen photo.jpg -s 1.5 --flat 1.5 --jagged 2.5
|
|
|
350
599
|
```
|
|
351
600
|
|
|
352
601
|
**Sharpening Guide:**
|
|
602
|
+
|
|
353
603
|
- **0.3-0.7** - Subtle enhancement
|
|
354
604
|
- **1.0-1.5** - Normal sharpening
|
|
355
605
|
- **2.0-3.0** - Strong sharpening
|
|
@@ -362,11 +612,13 @@ mediaproc image sharpen photo.jpg -s 1.5 --flat 1.5 --jagged 2.5
|
|
|
362
612
|
Rotate images by any angle with background color control.
|
|
363
613
|
|
|
364
614
|
**Usage:**
|
|
615
|
+
|
|
365
616
|
```bash
|
|
366
617
|
mediaproc image rotate <input> [options]
|
|
367
618
|
```
|
|
368
619
|
|
|
369
620
|
**Options:**
|
|
621
|
+
|
|
370
622
|
- `-a, --angle <degrees>` - Rotation angle in degrees (default: 90)
|
|
371
623
|
- `--background <color>` - Background color (default: black)
|
|
372
624
|
- `-o, --output <path>` - Output file path
|
|
@@ -376,6 +628,7 @@ mediaproc image rotate <input> [options]
|
|
|
376
628
|
- `--help` - Display help
|
|
377
629
|
|
|
378
630
|
**Examples:**
|
|
631
|
+
|
|
379
632
|
```bash
|
|
380
633
|
# Rotate 90° clockwise
|
|
381
634
|
mediaproc image rotate photo.jpg -a 90
|
|
@@ -391,6 +644,7 @@ mediaproc image rotate photo.jpg -a -90
|
|
|
391
644
|
```
|
|
392
645
|
|
|
393
646
|
**Common Angles:**
|
|
647
|
+
|
|
394
648
|
- **90** - Rotate right (clockwise)
|
|
395
649
|
- **-90 or 270** - Rotate left (counter-clockwise)
|
|
396
650
|
- **180** - Upside down
|
|
@@ -403,11 +657,13 @@ mediaproc image rotate photo.jpg -a -90
|
|
|
403
657
|
Mirror images horizontally, vertically, or both.
|
|
404
658
|
|
|
405
659
|
**Usage:**
|
|
660
|
+
|
|
406
661
|
```bash
|
|
407
662
|
mediaproc image flip <input> [options]
|
|
408
663
|
```
|
|
409
664
|
|
|
410
665
|
**Options:**
|
|
666
|
+
|
|
411
667
|
- `-d, --direction <direction>` - Direction: horizontal, vertical, both (default: horizontal)
|
|
412
668
|
- `-o, --output <path>` - Output file path
|
|
413
669
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -416,6 +672,7 @@ mediaproc image flip <input> [options]
|
|
|
416
672
|
- `--help` - Display help
|
|
417
673
|
|
|
418
674
|
**Examples:**
|
|
675
|
+
|
|
419
676
|
```bash
|
|
420
677
|
# Flip horizontally (mirror left-right)
|
|
421
678
|
mediaproc image flip photo.jpg
|
|
@@ -434,11 +691,13 @@ mediaproc image flip photo.jpg -d both
|
|
|
434
691
|
Extract rectangular regions from images.
|
|
435
692
|
|
|
436
693
|
**Usage:**
|
|
694
|
+
|
|
437
695
|
```bash
|
|
438
696
|
mediaproc image crop <input> [options]
|
|
439
697
|
```
|
|
440
698
|
|
|
441
699
|
**Options:**
|
|
700
|
+
|
|
442
701
|
- `-x <pixels>` - X coordinate (left position, required)
|
|
443
702
|
- `-y <pixels>` - Y coordinate (top position, required)
|
|
444
703
|
- `-w, --width <pixels>` - Crop width (required)
|
|
@@ -450,6 +709,7 @@ mediaproc image crop <input> [options]
|
|
|
450
709
|
- `--help` - Display help
|
|
451
710
|
|
|
452
711
|
**Examples:**
|
|
712
|
+
|
|
453
713
|
```bash
|
|
454
714
|
# Crop 800x600 region from top-left (0,0)
|
|
455
715
|
mediaproc image crop photo.jpg -x 0 -y 0 -w 800 -h 600
|
|
@@ -468,11 +728,13 @@ mediaproc image crop photo.jpg -x 400 -y 300 -w 800 -h 600
|
|
|
468
728
|
Optimize image file size with minimal quality loss.
|
|
469
729
|
|
|
470
730
|
**Usage:**
|
|
731
|
+
|
|
471
732
|
```bash
|
|
472
733
|
mediaproc image optimize <input> [options]
|
|
473
734
|
```
|
|
474
735
|
|
|
475
736
|
**Options:**
|
|
737
|
+
|
|
476
738
|
- `-q, --quality <quality>` - Quality 1-100 (default: 85)
|
|
477
739
|
- `--aggressive` - More aggressive compression (quality 70)
|
|
478
740
|
- `-o, --output <path>` - Output file path
|
|
@@ -481,6 +743,7 @@ mediaproc image optimize <input> [options]
|
|
|
481
743
|
- `--help` - Display help
|
|
482
744
|
|
|
483
745
|
**Examples:**
|
|
746
|
+
|
|
484
747
|
```bash
|
|
485
748
|
# Optimize with quality 85
|
|
486
749
|
mediaproc image optimize photo.jpg
|
|
@@ -493,6 +756,7 @@ mediaproc image optimize pic.jpg --aggressive
|
|
|
493
756
|
```
|
|
494
757
|
|
|
495
758
|
**Quality Guide:**
|
|
759
|
+
|
|
496
760
|
- **90-100** - Minimal compression, large files
|
|
497
761
|
- **85-89** - Balanced (recommended for web)
|
|
498
762
|
- **70-84** - Good compression, slight quality loss
|
|
@@ -505,11 +769,13 @@ mediaproc image optimize pic.jpg --aggressive
|
|
|
505
769
|
Add watermarks to images with position and opacity control.
|
|
506
770
|
|
|
507
771
|
**Usage:**
|
|
772
|
+
|
|
508
773
|
```bash
|
|
509
774
|
mediaproc image watermark <input> <watermark> [options]
|
|
510
775
|
```
|
|
511
776
|
|
|
512
777
|
**Options:**
|
|
778
|
+
|
|
513
779
|
- `--position <position>` - Position: center, top-left, top-right, bottom-left, bottom-right (default: bottom-right)
|
|
514
780
|
- `--opacity <opacity>` - Opacity 0-1 (default: 0.5)
|
|
515
781
|
- `--scale <scale>` - Watermark scale 0.1-1 (default: 0.2)
|
|
@@ -520,6 +786,7 @@ mediaproc image watermark <input> <watermark> [options]
|
|
|
520
786
|
- `--help` - Display help
|
|
521
787
|
|
|
522
788
|
**Examples:**
|
|
789
|
+
|
|
523
790
|
```bash
|
|
524
791
|
# Add watermark to bottom-right
|
|
525
792
|
mediaproc image watermark photo.jpg logo.png
|
|
@@ -535,6 +802,7 @@ mediaproc image watermark photo.jpg brand.png --scale 0.3 --position top-right
|
|
|
535
802
|
```
|
|
536
803
|
|
|
537
804
|
**Opacity Guide:**
|
|
805
|
+
|
|
538
806
|
- **0.1-0.3** - Very subtle
|
|
539
807
|
- **0.4-0.6** - Balanced (recommended)
|
|
540
808
|
- **0.7-0.9** - Clearly visible
|
|
@@ -547,11 +815,13 @@ mediaproc image watermark photo.jpg brand.png --scale 0.3 --position top-right
|
|
|
547
815
|
Generate thumbnails with configurable sizes.
|
|
548
816
|
|
|
549
817
|
**Usage:**
|
|
818
|
+
|
|
550
819
|
```bash
|
|
551
820
|
mediaproc image thumbnail <input> [options]
|
|
552
821
|
```
|
|
553
822
|
|
|
554
823
|
**Options:**
|
|
824
|
+
|
|
555
825
|
- `-s, --size <size>` - Thumbnail size in pixels (default: 150)
|
|
556
826
|
- `--fit <fit>` - Fit mode: cover, contain, fill, inside, outside (default: cover)
|
|
557
827
|
- `-q, --quality <quality>` - Quality 1-100 (default: 85)
|
|
@@ -561,6 +831,7 @@ mediaproc image thumbnail <input> [options]
|
|
|
561
831
|
- `--help` - Display help
|
|
562
832
|
|
|
563
833
|
**Examples:**
|
|
834
|
+
|
|
564
835
|
```bash
|
|
565
836
|
# Generate 150x150 thumbnail
|
|
566
837
|
mediaproc image thumbnail photo.jpg
|
|
@@ -573,6 +844,7 @@ mediaproc image thumbnail pic.jpg -s 100 --fit contain
|
|
|
573
844
|
```
|
|
574
845
|
|
|
575
846
|
**Common Sizes:**
|
|
847
|
+
|
|
576
848
|
- **64x64** - Favicon, small icons
|
|
577
849
|
- **150x150** - Default thumbnail
|
|
578
850
|
- **200x200** - Medium thumbnails
|
|
@@ -586,11 +858,13 @@ mediaproc image thumbnail pic.jpg -s 100 --fit contain
|
|
|
586
858
|
Apply color tint overlay to images.
|
|
587
859
|
|
|
588
860
|
**Usage:**
|
|
861
|
+
|
|
589
862
|
```bash
|
|
590
863
|
mediaproc image tint <input> [options]
|
|
591
864
|
```
|
|
592
865
|
|
|
593
866
|
**Options:**
|
|
867
|
+
|
|
594
868
|
- `-c, --color <color>` - Tint color (hex, rgb, or name, default: #0000ff)
|
|
595
869
|
- `-o, --output <path>` - Output file path
|
|
596
870
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -599,6 +873,7 @@ mediaproc image tint <input> [options]
|
|
|
599
873
|
- `--help` - Display help
|
|
600
874
|
|
|
601
875
|
**Examples:**
|
|
876
|
+
|
|
602
877
|
```bash
|
|
603
878
|
# Apply blue tint
|
|
604
879
|
mediaproc image tint photo.jpg -c blue
|
|
@@ -611,6 +886,7 @@ mediaproc image tint pic.jpg -c "rgb(255, 100, 50)"
|
|
|
611
886
|
```
|
|
612
887
|
|
|
613
888
|
**Common Tints:**
|
|
889
|
+
|
|
614
890
|
- **Sepia (#704214)** - Vintage/warm look
|
|
615
891
|
- **Blue (#0066cc)** - Cool/cold mood
|
|
616
892
|
- **Orange (#ff6600)** - Warm/sunset effect
|
|
@@ -624,11 +900,13 @@ mediaproc image tint pic.jpg -c "rgb(255, 100, 50)"
|
|
|
624
900
|
Create negative/inverted images.
|
|
625
901
|
|
|
626
902
|
**Usage:**
|
|
903
|
+
|
|
627
904
|
```bash
|
|
628
905
|
mediaproc image negate <input> [options]
|
|
629
906
|
```
|
|
630
907
|
|
|
631
908
|
**Options:**
|
|
909
|
+
|
|
632
910
|
- `--alpha` - Also negate alpha/transparency channel
|
|
633
911
|
- `-o, --output <path>` - Output file path
|
|
634
912
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -637,6 +915,7 @@ mediaproc image negate <input> [options]
|
|
|
637
915
|
- `--help` - Display help
|
|
638
916
|
|
|
639
917
|
**Examples:**
|
|
918
|
+
|
|
640
919
|
```bash
|
|
641
920
|
# Create negative
|
|
642
921
|
mediaproc image negate photo.jpg
|
|
@@ -646,6 +925,7 @@ mediaproc image negate image.png --alpha
|
|
|
646
925
|
```
|
|
647
926
|
|
|
648
927
|
**Use Cases:**
|
|
928
|
+
|
|
649
929
|
- Artistic effects
|
|
650
930
|
- X-ray style images
|
|
651
931
|
- Film negatives
|
|
@@ -659,11 +939,13 @@ mediaproc image negate image.png --alpha
|
|
|
659
939
|
Normalize images by auto-enhancing contrast.
|
|
660
940
|
|
|
661
941
|
**Usage:**
|
|
942
|
+
|
|
662
943
|
```bash
|
|
663
944
|
mediaproc image normalize <input> [options]
|
|
664
945
|
```
|
|
665
946
|
|
|
666
947
|
**Options:**
|
|
948
|
+
|
|
667
949
|
- `-o, --output <path>` - Output file path
|
|
668
950
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
669
951
|
- `--dry-run` - Preview without executing
|
|
@@ -671,6 +953,7 @@ mediaproc image normalize <input> [options]
|
|
|
671
953
|
- `--help` - Display help
|
|
672
954
|
|
|
673
955
|
**Examples:**
|
|
956
|
+
|
|
674
957
|
```bash
|
|
675
958
|
# Auto-enhance contrast
|
|
676
959
|
mediaproc image normalize photo.jpg
|
|
@@ -683,6 +966,7 @@ mediaproc image normalize overexposed.jpg
|
|
|
683
966
|
```
|
|
684
967
|
|
|
685
968
|
**Best For:**
|
|
969
|
+
|
|
686
970
|
- Underexposed photos
|
|
687
971
|
- Overexposed photos
|
|
688
972
|
- Low contrast images
|
|
@@ -696,11 +980,13 @@ mediaproc image normalize overexposed.jpg
|
|
|
696
980
|
Adjust brightness, saturation, and hue.
|
|
697
981
|
|
|
698
982
|
**Usage:**
|
|
983
|
+
|
|
699
984
|
```bash
|
|
700
985
|
mediaproc image modulate <input> [options]
|
|
701
986
|
```
|
|
702
987
|
|
|
703
988
|
**Options:**
|
|
989
|
+
|
|
704
990
|
- `-b, --brightness <value>` - Brightness multiplier 0.1-10 (default: 1)
|
|
705
991
|
- `-s, --saturation <value>` - Saturation multiplier 0.1-10 (default: 1)
|
|
706
992
|
- `--hue <degrees>` - Hue rotation -360 to 360 (default: 0)
|
|
@@ -711,6 +997,7 @@ mediaproc image modulate <input> [options]
|
|
|
711
997
|
- `--help` - Display help
|
|
712
998
|
|
|
713
999
|
**Examples:**
|
|
1000
|
+
|
|
714
1001
|
```bash
|
|
715
1002
|
# Increase brightness by 20%
|
|
716
1003
|
mediaproc image modulate photo.jpg -b 1.2
|
|
@@ -726,12 +1013,14 @@ mediaproc image modulate photo.jpg -b 1.2 -s 1.3 --hue 30
|
|
|
726
1013
|
```
|
|
727
1014
|
|
|
728
1015
|
**Brightness:**
|
|
1016
|
+
|
|
729
1017
|
- **0.5** - 50% darker
|
|
730
1018
|
- **1.0** - No change (default)
|
|
731
1019
|
- **1.5** - 50% brighter
|
|
732
1020
|
- **2.0** - Double brightness
|
|
733
1021
|
|
|
734
1022
|
**Saturation:**
|
|
1023
|
+
|
|
735
1024
|
- **0.0** - Grayscale
|
|
736
1025
|
- **1.0** - No change (default)
|
|
737
1026
|
- **1.5** - 50% more vibrant
|
|
@@ -744,11 +1033,13 @@ mediaproc image modulate photo.jpg -b 1.2 -s 1.3 --hue 30
|
|
|
744
1033
|
Apply gamma correction to adjust midtones.
|
|
745
1034
|
|
|
746
1035
|
**Usage:**
|
|
1036
|
+
|
|
747
1037
|
```bash
|
|
748
1038
|
mediaproc image gamma <input> [options]
|
|
749
1039
|
```
|
|
750
1040
|
|
|
751
1041
|
**Options:**
|
|
1042
|
+
|
|
752
1043
|
- `-g, --gamma <value>` - Gamma value 1-3 (default: 2.2)
|
|
753
1044
|
- `--gamma-out <value>` - Output gamma value (optional)
|
|
754
1045
|
- `-o, --output <path>` - Output file path
|
|
@@ -758,6 +1049,7 @@ mediaproc image gamma <input> [options]
|
|
|
758
1049
|
- `--help` - Display help
|
|
759
1050
|
|
|
760
1051
|
**Examples:**
|
|
1052
|
+
|
|
761
1053
|
```bash
|
|
762
1054
|
# Standard sRGB gamma
|
|
763
1055
|
mediaproc image gamma photo.jpg -g 2.2
|
|
@@ -770,6 +1062,7 @@ mediaproc image gamma pic.jpg -g 2.8
|
|
|
770
1062
|
```
|
|
771
1063
|
|
|
772
1064
|
**Gamma Values:**
|
|
1065
|
+
|
|
773
1066
|
- **1.0** - Linear (no correction)
|
|
774
1067
|
- **1.5** - Lighter midtones
|
|
775
1068
|
- **2.2** - Standard sRGB
|
|
@@ -783,11 +1076,13 @@ mediaproc image gamma pic.jpg -g 2.8
|
|
|
783
1076
|
Auto-trim/remove border edges from images.
|
|
784
1077
|
|
|
785
1078
|
**Usage:**
|
|
1079
|
+
|
|
786
1080
|
```bash
|
|
787
1081
|
mediaproc image trim <input> [options]
|
|
788
1082
|
```
|
|
789
1083
|
|
|
790
1084
|
**Options:**
|
|
1085
|
+
|
|
791
1086
|
- `-t, --threshold <value>` - Edge detection threshold 1-100 (default: 10)
|
|
792
1087
|
- `-o, --output <path>` - Output file path
|
|
793
1088
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -796,6 +1091,7 @@ mediaproc image trim <input> [options]
|
|
|
796
1091
|
- `--help` - Display help
|
|
797
1092
|
|
|
798
1093
|
**Examples:**
|
|
1094
|
+
|
|
799
1095
|
```bash
|
|
800
1096
|
# Auto-trim with default threshold
|
|
801
1097
|
mediaproc image trim photo.jpg
|
|
@@ -808,12 +1104,14 @@ mediaproc image trim pic.jpg -t 20
|
|
|
808
1104
|
```
|
|
809
1105
|
|
|
810
1106
|
**Threshold Guide:**
|
|
1107
|
+
|
|
811
1108
|
- **1-5** - Very sensitive
|
|
812
1109
|
- **10** - Default (balanced)
|
|
813
1110
|
- **15-25** - Aggressive
|
|
814
1111
|
- **25+** - Very aggressive
|
|
815
1112
|
|
|
816
1113
|
**Best For:**
|
|
1114
|
+
|
|
817
1115
|
- Scanned documents
|
|
818
1116
|
- Screenshots
|
|
819
1117
|
- Solid color borders
|
|
@@ -827,11 +1125,13 @@ mediaproc image trim pic.jpg -t 20
|
|
|
827
1125
|
Add padding/borders around images.
|
|
828
1126
|
|
|
829
1127
|
**Usage:**
|
|
1128
|
+
|
|
830
1129
|
```bash
|
|
831
1130
|
mediaproc image extend <input> [options]
|
|
832
1131
|
```
|
|
833
1132
|
|
|
834
1133
|
**Options:**
|
|
1134
|
+
|
|
835
1135
|
- `--all <pixels>` - Padding on all sides (shortcut)
|
|
836
1136
|
- `--top <pixels>` - Top padding
|
|
837
1137
|
- `--bottom <pixels>` - Bottom padding
|
|
@@ -845,6 +1145,7 @@ mediaproc image extend <input> [options]
|
|
|
845
1145
|
- `--help` - Display help
|
|
846
1146
|
|
|
847
1147
|
**Examples:**
|
|
1148
|
+
|
|
848
1149
|
```bash
|
|
849
1150
|
# Add 50px padding on all sides
|
|
850
1151
|
mediaproc image extend photo.jpg --all 50
|
|
@@ -860,6 +1161,7 @@ mediaproc image extend photo.jpg --all 30 --background "#ff0000"
|
|
|
860
1161
|
```
|
|
861
1162
|
|
|
862
1163
|
**Use Cases:**
|
|
1164
|
+
|
|
863
1165
|
- Adding borders/frames
|
|
864
1166
|
- Letterbox/pillarbox effect
|
|
865
1167
|
- Preparing for specific dimensions
|
|
@@ -873,11 +1175,13 @@ mediaproc image extend photo.jpg --all 30 --background "#ff0000"
|
|
|
873
1175
|
Apply median filter for noise reduction.
|
|
874
1176
|
|
|
875
1177
|
**Usage:**
|
|
1178
|
+
|
|
876
1179
|
```bash
|
|
877
1180
|
mediaproc image median <input> [options]
|
|
878
1181
|
```
|
|
879
1182
|
|
|
880
1183
|
**Options:**
|
|
1184
|
+
|
|
881
1185
|
- `-s, --size <size>` - Filter size 1-50 (default: 3)
|
|
882
1186
|
- `-o, --output <path>` - Output file path
|
|
883
1187
|
- `-q, --quality <quality>` - Quality 1-100 (default: 90)
|
|
@@ -886,6 +1190,7 @@ mediaproc image median <input> [options]
|
|
|
886
1190
|
- `--help` - Display help
|
|
887
1191
|
|
|
888
1192
|
**Examples:**
|
|
1193
|
+
|
|
889
1194
|
```bash
|
|
890
1195
|
# Default median filter
|
|
891
1196
|
mediaproc image median photo.jpg
|
|
@@ -898,12 +1203,14 @@ mediaproc image median scan.jpg -s 7
|
|
|
898
1203
|
```
|
|
899
1204
|
|
|
900
1205
|
**Filter Size:**
|
|
1206
|
+
|
|
901
1207
|
- **1** - Minimal smoothing
|
|
902
1208
|
- **3** - Default (balanced)
|
|
903
1209
|
- **5-7** - Strong noise reduction
|
|
904
1210
|
- **10+** - Heavy smoothing
|
|
905
1211
|
|
|
906
1212
|
**Best For:**
|
|
1213
|
+
|
|
907
1214
|
- Salt-and-pepper noise
|
|
908
1215
|
- Scanner artifacts
|
|
909
1216
|
- JPEG compression noise
|
|
@@ -917,11 +1224,13 @@ mediaproc image median scan.jpg -s 7
|
|
|
917
1224
|
Composite/blend multiple images together with various blend modes and positioning.
|
|
918
1225
|
|
|
919
1226
|
**Usage:**
|
|
1227
|
+
|
|
920
1228
|
```bash
|
|
921
1229
|
mediaproc image composite <base> <overlay> [options]
|
|
922
1230
|
```
|
|
923
1231
|
|
|
924
1232
|
**Options:**
|
|
1233
|
+
|
|
925
1234
|
- `--blend <mode>` - Blend mode: over, add, multiply, screen, overlay (default: over)
|
|
926
1235
|
- `--gravity <position>` - Position: center, north, south, east, west, northeast, northwest, southeast, southwest (default: center)
|
|
927
1236
|
- `--opacity <value>` - Overlay opacity 0-1 (default: 1)
|
|
@@ -932,6 +1241,7 @@ mediaproc image composite <base> <overlay> [options]
|
|
|
932
1241
|
- `-v, --verbose` - Show detailed output
|
|
933
1242
|
|
|
934
1243
|
**Examples:**
|
|
1244
|
+
|
|
935
1245
|
```bash
|
|
936
1246
|
# Overlay image on top
|
|
937
1247
|
mediaproc image composite base.jpg overlay.png
|
|
@@ -947,6 +1257,7 @@ mediaproc image composite base.jpg watermark.png -x 50 -y 50
|
|
|
947
1257
|
```
|
|
948
1258
|
|
|
949
1259
|
**Blend Modes:**
|
|
1260
|
+
|
|
950
1261
|
- **over** - Normal overlay (default)
|
|
951
1262
|
- **add** - Additive blend
|
|
952
1263
|
- **multiply** - Darken blend
|
|
@@ -960,17 +1271,20 @@ mediaproc image composite base.jpg watermark.png -x 50 -y 50
|
|
|
960
1271
|
Extract specific color channels or regions from images.
|
|
961
1272
|
|
|
962
1273
|
**Usage:**
|
|
1274
|
+
|
|
963
1275
|
```bash
|
|
964
1276
|
mediaproc image extract <input> [options]
|
|
965
1277
|
```
|
|
966
1278
|
|
|
967
1279
|
**Options:**
|
|
1280
|
+
|
|
968
1281
|
- `--channel <channel>` - Channel: red, green, blue, alpha (default: red)
|
|
969
1282
|
- `-o, --output <path>` - Output file path
|
|
970
1283
|
- `--dry-run` - Preview without executing
|
|
971
1284
|
- `-v, --verbose` - Show detailed output
|
|
972
1285
|
|
|
973
1286
|
**Examples:**
|
|
1287
|
+
|
|
974
1288
|
```bash
|
|
975
1289
|
# Extract red channel
|
|
976
1290
|
mediaproc image extract photo.jpg --channel red
|
|
@@ -983,6 +1297,7 @@ mediaproc image extract pic.jpg --channel green -o green-channel.jpg
|
|
|
983
1297
|
```
|
|
984
1298
|
|
|
985
1299
|
**Use Cases:**
|
|
1300
|
+
|
|
986
1301
|
- Channel analysis
|
|
987
1302
|
- Alpha mask extraction
|
|
988
1303
|
- Color correction workflows
|
|
@@ -996,11 +1311,13 @@ mediaproc image extract pic.jpg --channel green -o green-channel.jpg
|
|
|
996
1311
|
Add colored borders/frames around images.
|
|
997
1312
|
|
|
998
1313
|
**Usage:**
|
|
1314
|
+
|
|
999
1315
|
```bash
|
|
1000
1316
|
mediaproc image border <input> [options]
|
|
1001
1317
|
```
|
|
1002
1318
|
|
|
1003
1319
|
**Options:**
|
|
1320
|
+
|
|
1004
1321
|
- `-w, --width <pixels>` - Border width (default: 10)
|
|
1005
1322
|
- `-c, --color <color>` - Border color (default: black)
|
|
1006
1323
|
- `-o, --output <path>` - Output file path
|
|
@@ -1008,6 +1325,7 @@ mediaproc image border <input> [options]
|
|
|
1008
1325
|
- `-v, --verbose` - Show detailed output
|
|
1009
1326
|
|
|
1010
1327
|
**Examples:**
|
|
1328
|
+
|
|
1011
1329
|
```bash
|
|
1012
1330
|
# Default black border
|
|
1013
1331
|
mediaproc image border photo.jpg
|
|
@@ -1023,6 +1341,7 @@ mediaproc image border photo.jpg -w 30 -c "#f0f0f0"
|
|
|
1023
1341
|
```
|
|
1024
1342
|
|
|
1025
1343
|
**Popular Border Styles:**
|
|
1344
|
+
|
|
1026
1345
|
- **Black 10px** - Classic frame
|
|
1027
1346
|
- **White 20-30px** - Instagram style
|
|
1028
1347
|
- **Gray 5px** - Subtle separation
|
|
@@ -1035,15 +1354,18 @@ mediaproc image border photo.jpg -w 30 -c "#f0f0f0"
|
|
|
1035
1354
|
Display detailed technical information about images.
|
|
1036
1355
|
|
|
1037
1356
|
**Usage:**
|
|
1357
|
+
|
|
1038
1358
|
```bash
|
|
1039
1359
|
mediaproc image stats <input> [options]
|
|
1040
1360
|
```
|
|
1041
1361
|
|
|
1042
1362
|
**Options:**
|
|
1363
|
+
|
|
1043
1364
|
- `-v, --verbose` - Show extended metadata and channel statistics
|
|
1044
1365
|
- `--help` - Display help
|
|
1045
1366
|
|
|
1046
1367
|
**Examples:**
|
|
1368
|
+
|
|
1047
1369
|
```bash
|
|
1048
1370
|
# Basic stats
|
|
1049
1371
|
mediaproc image stats photo.jpg
|
|
@@ -1053,6 +1375,7 @@ mediaproc image stats image.png -v
|
|
|
1053
1375
|
```
|
|
1054
1376
|
|
|
1055
1377
|
**Information Displayed:**
|
|
1378
|
+
|
|
1056
1379
|
- Format and dimensions
|
|
1057
1380
|
- Color space and channels
|
|
1058
1381
|
- File size and compression
|
|
@@ -1063,6 +1386,7 @@ mediaproc image stats image.png -v
|
|
|
1063
1386
|
- Channel statistics (with -v)
|
|
1064
1387
|
|
|
1065
1388
|
**Use Cases:**
|
|
1389
|
+
|
|
1066
1390
|
- Pre-processing analysis
|
|
1067
1391
|
- Quality verification
|
|
1068
1392
|
- Format identification
|
|
@@ -1076,17 +1400,20 @@ mediaproc image stats image.png -v
|
|
|
1076
1400
|
Apply vintage sepia tone effect for classic photography look.
|
|
1077
1401
|
|
|
1078
1402
|
**Usage:**
|
|
1403
|
+
|
|
1079
1404
|
```bash
|
|
1080
1405
|
mediaproc image sepia <input> [options]
|
|
1081
1406
|
```
|
|
1082
1407
|
|
|
1083
1408
|
**Options:**
|
|
1409
|
+
|
|
1084
1410
|
- `-i, --intensity <value>` - Sepia intensity 0-100 (default: 80)
|
|
1085
1411
|
- `-o, --output <path>` - Output file path
|
|
1086
1412
|
- `--dry-run` - Preview without executing
|
|
1087
1413
|
- `-v, --verbose` - Show detailed output
|
|
1088
1414
|
|
|
1089
1415
|
**Examples:**
|
|
1416
|
+
|
|
1090
1417
|
```bash
|
|
1091
1418
|
# Classic sepia
|
|
1092
1419
|
mediaproc image sepia photo.jpg
|
|
@@ -1099,6 +1426,7 @@ mediaproc image sepia modern.jpg -i 40
|
|
|
1099
1426
|
```
|
|
1100
1427
|
|
|
1101
1428
|
**Intensity Guide:**
|
|
1429
|
+
|
|
1102
1430
|
- **20-40** - Subtle warm tint
|
|
1103
1431
|
- **60-80** - Classic sepia (recommended)
|
|
1104
1432
|
- **80-100** - Strong vintage effect
|
|
@@ -1110,11 +1438,13 @@ mediaproc image sepia modern.jpg -i 40
|
|
|
1110
1438
|
Apply Contrast Limited Adaptive Histogram Equalization for advanced contrast enhancement.
|
|
1111
1439
|
|
|
1112
1440
|
**Usage:**
|
|
1441
|
+
|
|
1113
1442
|
```bash
|
|
1114
1443
|
mediaproc image clahe <input> [options]
|
|
1115
1444
|
```
|
|
1116
1445
|
|
|
1117
1446
|
**Options:**
|
|
1447
|
+
|
|
1118
1448
|
- `-w, --width <pixels>` - Region width (default: 8)
|
|
1119
1449
|
- `-h, --height <pixels>` - Region height (default: 8)
|
|
1120
1450
|
- `--max-slope <value>` - Maximum contrast slope 0-100 (default: 2.5)
|
|
@@ -1123,6 +1453,7 @@ mediaproc image clahe <input> [options]
|
|
|
1123
1453
|
- `-v, --verbose` - Show detailed output
|
|
1124
1454
|
|
|
1125
1455
|
**Examples:**
|
|
1456
|
+
|
|
1126
1457
|
```bash
|
|
1127
1458
|
# Default CLAHE
|
|
1128
1459
|
mediaproc image clahe photo.jpg
|
|
@@ -1135,6 +1466,7 @@ mediaproc image clahe medical.png -w 16 -h 16
|
|
|
1135
1466
|
```
|
|
1136
1467
|
|
|
1137
1468
|
**Best For:**
|
|
1469
|
+
|
|
1138
1470
|
- Medical imaging
|
|
1139
1471
|
- Scientific photography
|
|
1140
1472
|
- Underwater photos
|
|
@@ -1148,17 +1480,20 @@ mediaproc image clahe medical.png -w 16 -h 16
|
|
|
1148
1480
|
Apply custom convolution kernels for advanced image filtering.
|
|
1149
1481
|
|
|
1150
1482
|
**Usage:**
|
|
1483
|
+
|
|
1151
1484
|
```bash
|
|
1152
1485
|
mediaproc image convolve <input> [options]
|
|
1153
1486
|
```
|
|
1154
1487
|
|
|
1155
1488
|
**Options:**
|
|
1489
|
+
|
|
1156
1490
|
- `-k, --kernel <name>` - Preset kernel: sharpen, emboss, edge-detect, box-blur, gaussian-blur, laplacian, high-pass
|
|
1157
1491
|
- `-o, --output <path>` - Output file path
|
|
1158
1492
|
- `--dry-run` - Preview without executing
|
|
1159
1493
|
- `-v, --verbose` - Show detailed output
|
|
1160
1494
|
|
|
1161
1495
|
**Examples:**
|
|
1496
|
+
|
|
1162
1497
|
```bash
|
|
1163
1498
|
# Edge detection
|
|
1164
1499
|
mediaproc image convolve photo.jpg -k edge-detect
|
|
@@ -1171,6 +1506,7 @@ mediaproc image convolve pic.jpg -k high-pass
|
|
|
1171
1506
|
```
|
|
1172
1507
|
|
|
1173
1508
|
**Preset Kernels:**
|
|
1509
|
+
|
|
1174
1510
|
- **sharpen** - Enhance edges
|
|
1175
1511
|
- **emboss** - 3D relief effect
|
|
1176
1512
|
- **edge-detect** - Detect edges
|
|
@@ -1186,17 +1522,20 @@ mediaproc image convolve pic.jpg -k high-pass
|
|
|
1186
1522
|
Add vignette effect (darkened edges) for artistic focus.
|
|
1187
1523
|
|
|
1188
1524
|
**Usage:**
|
|
1525
|
+
|
|
1189
1526
|
```bash
|
|
1190
1527
|
mediaproc image vignette <input> [options]
|
|
1191
1528
|
```
|
|
1192
1529
|
|
|
1193
1530
|
**Options:**
|
|
1531
|
+
|
|
1194
1532
|
- `-i, --intensity <value>` - Vignette intensity 0-100 (default: 50)
|
|
1195
1533
|
- `-o, --output <path>` - Output file path
|
|
1196
1534
|
- `--dry-run` - Preview without executing
|
|
1197
1535
|
- `-v, --verbose` - Show detailed output
|
|
1198
1536
|
|
|
1199
1537
|
**Examples:**
|
|
1538
|
+
|
|
1200
1539
|
```bash
|
|
1201
1540
|
# Default vignette
|
|
1202
1541
|
mediaproc image vignette photo.jpg
|
|
@@ -1209,6 +1548,7 @@ mediaproc image vignette landscape.jpg -i 80
|
|
|
1209
1548
|
```
|
|
1210
1549
|
|
|
1211
1550
|
**Intensity Guide:**
|
|
1551
|
+
|
|
1212
1552
|
- **20-40** - Subtle focus
|
|
1213
1553
|
- **40-60** - Balanced (recommended)
|
|
1214
1554
|
- **60-80** - Dramatic effect
|
|
@@ -1229,18 +1569,21 @@ All commands support these global options:
|
|
|
1229
1569
|
## 💡 Usage Tips
|
|
1230
1570
|
|
|
1231
1571
|
### Quality Settings
|
|
1572
|
+
|
|
1232
1573
|
- **90-100**: Maximum quality, larger files
|
|
1233
1574
|
- **85-90**: Recommended for web (best balance)
|
|
1234
1575
|
- **70-85**: Good compression, slight quality loss
|
|
1235
1576
|
- **Below 70**: High compression, noticeable quality loss
|
|
1236
1577
|
|
|
1237
1578
|
### File Formats
|
|
1579
|
+
|
|
1238
1580
|
- **WebP**: Best for web, 25-35% smaller than JPG/PNG
|
|
1239
1581
|
- **AVIF**: Newest format, smaller than WebP
|
|
1240
1582
|
- **JPG**: Best for photos
|
|
1241
1583
|
- **PNG**: Best for graphics with transparency
|
|
1242
1584
|
|
|
1243
1585
|
### Batch Processing
|
|
1586
|
+
|
|
1244
1587
|
```bash
|
|
1245
1588
|
# Process multiple files
|
|
1246
1589
|
for file in *.jpg; do
|
|
@@ -1254,7 +1597,9 @@ done
|
|
|
1254
1597
|
```
|
|
1255
1598
|
|
|
1256
1599
|
### Chaining Commands
|
|
1600
|
+
|
|
1257
1601
|
Use dry-run to test, then execute:
|
|
1602
|
+
|
|
1258
1603
|
```bash
|
|
1259
1604
|
# Test first
|
|
1260
1605
|
mediaproc image resize photo.jpg -w 800 --dry-run
|
|
@@ -1274,6 +1619,7 @@ mediaproc image resize photo.jpg -w 800
|
|
|
1274
1619
|
## 📝 Examples
|
|
1275
1620
|
|
|
1276
1621
|
### Web Optimization Workflow
|
|
1622
|
+
|
|
1277
1623
|
```bash
|
|
1278
1624
|
# 1. Resize for web
|
|
1279
1625
|
mediaproc image resize photo.jpg -w 1920 -h 1080
|
|
@@ -1286,6 +1632,7 @@ mediaproc image convert photo-1920x1080-optimized.jpg -f webp
|
|
|
1286
1632
|
```
|
|
1287
1633
|
|
|
1288
1634
|
### Photo Enhancement Workflow
|
|
1635
|
+
|
|
1289
1636
|
```bash
|
|
1290
1637
|
# 1. Normalize contrast
|
|
1291
1638
|
mediaproc image normalize photo.jpg
|
|
@@ -1298,6 +1645,7 @@ mediaproc image sharpen photo-normalized-modulated.jpg -s 1.5
|
|
|
1298
1645
|
```
|
|
1299
1646
|
|
|
1300
1647
|
### Thumbnail Generation
|
|
1648
|
+
|
|
1301
1649
|
```bash
|
|
1302
1650
|
# Generate multiple sizes
|
|
1303
1651
|
mediaproc image thumbnail photo.jpg -s 64 -o thumb-64.jpg
|
|
@@ -1314,11 +1662,13 @@ mediaproc image thumbnail photo.jpg -s 300 -o thumb-300.jpg
|
|
|
1314
1662
|
Process multiple images in a directory with any operation.
|
|
1315
1663
|
|
|
1316
1664
|
**Usage:**
|
|
1665
|
+
|
|
1317
1666
|
```bash
|
|
1318
1667
|
mediaproc image batch <directory> --operation <operation> [options]
|
|
1319
1668
|
```
|
|
1320
1669
|
|
|
1321
1670
|
**Options:**
|
|
1671
|
+
|
|
1322
1672
|
- `-op, --operation <operation>` - Operation to apply: resize, convert, optimize, grayscale, etc. (required)
|
|
1323
1673
|
- `-o, --output <directory>` - Output directory (default: ./output)
|
|
1324
1674
|
- `-r, --recursive` - Process subdirectories
|
|
@@ -1328,6 +1678,7 @@ mediaproc image batch <directory> --operation <operation> [options]
|
|
|
1328
1678
|
- `-q, --quality <quality>` - Quality setting
|
|
1329
1679
|
|
|
1330
1680
|
**Examples:**
|
|
1681
|
+
|
|
1331
1682
|
```bash
|
|
1332
1683
|
# Resize all images
|
|
1333
1684
|
mediaproc image batch ./photos --operation resize --width 1920
|
|
@@ -1351,17 +1702,20 @@ mediaproc image batch ./gallery -op thumbnail --width 200 --height 200
|
|
|
1351
1702
|
Automatically crop to target dimensions while preserving important content.
|
|
1352
1703
|
|
|
1353
1704
|
**Usage:**
|
|
1705
|
+
|
|
1354
1706
|
```bash
|
|
1355
1707
|
mediaproc image smart-crop <input> -w <width> -h <height> [options]
|
|
1356
1708
|
```
|
|
1357
1709
|
|
|
1358
1710
|
**Options:**
|
|
1711
|
+
|
|
1359
1712
|
- `-w, --width <pixels>` - Target width (required)
|
|
1360
1713
|
- `-h, --height <pixels>` - Target height (required)
|
|
1361
1714
|
- `-s, --strategy <type>` - Strategy: entropy (edges/details) or attention (center-weighted) (default: entropy)
|
|
1362
1715
|
- `-o, --output <path>` - Output file path
|
|
1363
1716
|
|
|
1364
1717
|
**Examples:**
|
|
1718
|
+
|
|
1365
1719
|
```bash
|
|
1366
1720
|
# Social media banner
|
|
1367
1721
|
mediaproc image smart-crop photo.jpg -w 1200 -h 630
|
|
@@ -1374,6 +1728,7 @@ mediaproc image smart-crop product.png -w 600 -h 600 -o thumbnail.png
|
|
|
1374
1728
|
```
|
|
1375
1729
|
|
|
1376
1730
|
**Common Dimensions:**
|
|
1731
|
+
|
|
1377
1732
|
- `1200x630` - Facebook/LinkedIn posts
|
|
1378
1733
|
- `1024x512` - Twitter cards
|
|
1379
1734
|
- `1080x1080` - Instagram square
|
|
@@ -1386,15 +1741,18 @@ mediaproc image smart-crop product.png -w 600 -h 600 -o thumbnail.png
|
|
|
1386
1741
|
Apply pixelate/mosaic effect for artistic or privacy purposes.
|
|
1387
1742
|
|
|
1388
1743
|
**Usage:**
|
|
1744
|
+
|
|
1389
1745
|
```bash
|
|
1390
1746
|
mediaproc image pixelate <input> [options]
|
|
1391
1747
|
```
|
|
1392
1748
|
|
|
1393
1749
|
**Options:**
|
|
1750
|
+
|
|
1394
1751
|
- `-p, --pixels <size>` - Pixel size 2-50 (default: 10) - larger = more pixelated
|
|
1395
1752
|
- `-o, --output <path>` - Output file path
|
|
1396
1753
|
|
|
1397
1754
|
**Examples:**
|
|
1755
|
+
|
|
1398
1756
|
```bash
|
|
1399
1757
|
# Default pixelation
|
|
1400
1758
|
mediaproc image pixelate photo.jpg
|
|
@@ -1407,6 +1765,7 @@ mediaproc image pixelate game.jpg --pixels 8 -o retro.jpg
|
|
|
1407
1765
|
```
|
|
1408
1766
|
|
|
1409
1767
|
**Use Cases:**
|
|
1768
|
+
|
|
1410
1769
|
- Retro gaming aesthetics (8-12 pixel size)
|
|
1411
1770
|
- Privacy protection (15-25 pixel size)
|
|
1412
1771
|
- Artistic effects
|
|
@@ -1419,15 +1778,18 @@ mediaproc image pixelate game.jpg --pixels 8 -o retro.jpg
|
|
|
1419
1778
|
Extract and display dominant colors from images.
|
|
1420
1779
|
|
|
1421
1780
|
**Usage:**
|
|
1781
|
+
|
|
1422
1782
|
```bash
|
|
1423
1783
|
mediaproc image palette <input> [options]
|
|
1424
1784
|
```
|
|
1425
1785
|
|
|
1426
1786
|
**Options:**
|
|
1787
|
+
|
|
1427
1788
|
- `-c, --colors <count>` - Number of colors 1-10 (default: 5)
|
|
1428
1789
|
- `-v, --verbose` - Show hex codes and RGB values
|
|
1429
1790
|
|
|
1430
1791
|
**Examples:**
|
|
1792
|
+
|
|
1431
1793
|
```bash
|
|
1432
1794
|
# Extract 5 dominant colors
|
|
1433
1795
|
mediaproc image palette photo.jpg
|
|
@@ -1440,6 +1802,7 @@ mediaproc image palette artwork.jpg --colors 10
|
|
|
1440
1802
|
```
|
|
1441
1803
|
|
|
1442
1804
|
**Output Includes:**
|
|
1805
|
+
|
|
1443
1806
|
- Dominant colors ranked by prevalence
|
|
1444
1807
|
- RGB and hex values
|
|
1445
1808
|
- Color temperature (warm/cool)
|
|
@@ -1447,6 +1810,7 @@ mediaproc image palette artwork.jpg --colors 10
|
|
|
1447
1810
|
- Saturation levels
|
|
1448
1811
|
|
|
1449
1812
|
**Use Cases:**
|
|
1813
|
+
|
|
1450
1814
|
- Design inspiration
|
|
1451
1815
|
- Brand color extraction
|
|
1452
1816
|
- Theme generation
|
|
@@ -1459,11 +1823,13 @@ mediaproc image palette artwork.jpg --colors 10
|
|
|
1459
1823
|
Automatically crop to target dimensions while preserving important content using edge detection.
|
|
1460
1824
|
|
|
1461
1825
|
**Usage:**
|
|
1826
|
+
|
|
1462
1827
|
```bash
|
|
1463
1828
|
mediaproc image smart-crop <input> -w <width> -h <height> [options]
|
|
1464
1829
|
```
|
|
1465
1830
|
|
|
1466
1831
|
**Options:**
|
|
1832
|
+
|
|
1467
1833
|
- `-w, --width <pixels>` - Target width (required)
|
|
1468
1834
|
- `-h, --height <pixels>` - Target height (required)
|
|
1469
1835
|
- `-s, --strategy <type>` - Strategy: entropy (edges/details) or attention (center-weighted) (default: entropy)
|
|
@@ -1472,6 +1838,7 @@ mediaproc image smart-crop <input> -w <width> -h <height> [options]
|
|
|
1472
1838
|
- `-v, --verbose` - Show detailed output
|
|
1473
1839
|
|
|
1474
1840
|
**Examples:**
|
|
1841
|
+
|
|
1475
1842
|
```bash
|
|
1476
1843
|
# Social media banner
|
|
1477
1844
|
mediaproc image smart-crop photo.jpg -w 1200 -h 630
|
|
@@ -1484,12 +1851,14 @@ mediaproc image smart-crop product.png -w 600 -h 600
|
|
|
1484
1851
|
```
|
|
1485
1852
|
|
|
1486
1853
|
**Strategies:**
|
|
1854
|
+
|
|
1487
1855
|
- **entropy** - Focus on edges and details (best for landscapes)
|
|
1488
1856
|
- **attention** - Center-weighted (best for portraits)
|
|
1489
1857
|
|
|
1490
1858
|
**Common Social Media Dimensions:**
|
|
1859
|
+
|
|
1491
1860
|
- **1200x630** - Facebook/LinkedIn posts
|
|
1492
|
-
- **1024x512** - Twitter cards
|
|
1861
|
+
- **1024x512** - Twitter cards
|
|
1493
1862
|
- **1080x1080** - Instagram square
|
|
1494
1863
|
- **1080x1350** - Instagram portrait
|
|
1495
1864
|
- **800x800** - General thumbnails
|
|
@@ -1501,17 +1870,20 @@ mediaproc image smart-crop product.png -w 600 -h 600
|
|
|
1501
1870
|
Apply pixelate/mosaic effect for artistic or privacy purposes.
|
|
1502
1871
|
|
|
1503
1872
|
**Usage:**
|
|
1873
|
+
|
|
1504
1874
|
```bash
|
|
1505
1875
|
mediaproc image pixelate <input> [options]
|
|
1506
1876
|
```
|
|
1507
1877
|
|
|
1508
1878
|
**Options:**
|
|
1879
|
+
|
|
1509
1880
|
- `-p, --pixels <size>` - Pixel size 2-50 (default: 10) - larger = more pixelated
|
|
1510
1881
|
- `-o, --output <path>` - Output file path
|
|
1511
1882
|
- `--dry-run` - Preview without executing
|
|
1512
1883
|
- `-v, --verbose` - Show detailed output
|
|
1513
1884
|
|
|
1514
1885
|
**Examples:**
|
|
1886
|
+
|
|
1515
1887
|
```bash
|
|
1516
1888
|
# Default pixelation
|
|
1517
1889
|
mediaproc image pixelate photo.jpg
|
|
@@ -1524,6 +1896,7 @@ mediaproc image pixelate game.jpg --pixels 8
|
|
|
1524
1896
|
```
|
|
1525
1897
|
|
|
1526
1898
|
**Pixel Size Guide:**
|
|
1899
|
+
|
|
1527
1900
|
- **2-5** - Subtle texture
|
|
1528
1901
|
- **8-12** - Retro gaming aesthetics
|
|
1529
1902
|
- **15-25** - Privacy protection
|
|
@@ -1536,16 +1909,19 @@ mediaproc image pixelate game.jpg --pixels 8
|
|
|
1536
1909
|
Extract and display dominant colors with detailed analysis.
|
|
1537
1910
|
|
|
1538
1911
|
**Usage:**
|
|
1912
|
+
|
|
1539
1913
|
```bash
|
|
1540
1914
|
mediaproc image palette <input> [options]
|
|
1541
1915
|
```
|
|
1542
1916
|
|
|
1543
1917
|
**Options:**
|
|
1918
|
+
|
|
1544
1919
|
- `-c, --colors <count>` - Number of colors 1-10 (default: 5)
|
|
1545
1920
|
- `-v, --verbose` - Show hex codes and RGB values
|
|
1546
1921
|
- `--help` - Display help
|
|
1547
1922
|
|
|
1548
1923
|
**Examples:**
|
|
1924
|
+
|
|
1549
1925
|
```bash
|
|
1550
1926
|
# Extract 5 dominant colors
|
|
1551
1927
|
mediaproc image palette photo.jpg
|
|
@@ -1558,6 +1934,7 @@ mediaproc image palette artwork.jpg --colors 10
|
|
|
1558
1934
|
```
|
|
1559
1935
|
|
|
1560
1936
|
**Output Includes:**
|
|
1937
|
+
|
|
1561
1938
|
- Dominant colors ranked by prevalence
|
|
1562
1939
|
- RGB and hex values
|
|
1563
1940
|
- Color temperature (warm/cool)
|
|
@@ -1572,11 +1949,13 @@ mediaproc image palette artwork.jpg --colors 10
|
|
|
1572
1949
|
Process multiple images in a directory with any supported operation.
|
|
1573
1950
|
|
|
1574
1951
|
**Usage:**
|
|
1952
|
+
|
|
1575
1953
|
```bash
|
|
1576
1954
|
mediaproc image batch <directory> --operation <operation> [options]
|
|
1577
1955
|
```
|
|
1578
1956
|
|
|
1579
1957
|
**Options:**
|
|
1958
|
+
|
|
1580
1959
|
- `-op, --operation <operation>` - Operation: resize, convert, optimize, grayscale, etc. (required)
|
|
1581
1960
|
- `-o, --output <directory>` - Output directory (default: ./output)
|
|
1582
1961
|
- `-r, --recursive` - Process subdirectories
|
|
@@ -1588,6 +1967,7 @@ mediaproc image batch <directory> --operation <operation> [options]
|
|
|
1588
1967
|
- `-v, --verbose` - Show detailed output
|
|
1589
1968
|
|
|
1590
1969
|
**Examples:**
|
|
1970
|
+
|
|
1591
1971
|
```bash
|
|
1592
1972
|
# Resize all images
|
|
1593
1973
|
mediaproc image batch ./photos --operation resize --width 1920
|
|
@@ -1612,22 +1992,26 @@ resize, convert, optimize, grayscale, blur, sharpen, thumbnail, sepia, normalize
|
|
|
1612
1992
|
Intelligently enhance images with automatic color, contrast, and sharpness adjustments.
|
|
1613
1993
|
|
|
1614
1994
|
**Usage:**
|
|
1995
|
+
|
|
1615
1996
|
```bash
|
|
1616
1997
|
mediaproc image auto-enhance <input> [options]
|
|
1617
1998
|
```
|
|
1618
1999
|
|
|
1619
2000
|
**Options:**
|
|
2001
|
+
|
|
1620
2002
|
- `-l, --level <level>` - Enhancement level: low, medium, high (default: medium)
|
|
1621
2003
|
- `-o, --output <path>` - Output file path
|
|
1622
2004
|
- `--dry-run` - Preview without executing
|
|
1623
2005
|
- `-v, --verbose` - Show detailed output
|
|
1624
2006
|
|
|
1625
2007
|
**Enhancement Levels:**
|
|
2008
|
+
|
|
1626
2009
|
- **low** - Normalize + Light sharpen (subtle, ~10% improvement)
|
|
1627
2010
|
- **medium** - Normalize + Color boost + Sharpen (balanced, ~30% improvement)
|
|
1628
2011
|
- **high** - Normalize + CLAHE + Strong color boost + Heavy sharpen (aggressive, ~50% improvement)
|
|
1629
2012
|
|
|
1630
2013
|
**Examples:**
|
|
2014
|
+
|
|
1631
2015
|
```bash
|
|
1632
2016
|
# Default enhancement
|
|
1633
2017
|
mediaproc image auto-enhance photo.jpg
|
|
@@ -1640,6 +2024,7 @@ mediaproc image auto-enhance good-photo.jpg -l low
|
|
|
1640
2024
|
```
|
|
1641
2025
|
|
|
1642
2026
|
**What Gets Enhanced:**
|
|
2027
|
+
|
|
1643
2028
|
- ✅ Color normalization and balance
|
|
1644
2029
|
- ✅ Contrast enhancement (CLAHE for high level)
|
|
1645
2030
|
- ✅ Sharpness and clarity
|
|
@@ -1648,6 +2033,7 @@ mediaproc image auto-enhance good-photo.jpg -l low
|
|
|
1648
2033
|
- ✅ Detail preservation
|
|
1649
2034
|
|
|
1650
2035
|
**Best For:**
|
|
2036
|
+
|
|
1651
2037
|
- Quick photo fixes
|
|
1652
2038
|
- Batch photo processing
|
|
1653
2039
|
- Underexposed images
|
|
@@ -1661,20 +2047,24 @@ mediaproc image auto-enhance good-photo.jpg -l low
|
|
|
1661
2047
|
Intelligently enhance images with one command.
|
|
1662
2048
|
|
|
1663
2049
|
**Usage:**
|
|
2050
|
+
|
|
1664
2051
|
```bash
|
|
1665
2052
|
mediaproc image auto-enhance <input> [options]
|
|
1666
2053
|
```
|
|
1667
2054
|
|
|
1668
2055
|
**Options:**
|
|
2056
|
+
|
|
1669
2057
|
- `-l, --level <level>` - Enhancement level: low, medium, high (default: medium)
|
|
1670
2058
|
- `-o, --output <path>` - Output file path
|
|
1671
2059
|
|
|
1672
2060
|
**Enhancement Levels:**
|
|
2061
|
+
|
|
1673
2062
|
- **low** - Normalize + Light sharpen (subtle)
|
|
1674
2063
|
- **medium** - Normalize + Color boost + Sharpen (recommended)
|
|
1675
2064
|
- **high** - Normalize + CLAHE + Strong color boost + Heavy sharpen (aggressive)
|
|
1676
2065
|
|
|
1677
2066
|
**Examples:**
|
|
2067
|
+
|
|
1678
2068
|
```bash
|
|
1679
2069
|
# Default enhancement
|
|
1680
2070
|
mediaproc image auto-enhance photo.jpg
|
|
@@ -1687,6 +2077,7 @@ mediaproc image auto-enhance good-photo.jpg -l low
|
|
|
1687
2077
|
```
|
|
1688
2078
|
|
|
1689
2079
|
**What Gets Enhanced:**
|
|
2080
|
+
|
|
1690
2081
|
- Color normalization
|
|
1691
2082
|
- Sharpness
|
|
1692
2083
|
- Contrast
|
|
@@ -1701,11 +2092,13 @@ mediaproc image auto-enhance good-photo.jpg -l low
|
|
|
1701
2092
|
Combine multiple images into professional grid/collage layouts with full control over spacing, sizing, and background.
|
|
1702
2093
|
|
|
1703
2094
|
**Usage:**
|
|
2095
|
+
|
|
1704
2096
|
```bash
|
|
1705
2097
|
mediaproc image grid <images...> [options]
|
|
1706
2098
|
```
|
|
1707
2099
|
|
|
1708
2100
|
**Options:**
|
|
2101
|
+
|
|
1709
2102
|
- `-c, --columns <number>` - Number of columns (auto-calculated if not specified)
|
|
1710
2103
|
- `-r, --rows <number>` - Number of rows (auto-calculated if not specified)
|
|
1711
2104
|
- `-w, --width <pixels>` - Width of each cell (default: 300)
|
|
@@ -1717,6 +2110,7 @@ mediaproc image grid <images...> [options]
|
|
|
1717
2110
|
- `-v, --verbose` - Show detailed output
|
|
1718
2111
|
|
|
1719
2112
|
**Examples:**
|
|
2113
|
+
|
|
1720
2114
|
```bash
|
|
1721
2115
|
# Auto 2x2 grid
|
|
1722
2116
|
mediaproc image grid img1.jpg img2.jpg img3.jpg img4.jpg
|
|
@@ -1735,18 +2129,21 @@ mediaproc image grid portfolio/*.jpg -r 2 -c 5 -w 300 -h 300 -g 15
|
|
|
1735
2129
|
```
|
|
1736
2130
|
|
|
1737
2131
|
**Auto Layout:**
|
|
2132
|
+
|
|
1738
2133
|
- If no columns/rows specified: Auto-calculates square-ish grid
|
|
1739
2134
|
- If only columns specified: Auto-calculates rows
|
|
1740
2135
|
- If only rows specified: Auto-calculates columns
|
|
1741
2136
|
- 4 images → 2x2, 6 images → 2x3, 9 images → 3x3
|
|
1742
2137
|
|
|
1743
2138
|
**Cell Sizing:**
|
|
2139
|
+
|
|
1744
2140
|
- All images resized to cell dimensions
|
|
1745
2141
|
- Uses "cover" fit mode (maintains aspect ratio, crops if needed)
|
|
1746
2142
|
- Images centered in cells
|
|
1747
2143
|
- Quality preserved during resize
|
|
1748
2144
|
|
|
1749
2145
|
**Common Grid Sizes:**
|
|
2146
|
+
|
|
1750
2147
|
- **2x2** - Four image collage (1200x1200 typical)
|
|
1751
2148
|
- **3x3** - Instagram multi-post (1200x1200 or 1800x1800)
|
|
1752
2149
|
- **1x3** - Horizontal trio (900x300 typical)
|
|
@@ -1754,6 +2151,7 @@ mediaproc image grid portfolio/*.jpg -r 2 -c 5 -w 300 -h 300 -g 15
|
|
|
1754
2151
|
- **4x4** - Photo album page (1600x1600)
|
|
1755
2152
|
|
|
1756
2153
|
**Social Media Presets:**
|
|
2154
|
+
|
|
1757
2155
|
```bash
|
|
1758
2156
|
# Instagram post (3x3)
|
|
1759
2157
|
grid *.jpg -c 3 -w 400 -h 400 -g 0 -o insta.jpg
|
|
@@ -1766,6 +2164,7 @@ grid *.jpg -c 4 -w 250 -h 350 -g 15
|
|
|
1766
2164
|
```
|
|
1767
2165
|
|
|
1768
2166
|
**Use Cases:**
|
|
2167
|
+
|
|
1769
2168
|
- 📱 Instagram multi-image posts
|
|
1770
2169
|
- 📸 Photo albums and galleries
|
|
1771
2170
|
- 🎨 Portfolio presentations
|
|
@@ -1776,6 +2175,7 @@ grid *.jpg -c 4 -w 250 -h 350 -g 15
|
|
|
1776
2175
|
- 📚 Magazine-style layouts
|
|
1777
2176
|
|
|
1778
2177
|
**Background Colors:**
|
|
2178
|
+
|
|
1779
2179
|
- **white** - Clean, professional
|
|
1780
2180
|
- **black** - Dramatic, artistic
|
|
1781
2181
|
- **#f5f5f5** - Subtle gray
|
|
@@ -1783,6 +2183,7 @@ grid *.jpg -c 4 -w 250 -h 350 -g 15
|
|
|
1783
2183
|
- **#hex or rgb()** - Custom brand colors
|
|
1784
2184
|
|
|
1785
2185
|
**Tips:**
|
|
2186
|
+
|
|
1786
2187
|
- Use zero gap (-g 0) for seamless grids
|
|
1787
2188
|
- Larger cells (400-500px) for high quality
|
|
1788
2189
|
- Consistent cell sizes look more professional
|
|
@@ -1793,32 +2194,34 @@ grid *.jpg -c 4 -w 250 -h 350 -g 15
|
|
|
1793
2194
|
|
|
1794
2195
|
### 40. **composite** - Advanced Layer Blending
|
|
1795
2196
|
|
|
1796
|
-
|
|
2197
|
+
_See command #20 above for full composite documentation_
|
|
1797
2198
|
|
|
1798
2199
|
---
|
|
1799
2200
|
|
|
1800
2201
|
## 🎯 Command Quick Reference
|
|
1801
2202
|
|
|
1802
|
-
| Category
|
|
1803
|
-
|
|
1804
|
-
| **Transform** | resize, crop, rotate, flip, trim, extend, thumbnail
|
|
1805
|
-
| **Color**
|
|
1806
|
-
| **Effects**
|
|
1807
|
-
| **Advanced**
|
|
1808
|
-
| **Smart/AI**
|
|
1809
|
-
| **Utility**
|
|
1810
|
-
| **TOTAL**
|
|
2203
|
+
| Category | Commands | Count |
|
|
2204
|
+
| ------------- | -------------------------------------------------------------- | ------ |
|
|
2205
|
+
| **Transform** | resize, crop, rotate, flip, trim, extend, thumbnail | 7 |
|
|
2206
|
+
| **Color** | modulate, gamma, tint, grayscale, negate, normalize | 6 |
|
|
2207
|
+
| **Effects** | blur, sharpen, median, sepia, vignette, pixelate | 6 |
|
|
2208
|
+
| **Advanced** | composite, extract, border, clahe, convolve, watermark | 6 |
|
|
2209
|
+
| **Smart/AI** | smart-crop, auto-enhance, palette, dominant-color, grid, batch | 6 |
|
|
2210
|
+
| **Utility** | convert, optimize, stats, split, stack, mirror, metadata | 7 |
|
|
2211
|
+
| **TOTAL** | | **40** |
|
|
1811
2212
|
|
|
1812
2213
|
---
|
|
1813
2214
|
|
|
1814
2215
|
Combine multiple images into a grid/collage layout with customizable spacing and background.
|
|
1815
2216
|
|
|
1816
2217
|
**Usage:**
|
|
2218
|
+
|
|
1817
2219
|
```bash
|
|
1818
2220
|
mediaproc image grid <images...> [options]
|
|
1819
2221
|
```
|
|
1820
2222
|
|
|
1821
2223
|
**Options:**
|
|
2224
|
+
|
|
1822
2225
|
- `-c, --columns <number>` - Number of columns (auto-calculated if not specified)
|
|
1823
2226
|
- `-r, --rows <number>` - Number of rows (auto-calculated if not specified)
|
|
1824
2227
|
- `-w, --width <pixels>` - Width of each cell (default: 300)
|
|
@@ -1828,6 +2231,7 @@ mediaproc image grid <images...> [options]
|
|
|
1828
2231
|
- `-o, --output <path>` - Output file path (default: grid.png)
|
|
1829
2232
|
|
|
1830
2233
|
**Examples:**
|
|
2234
|
+
|
|
1831
2235
|
```bash
|
|
1832
2236
|
# Create 2x2 grid
|
|
1833
2237
|
mediaproc image grid img1.jpg img2.jpg img3.jpg img4.jpg
|
|
@@ -1846,17 +2250,20 @@ mediaproc image grid *.png -c 3 -g 20 -b black
|
|
|
1846
2250
|
Divide large images into smaller tiles, perfect for Instagram carousels or large format printing.
|
|
1847
2251
|
|
|
1848
2252
|
**Usage:**
|
|
2253
|
+
|
|
1849
2254
|
```bash
|
|
1850
2255
|
mediaproc image split <input> [options]
|
|
1851
2256
|
```
|
|
1852
2257
|
|
|
1853
2258
|
**Options:**
|
|
2259
|
+
|
|
1854
2260
|
- `-t, --tiles <pattern>` - Grid pattern (e.g., "3x3", "1x10")
|
|
1855
2261
|
- `-r, --rows <number>` - Number of rows
|
|
1856
2262
|
- `-c, --columns <number>` - Number of columns
|
|
1857
2263
|
- `-o, --output <dir>` - Output directory (default: ./tiles)
|
|
1858
2264
|
|
|
1859
2265
|
**Examples:**
|
|
2266
|
+
|
|
1860
2267
|
```bash
|
|
1861
2268
|
# Split into 3x3 grid
|
|
1862
2269
|
mediaproc image split photo.jpg --tiles 3x3
|
|
@@ -1872,11 +2279,13 @@ mediaproc image split before-after.jpg --tiles "1x2"
|
|
|
1872
2279
|
```
|
|
1873
2280
|
|
|
1874
2281
|
**Tile Naming:**
|
|
2282
|
+
|
|
1875
2283
|
- Output files named: `tile_row_col.ext` (e.g., `tile_0_0.jpg`, `tile_0_1.jpg`)
|
|
1876
2284
|
- Zero-indexed coordinates
|
|
1877
2285
|
- Preserves original format
|
|
1878
2286
|
|
|
1879
2287
|
**Common Patterns:**
|
|
2288
|
+
|
|
1880
2289
|
- **1x10** - Instagram carousel (panorama)
|
|
1881
2290
|
- **2x2** - Four-way comparison
|
|
1882
2291
|
- **3x3** - Nine-tile puzzle
|
|
@@ -1884,6 +2293,7 @@ mediaproc image split before-after.jpg --tiles "1x2"
|
|
|
1884
2293
|
- **1x2** - Before/after split
|
|
1885
2294
|
|
|
1886
2295
|
**Use Cases:**
|
|
2296
|
+
|
|
1887
2297
|
- Instagram carousel posts
|
|
1888
2298
|
- Large format printing on small printers
|
|
1889
2299
|
- Image puzzles
|
|
@@ -1897,11 +2307,13 @@ mediaproc image split before-after.jpg --tiles "1x2"
|
|
|
1897
2307
|
View, export, or remove image metadata including EXIF, IPTC, and XMP data.
|
|
1898
2308
|
|
|
1899
2309
|
**Usage:**
|
|
2310
|
+
|
|
1900
2311
|
```bash
|
|
1901
2312
|
mediaproc image metadata <input> [options]
|
|
1902
2313
|
```
|
|
1903
2314
|
|
|
1904
2315
|
**Options:**
|
|
2316
|
+
|
|
1905
2317
|
- `--remove` - Remove all metadata (create clean copy)
|
|
1906
2318
|
- `--export <path>` - Export metadata to JSON file
|
|
1907
2319
|
- `-o, --output <path>` - Output file path (when removing metadata)
|
|
@@ -1909,6 +2321,7 @@ mediaproc image metadata <input> [options]
|
|
|
1909
2321
|
- `--help` - Display help
|
|
1910
2322
|
|
|
1911
2323
|
**Examples:**
|
|
2324
|
+
|
|
1912
2325
|
```bash
|
|
1913
2326
|
# View basic metadata
|
|
1914
2327
|
mediaproc image metadata photo.jpg
|
|
@@ -1927,6 +2340,7 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
1927
2340
|
```
|
|
1928
2341
|
|
|
1929
2342
|
**Metadata Types:**
|
|
2343
|
+
|
|
1930
2344
|
- **EXIF** - Camera settings, date, GPS location, device info
|
|
1931
2345
|
- **IPTC** - Copyright, caption, keywords, author
|
|
1932
2346
|
- **XMP** - Extended metadata, Adobe properties
|
|
@@ -1934,6 +2348,7 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
1934
2348
|
- **Orientation** - Image rotation data
|
|
1935
2349
|
|
|
1936
2350
|
**Information Displayed:**
|
|
2351
|
+
|
|
1937
2352
|
- File size and modified date
|
|
1938
2353
|
- Image dimensions and format
|
|
1939
2354
|
- Color space and channels
|
|
@@ -1943,6 +2358,7 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
1943
2358
|
- Copyright and attribution
|
|
1944
2359
|
|
|
1945
2360
|
**Why Remove Metadata:**
|
|
2361
|
+
|
|
1946
2362
|
- 🔒 **Privacy** - Remove GPS location data
|
|
1947
2363
|
- 📉 **File Size** - Metadata can add 10-50KB
|
|
1948
2364
|
- 🛡️ **Security** - Remove camera/device info
|
|
@@ -1950,6 +2366,7 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
1950
2366
|
- 🤝 **Clean Sharing** - Remove personal data
|
|
1951
2367
|
|
|
1952
2368
|
**File Size Impact:**
|
|
2369
|
+
|
|
1953
2370
|
- Metadata typically: 10-50KB
|
|
1954
2371
|
- GPS data: ~500 bytes
|
|
1955
2372
|
- Thumbnails in EXIF: 5-30KB
|
|
@@ -1962,11 +2379,13 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
1962
2379
|
Stack multiple images horizontally or vertically with alignment and spacing control.
|
|
1963
2380
|
|
|
1964
2381
|
**Usage:**
|
|
2382
|
+
|
|
1965
2383
|
```bash
|
|
1966
2384
|
mediaproc image stack <images...> [options]
|
|
1967
2385
|
```
|
|
1968
2386
|
|
|
1969
2387
|
**Options:**
|
|
2388
|
+
|
|
1970
2389
|
- `-d, --direction <direction>` - Stack direction: horizontal, vertical (default: horizontal)
|
|
1971
2390
|
- `-a, --align <alignment>` - Alignment: start, center, end (default: center)
|
|
1972
2391
|
- `-g, --gap <pixels>` - Gap between images in pixels (default: 0)
|
|
@@ -1976,6 +2395,7 @@ mediaproc image stack <images...> [options]
|
|
|
1976
2395
|
- `-v, --verbose` - Show detailed output
|
|
1977
2396
|
|
|
1978
2397
|
**Examples:**
|
|
2398
|
+
|
|
1979
2399
|
```bash
|
|
1980
2400
|
# Horizontal before/after comparison
|
|
1981
2401
|
mediaproc image stack before.jpg after.jpg
|
|
@@ -1994,6 +2414,7 @@ mediaproc image stack story*.jpg -d vertical -g 10 -b black
|
|
|
1994
2414
|
```
|
|
1995
2415
|
|
|
1996
2416
|
**Direction & Alignment:**
|
|
2417
|
+
|
|
1997
2418
|
- **horizontal + start** - Images aligned to top
|
|
1998
2419
|
- **horizontal + center** - Images centered vertically (default)
|
|
1999
2420
|
- **horizontal + end** - Images aligned to bottom
|
|
@@ -2002,6 +2423,7 @@ mediaproc image stack story*.jpg -d vertical -g 10 -b black
|
|
|
2002
2423
|
- **vertical + end** - Images aligned to right
|
|
2003
2424
|
|
|
2004
2425
|
**Use Cases:**
|
|
2426
|
+
|
|
2005
2427
|
- Before/after comparisons
|
|
2006
2428
|
- Image sequences and timelines
|
|
2007
2429
|
- Panorama creation
|
|
@@ -2012,6 +2434,7 @@ mediaproc image stack story*.jpg -d vertical -g 10 -b black
|
|
|
2012
2434
|
- Story sequences
|
|
2013
2435
|
|
|
2014
2436
|
**Tips:**
|
|
2437
|
+
|
|
2015
2438
|
- Use gaps (10-20px) for visual separation
|
|
2016
2439
|
- Transparent background works best with PNG output
|
|
2017
2440
|
- Horizontal for wide comparisons
|
|
@@ -2025,17 +2448,20 @@ mediaproc image stack story*.jpg -d vertical -g 10 -b black
|
|
|
2025
2448
|
Create stunning mirror and kaleidoscope effects by reflecting images in various ways.
|
|
2026
2449
|
|
|
2027
2450
|
**Usage:**
|
|
2451
|
+
|
|
2028
2452
|
```bash
|
|
2029
2453
|
mediaproc image mirror <input> [options]
|
|
2030
2454
|
```
|
|
2031
2455
|
|
|
2032
2456
|
**Options:**
|
|
2457
|
+
|
|
2033
2458
|
- `-m, --mode <mode>` - Mirror mode: horizontal, vertical, both, quad (default: horizontal)
|
|
2034
2459
|
- `-o, --output <path>` - Output file path (default: <input>-mirror-<mode>.ext)
|
|
2035
2460
|
- `--dry-run` - Preview without executing
|
|
2036
2461
|
- `-v, --verbose` - Show detailed output
|
|
2037
2462
|
|
|
2038
2463
|
**Examples:**
|
|
2464
|
+
|
|
2039
2465
|
```bash
|
|
2040
2466
|
# Horizontal mirror (left-right symmetry)
|
|
2041
2467
|
mediaproc image mirror photo.jpg
|
|
@@ -2051,23 +2477,22 @@ mediaproc image mirror photo.jpg --mode quad
|
|
|
2051
2477
|
```
|
|
2052
2478
|
|
|
2053
2479
|
**Mirror Modes:**
|
|
2480
|
+
|
|
2054
2481
|
- **horizontal** - Mirror left to right (creates left-right symmetry)
|
|
2055
2482
|
- Output: 2x original width
|
|
2056
2483
|
- Perfect for face symmetry experiments
|
|
2057
|
-
|
|
2058
2484
|
- **vertical** - Mirror top to bottom (creates top-bottom symmetry)
|
|
2059
2485
|
- Output: 2x original height
|
|
2060
2486
|
- Perfect for water reflections, sky mirrors
|
|
2061
|
-
|
|
2062
2487
|
- **both** - Mirror on both axes (creates 4-way symmetry)
|
|
2063
2488
|
- Output: 2x width × 2x height
|
|
2064
2489
|
- Creates complete symmetry
|
|
2065
|
-
|
|
2066
2490
|
- **quad** - Kaleidoscope effect (mirrors center quadrant)
|
|
2067
2491
|
- Output: Original size with center mirrored 4 ways
|
|
2068
2492
|
- Creates mandala-like patterns
|
|
2069
2493
|
|
|
2070
2494
|
**Creative Uses:**
|
|
2495
|
+
|
|
2071
2496
|
- 🪞 Water reflections (vertical mode)
|
|
2072
2497
|
- 👤 Symmetrical portraits
|
|
2073
2498
|
- 🎨 Kaleidoscope art (quad mode)
|
|
@@ -2078,6 +2503,7 @@ mediaproc image mirror photo.jpg --mode quad
|
|
|
2078
2503
|
- 🎭 Surreal art effects
|
|
2079
2504
|
|
|
2080
2505
|
**Best Practices:**
|
|
2506
|
+
|
|
2081
2507
|
- Works best with asymmetric input images
|
|
2082
2508
|
- Quad mode creates most dramatic effects
|
|
2083
2509
|
- Combine with other effects for unique results
|
|
@@ -2090,17 +2516,20 @@ mediaproc image mirror photo.jpg --mode quad
|
|
|
2090
2516
|
Quickly extract the most dominant colors from an image for instant palette generation.
|
|
2091
2517
|
|
|
2092
2518
|
**Usage:**
|
|
2519
|
+
|
|
2093
2520
|
```bash
|
|
2094
2521
|
mediaproc image dominant-color <input> [options]
|
|
2095
2522
|
```
|
|
2096
2523
|
|
|
2097
2524
|
**Options:**
|
|
2525
|
+
|
|
2098
2526
|
- `-c, --count <number>` - Number of dominant colors to extract (default: 5, max: 10)
|
|
2099
2527
|
- `--export <path>` - Export color palette to JSON file
|
|
2100
2528
|
- `-v, --verbose` - Show detailed RGB/HSL values
|
|
2101
2529
|
- `--help` - Display help
|
|
2102
2530
|
|
|
2103
2531
|
**Examples:**
|
|
2532
|
+
|
|
2104
2533
|
```bash
|
|
2105
2534
|
# Extract top 5 dominant colors
|
|
2106
2535
|
mediaproc image dominant-color photo.jpg
|
|
@@ -2116,6 +2545,7 @@ mediaproc image dominant-color artwork.jpg -c 5 -v
|
|
|
2116
2545
|
```
|
|
2117
2546
|
|
|
2118
2547
|
**Output Format:**
|
|
2548
|
+
|
|
2119
2549
|
- 🎨 **Visual Preview** - Colored blocks in terminal
|
|
2120
2550
|
- 🔢 **Hex Codes** - #RRGGBB format
|
|
2121
2551
|
- 📊 **Coverage Percentage** - How much of image uses each color
|
|
@@ -2123,12 +2553,14 @@ mediaproc image dominant-color artwork.jpg -c 5 -v
|
|
|
2123
2553
|
- 🎨 **HSL Values** - (hue, saturation, lightness) with -v flag
|
|
2124
2554
|
|
|
2125
2555
|
**Color Analysis:**
|
|
2556
|
+
|
|
2126
2557
|
- Colors sorted by dominance (most to least)
|
|
2127
2558
|
- Percentage shows coverage in image
|
|
2128
2559
|
- Bucketed to reduce near-identical colors
|
|
2129
2560
|
- Automatically filters similar shades
|
|
2130
2561
|
|
|
2131
2562
|
**Use Cases:**
|
|
2563
|
+
|
|
2132
2564
|
- 🎨 Generate color palettes for design projects
|
|
2133
2565
|
- 🏢 Brand color extraction from logos
|
|
2134
2566
|
- 🌐 Website theme generation
|
|
@@ -2139,6 +2571,7 @@ mediaproc image dominant-color artwork.jpg -c 5 -v
|
|
|
2139
2571
|
- 🏠 Interior design palettes
|
|
2140
2572
|
|
|
2141
2573
|
**Export JSON Format:**
|
|
2574
|
+
|
|
2142
2575
|
```json
|
|
2143
2576
|
{
|
|
2144
2577
|
"source": "photo.jpg",
|
|
@@ -2155,6 +2588,7 @@ mediaproc image dominant-color artwork.jpg -c 5 -v
|
|
|
2155
2588
|
```
|
|
2156
2589
|
|
|
2157
2590
|
**Tips:**
|
|
2591
|
+
|
|
2158
2592
|
- Use fewer colors (2-3) for minimalist palettes
|
|
2159
2593
|
- 5-7 colors ideal for comprehensive palettes
|
|
2160
2594
|
- Export to JSON for use in design tools
|
|
@@ -2166,11 +2600,14 @@ mediaproc image dominant-color artwork.jpg -c 5 -v
|
|
|
2166
2600
|
### 39. **grid** - Create Image Collages
|
|
2167
2601
|
|
|
2168
2602
|
# Instagram carousel (10 horizontal slices)
|
|
2603
|
+
|
|
2169
2604
|
mediaproc image split panorama.jpg -t "1x10"
|
|
2170
2605
|
|
|
2171
2606
|
# Large poster into 4x4 tiles
|
|
2607
|
+
|
|
2172
2608
|
mediaproc image split poster.jpg -r 4 -c 4 -o ./poster-tiles
|
|
2173
|
-
|
|
2609
|
+
|
|
2610
|
+
````
|
|
2174
2611
|
|
|
2175
2612
|
---
|
|
2176
2613
|
|
|
@@ -2181,15 +2618,17 @@ View, export to JSON, or remove EXIF/IPTC/XMP metadata from images.
|
|
|
2181
2618
|
**Usage:**
|
|
2182
2619
|
```bash
|
|
2183
2620
|
mediaproc image metadata <input> [options]
|
|
2184
|
-
|
|
2621
|
+
````
|
|
2185
2622
|
|
|
2186
2623
|
**Options:**
|
|
2624
|
+
|
|
2187
2625
|
- `--remove` - Remove all metadata (create clean copy)
|
|
2188
2626
|
- `--export <path>` - Export metadata to JSON file
|
|
2189
2627
|
- `-o, --output <path>` - Output file (when removing metadata)
|
|
2190
2628
|
- `-v, --verbose` - Show detailed metadata
|
|
2191
2629
|
|
|
2192
2630
|
**Examples:**
|
|
2631
|
+
|
|
2193
2632
|
```bash
|
|
2194
2633
|
# View metadata
|
|
2195
2634
|
mediaproc image metadata photo.jpg
|
|
@@ -2211,11 +2650,13 @@ mediaproc image metadata photo.jpg --remove -o clean.jpg
|
|
|
2211
2650
|
Stack multiple images horizontally or vertically with customizable alignment and spacing.
|
|
2212
2651
|
|
|
2213
2652
|
**Usage:**
|
|
2653
|
+
|
|
2214
2654
|
```bash
|
|
2215
2655
|
mediaproc image stack <images...> [options]
|
|
2216
2656
|
```
|
|
2217
2657
|
|
|
2218
2658
|
**Options:**
|
|
2659
|
+
|
|
2219
2660
|
- `-d, --direction <direction>` - Stack direction: horizontal, vertical (default: horizontal)
|
|
2220
2661
|
- `-a, --align <alignment>` - Alignment: start, center, end (default: center)
|
|
2221
2662
|
- `-g, --gap <pixels>` - Gap between images (default: 0)
|
|
@@ -2223,6 +2664,7 @@ mediaproc image stack <images...> [options]
|
|
|
2223
2664
|
- `-o, --output <path>` - Output file path
|
|
2224
2665
|
|
|
2225
2666
|
**Examples:**
|
|
2667
|
+
|
|
2226
2668
|
```bash
|
|
2227
2669
|
# Horizontal before/after comparison
|
|
2228
2670
|
mediaproc image stack before.jpg after.jpg
|
|
@@ -2241,15 +2683,18 @@ mediaproc image stack panorama*.jpg -d horizontal -o panorama.jpg
|
|
|
2241
2683
|
Create mirror and kaleidoscope effects by reflecting images horizontally, vertically, or in quadrants.
|
|
2242
2684
|
|
|
2243
2685
|
**Usage:**
|
|
2686
|
+
|
|
2244
2687
|
```bash
|
|
2245
2688
|
mediaproc image mirror <input> [options]
|
|
2246
2689
|
```
|
|
2247
2690
|
|
|
2248
2691
|
**Options:**
|
|
2692
|
+
|
|
2249
2693
|
- `-m, --mode <mode>` - Mirror mode: horizontal, vertical, both, quad (default: horizontal)
|
|
2250
2694
|
- `-o, --output <path>` - Output file path
|
|
2251
2695
|
|
|
2252
2696
|
**Examples:**
|
|
2697
|
+
|
|
2253
2698
|
```bash
|
|
2254
2699
|
# Horizontal mirror (left-right symmetry)
|
|
2255
2700
|
mediaproc image mirror photo.jpg
|
|
@@ -2268,16 +2713,19 @@ mediaproc image mirror photo.jpg --mode quad
|
|
|
2268
2713
|
Quickly extract the most dominant colors from an image for palette generation.
|
|
2269
2714
|
|
|
2270
2715
|
**Usage:**
|
|
2716
|
+
|
|
2271
2717
|
```bash
|
|
2272
2718
|
mediaproc image dominant-color <input> [options]
|
|
2273
2719
|
```
|
|
2274
2720
|
|
|
2275
2721
|
**Options:**
|
|
2722
|
+
|
|
2276
2723
|
- `-c, --count <number>` - Number of colors to extract (default: 5, max: 10)
|
|
2277
2724
|
- `--export <path>` - Export color palette to JSON file
|
|
2278
2725
|
- `-v, --verbose` - Show detailed RGB/HSL values
|
|
2279
2726
|
|
|
2280
2727
|
**Examples:**
|
|
2728
|
+
|
|
2281
2729
|
```bash
|
|
2282
2730
|
# Extract top 5 colors
|
|
2283
2731
|
mediaproc image dominant-color photo.jpg
|
|
@@ -2294,6 +2742,7 @@ mediaproc image dominant-color photo.jpg --export palette.json
|
|
|
2294
2742
|
## � Real-World Workflows
|
|
2295
2743
|
|
|
2296
2744
|
### Workflow 1: Web Optimization Pipeline
|
|
2745
|
+
|
|
2297
2746
|
```bash
|
|
2298
2747
|
# 1. Resize for responsive web
|
|
2299
2748
|
mediaproc image resize photo.jpg -w 1920 --fit inside -o web-large.jpg
|
|
@@ -2311,6 +2760,7 @@ mediaproc image thumbnail web-large.jpg -s 300 -o thumb.jpg
|
|
|
2311
2760
|
```
|
|
2312
2761
|
|
|
2313
2762
|
### Workflow 2: Social Media Prep
|
|
2763
|
+
|
|
2314
2764
|
```bash
|
|
2315
2765
|
# Instagram square post
|
|
2316
2766
|
mediaproc image smart-crop photo.jpg -w 1080 -h 1080 -o instagram.jpg
|
|
@@ -2326,6 +2776,7 @@ mediaproc image metadata instagram.jpg --remove -o instagram-clean.jpg
|
|
|
2326
2776
|
```
|
|
2327
2777
|
|
|
2328
2778
|
### Workflow 3: Photo Enhancement Pipeline
|
|
2779
|
+
|
|
2329
2780
|
```bash
|
|
2330
2781
|
# 1. Auto-enhance
|
|
2331
2782
|
mediaproc image auto-enhance photo.jpg --level medium
|
|
@@ -2343,6 +2794,7 @@ mediaproc image sharpen photo-auto-enhanced-modulated-vignette.jpg -s 1.2
|
|
|
2343
2794
|
```
|
|
2344
2795
|
|
|
2345
2796
|
### Workflow 4: Batch Product Photos
|
|
2797
|
+
|
|
2346
2798
|
```bash
|
|
2347
2799
|
# Process entire product directory
|
|
2348
2800
|
mediaproc image batch ./products --operation resize --width 1200 --height 1200 -o ./web-products
|
|
@@ -2358,6 +2810,7 @@ mediaproc image batch ./web-products -op optimize -q 90
|
|
|
2358
2810
|
```
|
|
2359
2811
|
|
|
2360
2812
|
### Workflow 5: Instagram Carousel Creation
|
|
2813
|
+
|
|
2361
2814
|
```bash
|
|
2362
2815
|
# 1. Create panorama from multiple images
|
|
2363
2816
|
mediaproc image stack img1.jpg img2.jpg img3.jpg -d horizontal -o panorama.jpg
|
|
@@ -2372,6 +2825,7 @@ mediaproc image batch ./carousel -op optimize -q 90
|
|
|
2372
2825
|
```
|
|
2373
2826
|
|
|
2374
2827
|
### Workflow 6: Portfolio Grid
|
|
2828
|
+
|
|
2375
2829
|
```bash
|
|
2376
2830
|
# Create 3x3 portfolio grid
|
|
2377
2831
|
mediaproc image grid portfolio/*.jpg -c 3 -w 500 -h 500 -g 15 -b "#f5f5f5" -o portfolio-grid.jpg
|
|
@@ -2384,6 +2838,7 @@ mediaproc image optimize portfolio-grid-watermark.jpg -q 88 -o final-portfolio.j
|
|
|
2384
2838
|
```
|
|
2385
2839
|
|
|
2386
2840
|
### Workflow 7: Before/After Comparison
|
|
2841
|
+
|
|
2387
2842
|
```bash
|
|
2388
2843
|
# Stack horizontally
|
|
2389
2844
|
mediaproc image stack before.jpg after.jpg -d horizontal -g 20 -b white -o comparison.jpg
|
|
@@ -2396,6 +2851,7 @@ mediaproc image optimize comparison-border.jpg -q 90
|
|
|
2396
2851
|
```
|
|
2397
2852
|
|
|
2398
2853
|
### Workflow 8: Vintage Photo Restoration
|
|
2854
|
+
|
|
2399
2855
|
```bash
|
|
2400
2856
|
# 1. Denoise
|
|
2401
2857
|
mediaproc image median old-photo.jpg -s 5
|
|
@@ -2413,6 +2869,7 @@ mediaproc image vignette old-photo-median-normalized-sepia.jpg -i 30
|
|
|
2413
2869
|
```
|
|
2414
2870
|
|
|
2415
2871
|
### Workflow 9: Privacy-Safe Sharing
|
|
2872
|
+
|
|
2416
2873
|
```bash
|
|
2417
2874
|
# 1. Remove all metadata (GPS, camera info)
|
|
2418
2875
|
mediaproc image metadata vacation.jpg --remove -o clean.jpg
|
|
@@ -2427,6 +2884,7 @@ mediaproc image optimize clean-1200w.jpg -q 80
|
|
|
2427
2884
|
```
|
|
2428
2885
|
|
|
2429
2886
|
### Workflow 10: Creative Kaleidoscope Art
|
|
2887
|
+
|
|
2430
2888
|
```bash
|
|
2431
2889
|
# 1. Extract vibrant colors
|
|
2432
2890
|
mediaproc image dominant-color photo.jpg -c 5 --export colors.json
|
|
@@ -2444,6 +2902,7 @@ mediaproc image border photo-modulated-mirror-quad.jpg -w 40 -c black
|
|
|
2444
2902
|
```
|
|
2445
2903
|
|
|
2446
2904
|
### Batch Processing Tips
|
|
2905
|
+
|
|
2447
2906
|
```bash
|
|
2448
2907
|
# Process all JPGs in directory
|
|
2449
2908
|
for file in *.jpg; do
|
|
@@ -2467,6 +2926,7 @@ done
|
|
|
2467
2926
|
## �🐛 Troubleshooting
|
|
2468
2927
|
|
|
2469
2928
|
### Command Not Found
|
|
2929
|
+
|
|
2470
2930
|
```bash
|
|
2471
2931
|
# Ensure CLI is installed
|
|
2472
2932
|
npm list -g @mediaproc/cli
|
|
@@ -2476,6 +2936,7 @@ npx @mediaproc/cli image resize photo.jpg -w 800
|
|
|
2476
2936
|
```
|
|
2477
2937
|
|
|
2478
2938
|
### Invalid Image Format
|
|
2939
|
+
|
|
2479
2940
|
```bash
|
|
2480
2941
|
# Check supported formats
|
|
2481
2942
|
mediaproc image convert --help
|
|
@@ -2484,6 +2945,7 @@ mediaproc image convert --help
|
|
|
2484
2945
|
```
|
|
2485
2946
|
|
|
2486
2947
|
### Out of Memory
|
|
2948
|
+
|
|
2487
2949
|
```bash
|
|
2488
2950
|
# For very large images, consider:
|
|
2489
2951
|
# 1. Resizing first
|