1.4.0 • Published 1 year ago

html-load-image v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

HTML Load Image Package

Overview

This package is to get the image files as dataURLs from Event or DragEvent. It's using blueimp-load-image package as a dependency.

Install

yarn add html-load-image

Definitions

type getImage = (event: Event, options?: LoadImageOptions) => Promise<string>

type getImages = (event: Event, options?: LoadImagesOptions) => Promise<string[]>

type LoadImageOptions = Omit<BlueImpLoadImageOptions, 'orientation' | 'meta' | 'canvas'>

interface LoadImagesOptions extends LoadImageOptions {
  maxLoadImageCount: number
}

Usage

const image = await getImage(event)
const images = await getImages(event, { maxLoadImageCount: 5 })
1.3.7

1 year ago

1.3.5

2 years ago

1.4.0

1 year ago

1.3.9

1 year ago

1.3.8

1 year ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago