apexify.js 5.0.4 → 5.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/CHANGELOG.md +352 -137
- package/README.md +60 -3
- package/dist/cjs/Canvas/ApexPainter.d.ts +272 -0
- package/dist/cjs/Canvas/ApexPainter.d.ts.map +1 -1
- package/dist/cjs/Canvas/ApexPainter.js +2275 -125
- package/dist/cjs/Canvas/ApexPainter.js.map +1 -1
- package/dist/cjs/Canvas/utils/Custom/advancedLines.d.ts +4 -4
- package/dist/cjs/Canvas/utils/Custom/advancedLines.d.ts.map +1 -1
- package/dist/cjs/Canvas/utils/Custom/advancedLines.js +63 -21
- package/dist/cjs/Canvas/utils/Custom/advancedLines.js.map +1 -1
- package/dist/cjs/Canvas/utils/Custom/customLines.d.ts.map +1 -1
- package/dist/cjs/Canvas/utils/Custom/customLines.js +3 -0
- package/dist/cjs/Canvas/utils/Custom/customLines.js.map +1 -1
- package/dist/cjs/Canvas/utils/types.d.ts +5 -1
- package/dist/cjs/Canvas/utils/types.d.ts.map +1 -1
- package/dist/cjs/Canvas/utils/types.js.map +1 -1
- package/dist/esm/Canvas/ApexPainter.d.ts +272 -0
- package/dist/esm/Canvas/ApexPainter.d.ts.map +1 -1
- package/dist/esm/Canvas/ApexPainter.js +2275 -125
- package/dist/esm/Canvas/ApexPainter.js.map +1 -1
- package/dist/esm/Canvas/utils/Custom/advancedLines.d.ts +4 -4
- package/dist/esm/Canvas/utils/Custom/advancedLines.d.ts.map +1 -1
- package/dist/esm/Canvas/utils/Custom/advancedLines.js +63 -21
- package/dist/esm/Canvas/utils/Custom/advancedLines.js.map +1 -1
- package/dist/esm/Canvas/utils/Custom/customLines.d.ts.map +1 -1
- package/dist/esm/Canvas/utils/Custom/customLines.js +3 -0
- package/dist/esm/Canvas/utils/Custom/customLines.js.map +1 -1
- package/dist/esm/Canvas/utils/types.d.ts +5 -1
- package/dist/esm/Canvas/utils/types.d.ts.map +1 -1
- package/dist/esm/Canvas/utils/types.js.map +1 -1
- package/lib/Canvas/ApexPainter.ts +2973 -136
- package/lib/Canvas/utils/Custom/advancedLines.ts +77 -25
- package/lib/Canvas/utils/Custom/customLines.ts +4 -0
- package/lib/Canvas/utils/types.ts +6 -2
- package/package.json +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,137 +1,352 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to Apexify.js will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [5.
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
- **
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- **
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
- **
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Apexify.js will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [5.1.0] - 2024-12-20
|
|
9
|
+
|
|
10
|
+
### ✨ Added
|
|
11
|
+
|
|
12
|
+
##### Comprehensive Video Processing Features (18 New Features!)
|
|
13
|
+
- **Video Effects/Filters** (`applyEffects`): Apply professional filters to entire videos
|
|
14
|
+
- Blur, brightness, contrast, saturation adjustments
|
|
15
|
+
- Grayscale, sepia, invert effects
|
|
16
|
+
- Sharpen and noise filters
|
|
17
|
+
- Chain multiple filters together
|
|
18
|
+
|
|
19
|
+
- **Video Merging** (`merge`): Combine multiple videos
|
|
20
|
+
- Sequential concatenation (one after another)
|
|
21
|
+
- Side-by-side layout
|
|
22
|
+
- Grid layouts with customizable rows/columns
|
|
23
|
+
|
|
24
|
+
- **Video Rotation/Flip** (`rotate`): Transform video orientation
|
|
25
|
+
- Rotate 90°, 180°, 270°
|
|
26
|
+
- Horizontal, vertical, or both flips
|
|
27
|
+
- Combined rotation and flip support
|
|
28
|
+
|
|
29
|
+
- **Video Cropping** (`crop`): Crop videos to specific regions
|
|
30
|
+
- Precise x, y, width, height control
|
|
31
|
+
- Remove black bars or focus on specific areas
|
|
32
|
+
- Maintain aspect ratio or create custom crops
|
|
33
|
+
|
|
34
|
+
- **Video Compression** (`compress`): Optimize video file sizes
|
|
35
|
+
- Quality presets: low, medium, high, ultra
|
|
36
|
+
- Custom bitrate control
|
|
37
|
+
- Target file size optimization
|
|
38
|
+
- Returns compression statistics (original vs compressed size)
|
|
39
|
+
|
|
40
|
+
- **Text Overlay** (`addText`): Add text/subtitles to videos
|
|
41
|
+
- 7 position options (top-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right)
|
|
42
|
+
- Customizable font size, color, background
|
|
43
|
+
- Time-based visibility (start/end time control)
|
|
44
|
+
- Professional subtitle styling
|
|
45
|
+
|
|
46
|
+
- **Fade Effects** (`addFade`): Add fade transitions
|
|
47
|
+
- Fade in at video start
|
|
48
|
+
- Fade out at video end
|
|
49
|
+
- Configurable fade duration
|
|
50
|
+
|
|
51
|
+
- **Reverse Playback** (`reverse`): Reverse video and audio
|
|
52
|
+
- Create rewind effects
|
|
53
|
+
- Perfect for creative video editing
|
|
54
|
+
|
|
55
|
+
- **Video Loop Creation** (`createLoop`): Create seamless loops
|
|
56
|
+
- Automatic loop generation
|
|
57
|
+
- Smooth loop detection (optional)
|
|
58
|
+
|
|
59
|
+
- **Batch Processing** (`batch`): Process multiple videos at once
|
|
60
|
+
- Apply same or different operations to multiple videos
|
|
61
|
+
- Parallel processing support
|
|
62
|
+
- Comprehensive result reporting
|
|
63
|
+
|
|
64
|
+
- **Scene Detection** (`detectScenes`): Detect scene changes
|
|
65
|
+
- Automatic scene boundary detection
|
|
66
|
+
- Configurable threshold sensitivity
|
|
67
|
+
- Export scene markers to JSON
|
|
68
|
+
|
|
69
|
+
- **Video Stabilization** (`stabilize`): Reduce camera shake
|
|
70
|
+
- Two-pass stabilization algorithm
|
|
71
|
+
- Configurable smoothing factor
|
|
72
|
+
- Fallback to simple deshake if advanced features unavailable
|
|
73
|
+
|
|
74
|
+
- **Color Correction** (`colorCorrect`): Professional color grading
|
|
75
|
+
- Brightness, contrast, saturation adjustments
|
|
76
|
+
- Hue rotation
|
|
77
|
+
- Color temperature adjustment
|
|
78
|
+
- Professional color grading tools
|
|
79
|
+
|
|
80
|
+
- **Picture-in-Picture** (`pictureInPicture`): Add overlay videos
|
|
81
|
+
- 5 position options
|
|
82
|
+
- Customizable overlay size
|
|
83
|
+
- Opacity control
|
|
84
|
+
- Perfect for video overlays and annotations
|
|
85
|
+
|
|
86
|
+
- **Split Screen** (`splitScreen`): Create multi-video layouts
|
|
87
|
+
- Side-by-side layout
|
|
88
|
+
- Top-bottom layout
|
|
89
|
+
- Grid layouts (2x2, 3x3, etc.)
|
|
90
|
+
- Support for multiple video sources
|
|
91
|
+
|
|
92
|
+
- **Time-lapse Creation** (`createTimeLapse`): Speed up videos
|
|
93
|
+
- Configurable speed multiplier
|
|
94
|
+
- Create time-lapse from regular videos
|
|
95
|
+
- Maintain video quality
|
|
96
|
+
|
|
97
|
+
- **Mute Video** (`mute`): Remove audio track
|
|
98
|
+
- Quick audio removal
|
|
99
|
+
- Maintains video quality
|
|
100
|
+
|
|
101
|
+
- **Volume Adjustment** (`adjustVolume`): Control audio levels
|
|
102
|
+
- Volume multiplier (0.0 to 10.0)
|
|
103
|
+
- Mute, reduce, or amplify audio
|
|
104
|
+
- Precise volume control
|
|
105
|
+
|
|
106
|
+
- **Format Detection** (`detectFormat`): Analyze video properties
|
|
107
|
+
- Detect codec, container format
|
|
108
|
+
- Get resolution, FPS, bitrate
|
|
109
|
+
- Complete video metadata extraction
|
|
110
|
+
|
|
111
|
+
### 🔧 Improved
|
|
112
|
+
|
|
113
|
+
##### Enhanced `createVideo()` Method
|
|
114
|
+
- **Unified API**: All video features now accessible through single `createVideo()` method
|
|
115
|
+
- **Nested Options**: Clean, organized API with nested option objects
|
|
116
|
+
- **Better Error Handling**: Comprehensive error messages with FFmpeg installation guides
|
|
117
|
+
- **Resource Management**: Automatic cleanup of temporary files
|
|
118
|
+
- **Path Resolution**: Improved handling of relative paths and Buffer inputs
|
|
119
|
+
|
|
120
|
+
##### Video Processing Performance
|
|
121
|
+
- **Optimized FFmpeg Commands**: Better command construction for all operations
|
|
122
|
+
- **Efficient Resource Usage**: Proper cleanup and memory management
|
|
123
|
+
- **Timeout Handling**: Appropriate timeouts for different operation types
|
|
124
|
+
- **Buffer Management**: Optimized buffer sizes for different operations
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### 🐛 Fixed
|
|
129
|
+
|
|
130
|
+
##### Video Background Fixes
|
|
131
|
+
- **Fixed Black Background Issue**: Resolved issue where `videoBg` in `createCanvas` was showing black background
|
|
132
|
+
- Restructured background drawing logic to include `videoBg` in if/else chain
|
|
133
|
+
- Prevents default black background from being drawn on top of video frames
|
|
134
|
+
- Video backgrounds now render correctly without black overlay
|
|
135
|
+
|
|
136
|
+
- **Fixed FFmpeg Command Issues**: Improved video frame extraction reliability
|
|
137
|
+
- Removed invalid format flags (`-f png`, `-f mjpeg`) that caused extraction failures
|
|
138
|
+
- Improved pixel format handling: PNG uses `rgba`, JPEG uses default format
|
|
139
|
+
- Better path resolution for relative video file paths
|
|
140
|
+
- Enhanced error messages with detailed FFmpeg installation instructions
|
|
141
|
+
|
|
142
|
+
- **Fixed Frame Extraction Quality**: Improved video frame extraction accuracy
|
|
143
|
+
- Better seeking accuracy by placing `-ss` after `-i` in FFmpeg commands
|
|
144
|
+
- Added fallback mechanism: saves frame to temp file if buffer loading fails
|
|
145
|
+
- Force PNG format for `videoBg` to ensure compatibility with `loadImage`
|
|
146
|
+
- Proper pixel format handling for color accuracy
|
|
147
|
+
|
|
148
|
+
### ✨ Added
|
|
149
|
+
|
|
150
|
+
##### New Video Methods
|
|
151
|
+
- **`createVideo()`**: New method to create canvas with video frame as background
|
|
152
|
+
- Extract frames at specific time or frame number
|
|
153
|
+
- Custom canvas dimensions or auto-use video dimensions
|
|
154
|
+
- Returns `CanvasResults` compatible with other ApexPainter methods
|
|
155
|
+
|
|
156
|
+
- **`extractFrameByNumber()`**: Extract frames by frame number (1-based)
|
|
157
|
+
- Automatically converts frame number to time using video FPS
|
|
158
|
+
- More intuitive API for frame-based extraction
|
|
159
|
+
- Handles FPS detection and conversion automatically
|
|
160
|
+
|
|
161
|
+
- **`extractAllFrames()`**: Extract ALL frames from a video
|
|
162
|
+
- Extracts every frame from video as PNG/JPEG files
|
|
163
|
+
- Configurable output directory and file naming
|
|
164
|
+
- Optional time range (startTime/endTime) for partial extraction
|
|
165
|
+
- Returns array of frame file paths with metadata
|
|
166
|
+
|
|
167
|
+
### 🔧 Improved
|
|
168
|
+
|
|
169
|
+
##### Video Processing Enhancements
|
|
170
|
+
- **Better Path Resolution**: Relative video paths are now properly resolved
|
|
171
|
+
- Automatically resolves paths relative to `process.cwd()`
|
|
172
|
+
- Consistent with how `customBg` handles image paths
|
|
173
|
+
- Better error messages when video files are not found
|
|
174
|
+
|
|
175
|
+
- **Enhanced Error Handling**: More informative error messages
|
|
176
|
+
- Detailed FFmpeg installation instructions in error messages
|
|
177
|
+
- OS-specific installation guides (Windows, macOS, Linux)
|
|
178
|
+
- Clear error messages when frame extraction fails
|
|
179
|
+
- Validation for empty buffers and invalid dimensions
|
|
180
|
+
|
|
181
|
+
- **Improved Frame Loading**: Better compatibility with `loadImage`
|
|
182
|
+
- Fallback to file-based loading if buffer loading fails
|
|
183
|
+
- Automatic cleanup of temporary files
|
|
184
|
+
- Better handling of different pixel formats
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## [5.0.5] - 2024-12-20
|
|
189
|
+
|
|
190
|
+
### ✨ Enhanced
|
|
191
|
+
|
|
192
|
+
##### Ultra-Smooth Line Rendering
|
|
193
|
+
- **Improved Smooth Path Algorithm**: Enhanced `createSmoothPath` function for graph-like smoothness
|
|
194
|
+
- Increased resolution from 20 to 50 segments per curve for ultra-smooth rendering
|
|
195
|
+
- Added high-quality anti-aliasing (`imageSmoothingQuality: 'high'`)
|
|
196
|
+
- Optimized Cardinal Spline algorithm for better curve interpolation
|
|
197
|
+
- Improved control point calculation for seamless transitions
|
|
198
|
+
|
|
199
|
+
- **Enhanced Catmull-Rom Spline**: Upgraded `createCatmullRomPath` for professional graph quality
|
|
200
|
+
- Increased resolution from 30 to 60 segments per curve (graph-quality smoothness)
|
|
201
|
+
- Fixed Catmull-Rom formula for correct tension handling
|
|
202
|
+
- Added high-quality anti-aliasing for pixel-perfect rendering
|
|
203
|
+
- Optimized spline interpolation for maximum smoothness
|
|
204
|
+
|
|
205
|
+
- **Anti-Aliasing Support**: Enabled high-quality image smoothing across all custom line rendering
|
|
206
|
+
- Automatic anti-aliasing in `customLines` function
|
|
207
|
+
- High-quality smoothing in both smooth and Catmull-Rom path types
|
|
208
|
+
- Ensures graph-like smoothness with no visible segments or sharp edges
|
|
209
|
+
|
|
210
|
+
#### 🎯 Performance & Quality
|
|
211
|
+
- **Ultra-High Resolution Curves**: Lines now render with 50-60 segments per curve (previously 20-30)
|
|
212
|
+
- **Graph-Quality Smoothness**: Lines match the smoothness of professional graphing libraries
|
|
213
|
+
- **Optimized Tension Values**: Lower default tension (0.15-0.2) for maximum smoothness
|
|
214
|
+
- **Seamless Transitions**: Improved curve interpolation eliminates visible segments
|
|
215
|
+
|
|
216
|
+
#### 📝 Usage Improvements
|
|
217
|
+
- **Better Defaults**: Optimized tension values for graph-like smoothness
|
|
218
|
+
- **Enhanced Documentation**: Updated examples with recommended settings for ultra-smooth lines
|
|
219
|
+
- **Flexible Configuration**: Support for tension values 0.1-0.3 for different smoothness levels
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## [5.0.0] - 2024-12-20
|
|
224
|
+
|
|
225
|
+
### 🎉 Major Feature Release - Advanced Image & Canvas Features
|
|
226
|
+
|
|
227
|
+
#### ✨ Added
|
|
228
|
+
|
|
229
|
+
##### Background Enhancements
|
|
230
|
+
- **Background Image Filters**: Apply filters directly to background images via `customBg.filters`
|
|
231
|
+
- **Background Image Opacity**: Control background image transparency with `customBg.opacity`
|
|
232
|
+
- **Video Backgrounds**: Support for video backgrounds with frame extraction via `videoBg` option
|
|
233
|
+
- Extract specific frames from videos
|
|
234
|
+
- Loop and autoplay support
|
|
235
|
+
- Opacity control for video backgrounds
|
|
236
|
+
|
|
237
|
+
##### Image Processing Enhancements
|
|
238
|
+
- **Image Masking**: Apply masks to images with multiple modes (`alpha`, `luminance`, `inverse`)
|
|
239
|
+
- **Custom Clip Paths**: Define custom polygon clipping paths for images
|
|
240
|
+
- **Image Distortion**:
|
|
241
|
+
- Perspective distortion with 4-point control
|
|
242
|
+
- Bulge/pinch effects with intensity control
|
|
243
|
+
- Mesh warping with customizable grid control points
|
|
244
|
+
- **Effects Stack**: Professional image effects
|
|
245
|
+
- Vignette effect with intensity and size control
|
|
246
|
+
- Lens flare with position and intensity
|
|
247
|
+
- Chromatic aberration effect
|
|
248
|
+
- Film grain effect
|
|
249
|
+
- **Enhanced Filters**:
|
|
250
|
+
- `filterIntensity` - Global intensity multiplier for all filters
|
|
251
|
+
- `filterOrder` - Control when filters are applied (`pre` or `post` transformation)
|
|
252
|
+
|
|
253
|
+
##### Text Enhancements
|
|
254
|
+
- **Text on Paths**: Render text along curves and paths
|
|
255
|
+
- Support for line, arc, bezier, and quadratic curve paths
|
|
256
|
+
- Offset control for text distance from path
|
|
257
|
+
- Automatic text distribution along path
|
|
258
|
+
|
|
259
|
+
##### Custom Lines Enhancements
|
|
260
|
+
- **Advanced Path Options**:
|
|
261
|
+
- Smooth path interpolation with tension control
|
|
262
|
+
- Bezier curve paths
|
|
263
|
+
- Catmull-Rom spline paths
|
|
264
|
+
- Closed path support
|
|
265
|
+
- **Arrow Markers**:
|
|
266
|
+
- Start and end arrows on lines
|
|
267
|
+
- Customizable arrow size and style (filled/outline)
|
|
268
|
+
- Color control for arrows
|
|
269
|
+
- **Path Markers**:
|
|
270
|
+
- Add markers at any position along a path (0-1)
|
|
271
|
+
- Multiple marker shapes: circle, square, diamond, arrow
|
|
272
|
+
- Customizable marker size and color
|
|
273
|
+
- **Line Patterns**:
|
|
274
|
+
- Built-in patterns: dots, dashes, custom segments
|
|
275
|
+
- Pattern offset control
|
|
276
|
+
- **Line Textures**: Apply texture images to lines
|
|
277
|
+
|
|
278
|
+
##### New Utility Methods
|
|
279
|
+
- **Batch Operations**: `batch()` - Process multiple operations in parallel
|
|
280
|
+
- **Chain Operations**: `chain()` - Chain operations sequentially
|
|
281
|
+
- **Image Stitching**: `stitchImages()` - Stitch multiple images together
|
|
282
|
+
- Horizontal, vertical, and grid layouts
|
|
283
|
+
- Overlap and blend support
|
|
284
|
+
- Spacing control
|
|
285
|
+
- **Collage Maker**: `createCollage()` - Create image collages
|
|
286
|
+
- Grid, masonry, carousel, and custom layouts
|
|
287
|
+
- Automatic spacing and alignment
|
|
288
|
+
- Background and border radius support
|
|
289
|
+
- **Image Compression**: `compress()` - Compress images with quality control
|
|
290
|
+
- Support for JPEG, WebP, and AVIF formats
|
|
291
|
+
- Progressive JPEG support
|
|
292
|
+
- Max width/height constraints
|
|
293
|
+
- **Color Palette Extraction**: `extractPalette()` - Extract color palettes from images
|
|
294
|
+
- Multiple algorithms: k-means, median-cut, octree
|
|
295
|
+
- Customizable color count
|
|
296
|
+
- Multiple output formats: hex, rgb, hsl
|
|
297
|
+
- **Advanced Save Method**: `save()` - Save buffers to local files with extensive customization
|
|
298
|
+
- Multiple file formats: PNG, JPEG, WebP, AVIF, GIF
|
|
299
|
+
- Smart naming patterns: timestamp, counter, or custom
|
|
300
|
+
- Auto-create directories
|
|
301
|
+
- Quality control for JPEG/WebP
|
|
302
|
+
- Prefix/suffix support
|
|
303
|
+
- Overwrite protection with auto-renaming
|
|
304
|
+
- Batch saving with `saveMultiple()`
|
|
305
|
+
- Counter management with `resetSaveCounter()`
|
|
306
|
+
|
|
307
|
+
#### 🔧 Technical Improvements
|
|
308
|
+
- Added comprehensive TypeScript type definitions for all new features
|
|
309
|
+
- Created utility modules for better code organization:
|
|
310
|
+
- `imageMasking.ts` - Image masking and distortion utilities
|
|
311
|
+
- `imageEffects.ts` - Image effects utilities
|
|
312
|
+
- `textPathRenderer.ts` - Text path rendering utilities
|
|
313
|
+
- `advancedLines.ts` - Advanced line drawing utilities
|
|
314
|
+
- `batchOperations.ts` - Batch and chain operation utilities
|
|
315
|
+
- `imageStitching.ts` - Image stitching and collage utilities
|
|
316
|
+
- `imageCompression.ts` - Image compression and palette extraction utilities
|
|
317
|
+
- Enhanced error handling and validation
|
|
318
|
+
- Improved type safety across all new features
|
|
319
|
+
|
|
320
|
+
#### 📚 Documentation
|
|
321
|
+
- Updated README with new features
|
|
322
|
+
- Added comprehensive examples for all new features
|
|
323
|
+
- Enhanced API documentation
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## [4.9.28] - Previous Release
|
|
328
|
+
|
|
329
|
+
### Features
|
|
330
|
+
- Enhanced text renderer with decorations
|
|
331
|
+
- Professional pattern system
|
|
332
|
+
- Advanced gradient support
|
|
333
|
+
- Comprehensive shape drawing
|
|
334
|
+
- Chart generation capabilities
|
|
335
|
+
- GIF creation support
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## [4.9.0] - Initial Major Release
|
|
340
|
+
|
|
341
|
+
### Features
|
|
342
|
+
- Core canvas creation
|
|
343
|
+
- Image and shape drawing
|
|
344
|
+
- Text rendering
|
|
345
|
+
- Basic filters and effects
|
|
346
|
+
- Format conversion
|
|
347
|
+
- Background removal
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
For a complete list of changes, please refer to the [GitHub repository](https://github.com/zenith-79/apexify.js).
|
|
352
|
+
|
package/README.md
CHANGED
|
@@ -202,6 +202,35 @@ Generate game assets and UI elements:
|
|
|
202
202
|
- **Chain Operations**: Chain operations sequentially for complex workflows
|
|
203
203
|
- **Advanced File Saving**: Save buffers to local files with smart naming, format conversion, and batch support
|
|
204
204
|
|
|
205
|
+
### 🎬 **Comprehensive Video Processing** (v5.2.0+)
|
|
206
|
+
- **Frame Extraction**: Extract single frames, multiple frames, or all frames from videos
|
|
207
|
+
- **Video Information**: Get video metadata (duration, resolution, FPS, bitrate, codec)
|
|
208
|
+
- **Thumbnail Generation**: Create grid thumbnails with multiple frames
|
|
209
|
+
- **Format Conversion**: Convert videos between MP4, WebM, AVI, MOV, MKV
|
|
210
|
+
- **Video Trimming**: Cut and trim video segments
|
|
211
|
+
- **Audio Extraction**: Extract audio tracks (MP3, WAV, AAC, OGG)
|
|
212
|
+
- **Watermarking**: Add image watermarks to videos with position and opacity control
|
|
213
|
+
- **Speed Control**: Change video playback speed (slow motion, fast forward)
|
|
214
|
+
- **Preview Generation**: Generate preview frames for video browsing
|
|
215
|
+
- **Video Effects**: Apply filters (blur, brightness, contrast, saturation, grayscale, sepia, invert, sharpen, noise)
|
|
216
|
+
- **Video Merging**: Concatenate videos sequentially, side-by-side, or in grids
|
|
217
|
+
- **Rotation & Flipping**: Rotate videos (90°, 180°, 270°) and flip horizontally/vertically
|
|
218
|
+
- **Video Cropping**: Crop videos to specific regions
|
|
219
|
+
- **Compression**: Optimize video file sizes with quality presets
|
|
220
|
+
- **Text Overlays**: Add text/subtitles to videos with positioning and timing
|
|
221
|
+
- **Fade Effects**: Add fade in/out transitions
|
|
222
|
+
- **Reverse Playback**: Reverse video and audio playback
|
|
223
|
+
- **Video Loops**: Create seamless video loops
|
|
224
|
+
- **Batch Processing**: Process multiple videos with different operations
|
|
225
|
+
- **Scene Detection**: Automatically detect scene changes
|
|
226
|
+
- **Video Stabilization**: Reduce camera shake and stabilize shaky footage
|
|
227
|
+
- **Color Correction**: Professional color grading (brightness, contrast, saturation, hue, temperature)
|
|
228
|
+
- **Picture-in-Picture**: Add overlay videos with position, size, and opacity control
|
|
229
|
+
- **Split Screen**: Create side-by-side, top-bottom, or grid layouts with multiple videos
|
|
230
|
+
- **Time-lapse Creation**: Speed up videos to create time-lapse effects
|
|
231
|
+
- **Audio Control**: Mute videos or adjust audio volume
|
|
232
|
+
- **Format Detection**: Analyze video codec, container, and properties
|
|
233
|
+
|
|
205
234
|
---
|
|
206
235
|
|
|
207
236
|
## 🚀 Quick Start
|
|
@@ -828,9 +857,37 @@ This allows you to add multiple elements in one call for better performance and
|
|
|
828
857
|
|
|
829
858
|
---
|
|
830
859
|
|
|
831
|
-
## 🆕 What's New
|
|
832
|
-
|
|
833
|
-
###
|
|
860
|
+
## 🆕 What's New
|
|
861
|
+
|
|
862
|
+
### 🎬 v5.2.0 - Comprehensive Video Processing Suite
|
|
863
|
+
|
|
864
|
+
#### 18 New Video Features
|
|
865
|
+
- 🎥 **Video Effects & Filters**: Apply professional filters (blur, brightness, contrast, saturation, grayscale, sepia, invert, sharpen, noise)
|
|
866
|
+
- 🔗 **Video Merging**: Concatenate videos sequentially, side-by-side, or in grid layouts
|
|
867
|
+
- 🔄 **Rotation & Flipping**: Rotate videos (90°, 180°, 270°) and flip horizontally/vertically
|
|
868
|
+
- ✂️ **Video Cropping**: Crop videos to specific regions with precise control
|
|
869
|
+
- 📦 **Video Compression**: Optimize video file sizes with quality presets and custom bitrate
|
|
870
|
+
- 📝 **Text Overlays**: Add text/subtitles to videos with 7 position options and time-based visibility
|
|
871
|
+
- 🌅 **Fade Effects**: Add fade in/out transitions at video start/end
|
|
872
|
+
- ⏪ **Reverse Playback**: Reverse video and audio playback
|
|
873
|
+
- 🔁 **Video Loops**: Create seamless video loops
|
|
874
|
+
- ⚡ **Batch Processing**: Process multiple videos with different operations
|
|
875
|
+
- 🎬 **Scene Detection**: Automatically detect scene changes with configurable threshold
|
|
876
|
+
- 📹 **Video Stabilization**: Reduce camera shake and stabilize shaky footage
|
|
877
|
+
- 🎨 **Color Correction**: Professional color grading (brightness, contrast, saturation, hue, temperature)
|
|
878
|
+
- 📺 **Picture-in-Picture**: Add overlay videos with position, size, and opacity control
|
|
879
|
+
- 🖼️ **Split Screen**: Create side-by-side, top-bottom, or grid layouts with multiple videos
|
|
880
|
+
- ⏱️ **Time-lapse Creation**: Speed up videos to create time-lapse effects
|
|
881
|
+
- 🔇 **Audio Control**: Mute videos or adjust audio volume
|
|
882
|
+
- 🔍 **Format Detection**: Analyze video codec, container, and properties
|
|
883
|
+
|
|
884
|
+
#### Enhanced Video Methods
|
|
885
|
+
- ✅ **Smart Audio Detection**: Automatically detects if videos have audio streams
|
|
886
|
+
- ✅ **Unified API**: All video features accessible through single `createVideo()` method
|
|
887
|
+
- ✅ **Better Error Handling**: Clear error messages with FFmpeg installation guides
|
|
888
|
+
- ✅ **Resource Management**: Automatic cleanup of temporary files
|
|
889
|
+
|
|
890
|
+
### 🎉 v5.0.0 - Major Feature Release
|
|
834
891
|
|
|
835
892
|
#### Background Enhancements
|
|
836
893
|
- ✨ **Video Backgrounds**: Use video frames as dynamic backgrounds
|