1.1.0 • Published 9 months ago

image-joiner v1.1.0

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

image-joiner 🖼️

Fast and Easy node.js Image join Tool.

Install

pnpm add sharp image-joiner

Features

  • Based on grid layout
  • Easy and fast ⚡

Usage

import { GridImageJoiner } from 'image-joiner'

const joiner = new GridImageJoiner(2, 2)

joiner.loadImageFromLocal("./image.jpg", {
  row: 0,
  col: 0,
})

joiner.loadImageFromLocal("./image.jpg", {
  row: 1,
  col: 1,
})

joiner
  .draw({
    background_color: { r: 0, g: 122, b: 40, alpha: 0.2},
  })
  .then((image) => image.toFormat('png').toFile('output.png'))

Load image from an existing image object

joiner.loadImageFromObj(image, options)

Draw Options

export type DrawOptions = {
  resize?: {
    width: number;
    height: number;
  };
  row_gap?: number;
  col_gap?: number;
  background_color?: Color;
}

npm.io

1.1.0

9 months ago

1.0.1

9 months ago

1.0.1-alpha.2

9 months ago

1.0.1-alpha.1

9 months ago

1.0.1-alpha.0

9 months ago