New: Introducing PHP and Composer Support.Read the Announcement →
Socket
Book a DemoInstallSign in
Socket

apexify.js

Package Overview
Dependencies
Maintainers
1
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apexify.js

šŸŽØ Advanced Canvas Rendering Library - Professional image processing, shape drawing, text effects, patterns, filters, and charts. Built with TypeScript & Rust for high performance.

latest
Source
npmnpm
Version
5.2.91
Version published
Weekly downloads
256
282.09%
Maintainers
1
Weekly downloads
Ā 
Created
Source

šŸŽØ Apexify.js - The Ultimate Canvas & Image Processing Library

Apexify.js Banner

šŸš€ One Library. Infinite Possibilities. Professional Results.

npm version npm downloads TypeScript Node.js License

The most powerful, all-in-one canvas rendering and image processing library for Node.js

šŸš€ Now Even More Advanced: Full Canvas API Compatibility + Advanced Extensions

šŸ† Why Apexify.js is Better Than Everything Else

The Only Library That Does It All

While other libraries force you to install multiple packages for different tasks, Apexify.js gives you everything in one place:

FeatureApexify.jsOther Libraries
Canvas Renderingāœ… Built-ināŒ Separate library needed
Image Processingāœ… Built-ināŒ Requires Sharp/Jimp
Video Processingāœ… Built-in (33+ features)āŒ Requires FFmpeg wrapper
Chart Generationāœ… Built-in (6 chart types)āŒ Requires Chart.js/Recharts
GIF Creationāœ… Built-ināŒ Separate library needed
Text Renderingāœ… Advanced (gradients, paths, effects)āŒ Basic only
Shape Drawingāœ… Complex shapes (heart, star, custom)āŒ Basic shapes only
Batch Processingāœ… Built-ināŒ Manual implementation
Text Metrics APIāœ… Advanced (Canvas API + extensions)āŒ Not available
Pixel Data APIāœ… Advanced (get/set/manipulate)āŒ Not available
Path2D APIāœ… Advanced (full Canvas compatibility)āš ļø Basic only
Hit Detectionāœ… Advanced (multi-region, custom)āŒ Not available
TypeScript Supportāœ… Full type safetyāš ļø Partial or none
Performanceāœ… Rust-powered (@napi-rs)āš ļø JavaScript-only

Why Developers Choose Apexify.js

āœ… Zero Configuration - Works out of the box, no complex setup
āœ… TypeScript First - Complete type definitions for everything
āœ… Rust-Powered Performance - Built on @napi-rs/canvas for blazing speed
āœ… Modular Architecture - Clean, maintainable codebase
āœ… Comprehensive Features - 200+ methods covering every use case
āœ… Canvas API Compatible - Full Canvas API support with advanced extensions
āœ… Advanced APIs - Text Metrics, Pixel Data, Path2D, Hit Detection
āœ… Active Development - Regular updates with new features
āœ… Production Ready - Used in production by thousands of projects

šŸŽÆ Where Apexify.js Shines

Perfect For:

  • šŸš€ Next.js Applications - Server-side image generation, API routes, ISR
  • šŸ¤– Discord Bots - Welcome cards, level-up graphics, profile images
  • šŸ›’ E-commerce - Product image generation, banners, marketing materials
  • šŸ“± Social Media - Profile pictures, cover images, post graphics
  • šŸŽ® Gaming - Game assets, UI elements, character cards
  • šŸ’¼ Business - Business cards, certificates, professional documents
  • šŸŽØ Design Tools - Build Photoshop-like applications
  • šŸ“Š Data Visualization - Charts, graphs, infographics
  • šŸŽ¬ Video Editing - Thumbnails, previews, effects, transitions
  • šŸ”„ Automation - Batch processing, thumbnail generation, asset creation

✨ Complete Feature List

šŸŽØ Canvas & Backgrounds

FeatureDescription
Solid ColorsCustom background colors with opacity control
GradientsLinear, radial, and conic gradients with custom stops
Image BackgroundsCustom images with filters, opacity, and positioning
Video BackgroundsExtract frames from videos as backgrounds
PatternsProfessional pattern overlays (dots, lines, grids, custom)
Noise EffectsAdd texture and grain to backgrounds
Zoom EffectsApply zoom transformations to backgrounds

šŸ–¼ļø Image Processing

FeatureDescription
Image DrawingDraw images with positioning, scaling, rotation
Image FiltersBlur, sharpen, brightness, contrast, saturation
Color FiltersGrayscale, sepia, invert, custom color adjustments
Professional FiltersVintage, cinematic, black & white, custom presets
Image EffectsVignette, lens flare, chromatic aberration, film grain
Image MaskingAlpha, luminance, and inverse masking modes
Image DistortionPerspective, bulge/pinch, mesh warping
Image CroppingInner and outer cropping with precise control
Image ResizingSmart resizing with aspect ratio preservation
Background RemovalAI-powered background removal
Color DetectionExtract dominant colors from images
Color RemovalRemove specific colors from images
Image RotationRotate images with custom angles
Image Blending15+ blend modes (multiply, screen, overlay, etc.)
Image StitchingStitch multiple images together (horizontal, vertical, grid)
Image CollageCreate collages with grid, masonry, carousel layouts
Image CompressionCompress images (JPEG, WebP, AVIF) with quality control
Color Palette ExtractionExtract color palettes using k-means, median-cut, octree

