0.0.1-alpha.3 • Published 8 months ago

image-stylize v0.0.1-alpha.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Image Stylize

Image Stylize Library is a JavaScript/TypeScript library for image processing and filter effects.

Features

  • Apply various image filters.
    • Gaussian Blur
  • Convert images to black and white.
  • Simulate the Leica camera filter effect.
  • Convert image to text drawing
  • Convert Image to Pixel Art Style
  • Convert Image to Oil Painting Style

Installation

You can install My Custom Library using npm:

npm install image-stylize

Usage

Importing the library

import { Stylize } from 'image-stylize';
const stylize = new Stylize({
      width: 800,
      height: 800,
      container: canvasContainerRef.value,
    });

Applying Filters

Black and White Filter

 stylize.draw({
      type: 'grayscale',
      data: {
        url: '/src/assets/a.jpg',
        radius:10,
      },
    });

Alt text

Gaussian Blur Filter

 stylize.draw({
      type: 'grayscale',
      data: {
        url: '/src/assets/a.jpg',
        radius:10,
      },
    });

Alt text

Leica Camera Filter

 stylize.draw({
      type: 'leca',
      data: {
        url: '/src/assets/a.jpg',
      },
    });

Alt text

Convert image to text drawing

 stylize.draw({
      type: 'texty',
      data: {
        url: '/src/assets/a.jpg',
        text: '@#$%&*-=:. ',
        orderly: false,
        scale: 10,
      },
    });

Alt text

Convert Image to Pixel Art Style

 stylize.draw({
      type: "pixel",
      data: {
        url: "/src/assets/a.jpg",
        avarage: 10,
      },
    });

Convert Image to Oil Painting Style

Alt text

 stylize.draw({
      type: "oil",
      data: {
        url: "/src/assets/a.jpg",
        radius: 4,
        intensity: 255,
      },
    });

Alt text

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

End

More effects are constantly being updated.