blurred-image-frame
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "blurred-image-frame", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Avoid cropping an image to fit a specific canvas size.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,23 @@ # Blurred Image Frame | ||
## Installation | ||
Install `blurred-image-frame` with npm: | ||
```bash | ||
npm install blurred-image-frame | ||
``` | ||
## Usage | ||
To utilize this function, it is essential to first import | ||
the [fill-image-blur](https://github.com/vascabarkapa/blurred-image-frame/blob/main/index.js) into your project. After importing, integrate the provided JavaScript code into your project. Call | ||
the `fillImageWithBlur` function by passing an event object `e` and the ID of the canvas element, `canvasId`. The | ||
function will take care of image processing, apply the blur effect, and facilitate the download of the seamlessly fitted | ||
image. | ||
```javascript | ||
<input type="file" onchange="fillImageWithBlur(event, 'yourCanvasId')"> | ||
<canvas hidden id="yourCanvasId" width="1024" height="576"></canvas> | ||
``` | ||
The following example shows the `fillImageWithBlur` function using two images to demonstrate the transformation before and after applying the function. | ||
## Function Overview | ||
@@ -81,17 +102,2 @@ | ||
## Usage | ||
To utilize this function, it is essential to first import | ||
the [fill-image-blur](https://github.com/vascabarkapa/blurred-image-frame/blob/main/index.js) into your project. After importing, integrate the provided JavaScript code into your project. Call | ||
the `fillImageWithBlur` function by passing an event object `e` and the ID of the canvas element, `canvasId`. The | ||
function will take care of image processing, apply the blur effect, and facilitate the download of the seamlessly fitted | ||
image. | ||
```javascript | ||
<input type="file" onchange="fillImageWithBlur(event, 'yourCanvasId')"> | ||
<canvas hidden id="yourCanvasId" width="1024" height="576"></canvas> | ||
``` | ||
The following example shows the `fillImageWithBlur` function using two images to demonstrate the transformation before and after applying the function. | ||
### Before | ||
@@ -98,0 +104,0 @@ |
9164
120