šŸ“ Text Rendering

FeatureDescription
Basic TextSimple text rendering with fonts and colors
Enhanced TextAdvanced text with shadows, strokes, glows
Text GradientsGradient text fills (linear, radial, conic)
Text on PathsRender text along curves, arcs, and bezier paths
Custom FontsLoad custom fonts (.ttf, .otf, .woff)
Text DecorationsBold, italic, underline, strikethrough
Text EffectsShadows, strokes, glows, outlines
Text AlignmentLeft, center, right, justify alignment
Text WrappingAutomatic text wrapping with custom widths
Text RotationRotate text at any angle
Text SpacingLetter spacing and line height control
Text Metrics APIAdvanced text measurement (Canvas API + extensions)
Character MetricsPer-character width and position metrics
Multi-line MetricsLine-by-line text metrics for wrapped text

šŸ”· Shape Drawing

FeatureDescription
Basic ShapesRectangle, circle, ellipse, line, polygon
Complex ShapesHeart, star, custom path shapes
Shape FillsSolid colors, gradients, patterns, images
Shape StrokesCustom stroke width, color, style (solid, dashed, dotted)
Shape ShadowsDrop shadows with blur, offset, color
Shape RotationRotate shapes with custom angles
Shape ScalingScale shapes with custom factors
Advanced StrokesGroove, ridge, double, inset, outset styles
Arc & PieSliceDraw arcs and pie slice sectors with custom angles
Path2D APIAdvanced path creation and manipulation
Hit DetectionPoint-in-shape detection with custom regions

šŸ“Š Chart Generation

FeatureDescription
Pie ChartsStandard and donut pie charts with gradients
Bar ChartsStandard, grouped, stacked, waterfall, lollipop charts
Horizontal Bar ChartsAll bar chart types in horizontal orientation
Line ChartsMulti-series line charts with gradients
Comparison ChartsSide-by-side comparison of any two chart types
Chart CustomizationGradients, custom fonts, legends, labels, titles
Data VisualizationProfessional charts for data presentation

šŸŽ¬ Video Processing (33+ Features)

FeatureDescription
Video InfoExtract video metadata (duration, resolution, FPS, bitrate)
Frame ExtractionExtract single or multiple frames at specific times
Video ThumbnailsGenerate thumbnail grids from videos
Video ConversionConvert between formats (MP4, WebM, AVI, MOV, MKV)
Video TrimmingTrim videos to specific time ranges
Audio ExtractionExtract audio tracks from videos
Video WatermarkingAdd image or text watermarks to videos
Speed ControlChange video playback speed (slow motion, time-lapse)
Video EffectsApply filters (blur, brightness, contrast, saturation)
Video MergingMerge multiple videos (sequential, side-by-side, grid)
Segment ReplacementReplace video segments with other videos or frames
Video RotationRotate videos (90°, 180°, 270°)
Video CroppingCrop videos to specific regions
Video CompressionCompress videos with quality presets
Text OverlaysAdd text/subtitles to videos with positioning
Fade EffectsAdd fade in/out transitions
Reverse PlaybackReverse video and audio
Video LoopsCreate seamless video loops
Batch ProcessingProcess multiple videos in parallel
Scene DetectionDetect scene changes in videos
Video StabilizationReduce camera shake and stabilize footage
Color CorrectionProfessional color grading (brightness, contrast, saturation, hue)
Picture-in-PictureAdd overlay videos with positioning
Split ScreenCreate multi-video layouts (side-by-side, grid)
Time-lapse CreationSpeed up videos to create time-lapses
Audio ControlMute, adjust volume, normalize audio levels
Format DetectionAnalyze video properties and formats
Freeze FrameHold a frame for dramatic effect
Export PresetsPlatform-optimized presets (YouTube, Instagram, TikTok, etc.)
Progress TrackingReal-time progress callbacks for all operations
Audio NormalizationProfessional audio leveling (LUFS, Peak, RMS)
LUT SupportApply Look-Up Tables for cinematic color grading
Video Transitions9 transition types (fade, wipe, slide, zoom, rotate, etc.)
Animated Text8 animation types (fadeIn, slideIn, zoom, bounce, typewriter, etc.)
Frame-to-VideoCompile edited frames/images into videos

šŸŽžļø GIF Creation

FeatureDescription
GIF GenerationCreate animated GIFs from image sequences
Frame ManagementAdd frames with custom durations
GIF WatermarkingAdd watermarks to GIFs
Text OverlaysAdd text to GIF frames
Output FormatsFile, buffer, base64, attachment output
Quality ControlAdjust GIF quality and optimization

šŸ”¬ Advanced APIs ⭐ NEW!

