image

Comprehensive image processing utilities for client-side image manipulation, including resize, crop, rotate, flip, filters, and format conversion.

Functions

Function
Description
Example

resize

Resize image to dimensions

dphelper.image.resize(img, 100, 100)

crop

Crop image to region

dphelper.image.crop(img, { x: 0, y: 0, width: 100, height: 100 })

toDataURL

Convert to data URL

dphelper.image.toDataURL(img, 'image/webp', 0.8)

fromDataURL

Create image from data URL

dphelper.image.fromDataURL(dataUrl)

filter

Apply CSS filters

dphelper.image.filter(img, { brightness: 1.2, contrast: 1.1 })

rotate

Rotate image by degrees

dphelper.image.rotate(img, 90)

flip

Flip horizontally/vertically

dphelper.image.flip(img, 'horizontal')

grayscale

Convert to grayscale

dphelper.image.grayscale(img)

blur

Apply blur effect

dphelper.image.blur(img, 5)

getDimensions

Get image dimensions

dphelper.image.getDimensions(img)

load

Load image from URL

dphelper.image.load('image.jpg')

composite

Composite two images

dphelper.image.composite(img1, img2, 'multiply')

Description

Powerful client-side image processing module providing:

  • Resize & Crop - Precise dimension control with quality options

  • Rotation & Flipping - Rotate by degrees, flip horizontally or vertically

  • Filters - Brightness, contrast, saturation, hue, blur, sepia, and more

  • Format Conversion - Convert between PNG, JPEG, WebP with quality control

  • Compositing - Blend multiple images with different blend modes

  • Canvas-based - All operations use HTML5 Canvas for performance

Usage Examples

Loading Images

Resize & Crop

Rotation & Flipping

Applying Filters

Format Conversion

Image Compositing

Advanced Usage

Thumbnail Generator

Image Editor

Profile Picture Processor

Details

  • Author: Dario Passariello

  • Version: 0.0.1

  • Creation Date: 20260313

  • Last Modified: 20260313

  • Environment: Client-side only (browser)


Automatically generated document

Last updated