FeatureDescription
Text Metrics APIComplete text measurement matching Canvas API + extensions
Pixel Data APIDirect pixel manipulation (get/set/manipulate pixels)
Pixel FiltersBuilt-in filters (grayscale, invert, sepia, brightness, contrast)
Custom Pixel ProcessorsCustom functions for pixel-level processing
Path2D APIAdvanced path creation with commands (moveTo, lineTo, arc, bezier, etc.)
Path DrawingDraw paths with stroke, fill, and transform options
Hit DetectionPoint-in-path and point-in-region detection
Custom RegionsRectangle, circle, ellipse, polygon, path, and custom function regions
Multi-Region DetectionTest points against multiple regions simultaneously
Distance CalculationCalculate distances from points to region edges

šŸ› ļø Utilities & Tools

FeatureDescription
Batch OperationsProcess multiple operations in parallel
Chain OperationsChain operations sequentially
Format ConversionConvert between PNG, JPEG, WebP, AVIF, SVG
Smart SavingSave with timestamps, counters, custom naming
Multiple FormatsExport to PNG, JPEG, WebP, AVIF, GIF
Custom LinesAdvanced line drawing with arrows, markers, patterns
Smooth PathsCreate smooth curves with tension control
Catmull-Rom SplinesProfessional curve interpolation

šŸš€ Quick Start

npm install apexify.js
import { ApexPainter } from 'apexify.js';

const painter = new ApexPainter();

// Create a canvas
  const canvas = await painter.createCanvas({
    width: 1200,
    height: 630,
    gradientBg: {
      type: 'linear',
      colors: [
        { stop: 0, color: '#667EEA' },
        { stop: 1, color: '#764BA2' }
      ]
    }
  });
  
// Add text
const text = await painter.createText({
  text: 'Hello, World!',
    x: 600,
    y: 315,
  fontSize: 48,
    color: '#FFFFFF',
  fontFamily: 'Arial'
}, canvas);

// Add image
const image = await painter.createImage({
  source: 'path/to/image.png',
  x: 100,
  y: 100,
  width: 200,
  height: 200
  }, canvas);

// Advanced: Text Metrics API
const metrics = await painter.measureText({
  text: 'Hello, World!',
  fontSize: 48,
  fontFamily: 'Arial',
  includeCharMetrics: true
});
console.log(`Text width: ${metrics.width}px`);

// Advanced: Pixel Data API
const pixelData = await painter.getPixelData(image.buffer, {
  x: 0, y: 0, width: 100, height: 100
});
const processed = await painter.manipulatePixels(image.buffer, {
  filter: 'grayscale',
  intensity: 1.0
});

// Advanced: Path2D API
const path = painter.createPath2D([
  { type: 'moveTo', x: 0, y: 0 },
  { type: 'lineTo', x: 100, y: 100 },
  { type: 'arc', x: 150, y: 150, radius: 50, startAngle: 0, endAngle: Math.PI }
]);
await painter.drawPath(canvas.buffer, path, {
  stroke: { color: '#ff0000', width: 2 },
  fill: { color: '#00ff00', opacity: 0.5 }
});

// Advanced: Hit Detection API
const hitResult = await painter.isPointInRegion({
  type: 'circle',
  x: 100, y: 100, radius: 50
}, 120, 120);
console.log(`Point hit: ${hitResult.hit}`);
  
// Save result
await painter.save(image, { 
  path: './output.png',
  format: 'png'
});

šŸ“¦ Installation

npm install apexify.js
# or
yarn add apexify.js
# or
pnpm add apexify.js

Requirements:

  • Node.js 16+
  • TypeScript 5+ (optional but recommended)

šŸŽÆ Use Cases

Next.js Applications

Generate images in API routes, server actions, and edge functions. Perfect for dynamic OG images, social media previews, and on-demand image generation.

Discord Bots

Create stunning welcome cards, level-up graphics, profile images, and leaderboards. All with a simple API.

E-commerce Platforms

Generate product images, banners, marketing materials, and promotional graphics automatically.

Social Media Tools

Create profile pictures, cover images, post graphics, and story templates programmatically.

Design Tools

Build Photoshop-like applications with code export capabilities and professional image processing.

Data Visualization

Generate charts, graphs, and infographics for reports, dashboards, and presentations.

Video Production

Create thumbnails, previews, apply effects, transitions, and process videos at scale.

šŸ”„ Performance

  • Rust-Powered: Built on @napi-rs/canvas for native performance
  • Optimized Algorithms: Efficient image processing and rendering
  • Batch Processing: Process multiple operations in parallel
  • Memory Efficient: Smart resource management and cleanup
  • Canvas API Native: Direct access to Canvas APIs for maximum performance

šŸ“š Documentation

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

šŸ“„ License

MIT License - see LICENSE file for details.

⭐ Star History

If you find Apexify.js useful, please consider giving it a star on GitHub!

Made with ā¤ļø by the Apexify.js community

Documentation • GitHub • npm • Report Bug

Keywords

canvas

FAQs

Package last updated on 29 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts