1.0.14 • Published 12 months ago

pictures-operator v1.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

PictureOperator

Overview

Module to encode, decode, and compress images in various formats directly in the browser using Web workers

How to use it

import { PictureFormat, PictureOperator } from 'pictures-operator';

const pictureOperator = new PictureOperator();

const result = await pictureOperator.process(file, {
  format: PictureFormat.webp, // webp, jpeg, png, avif,
  quality: 90, // quality 0-100
  resize: [720, 480] // width, height
});

// result is a Blob

Input formats are: jpeg, png, bmp, heif, heic, avif, webp.\ Output formats are: jpeg, png, avif, webp.

Known issues

  1. Vite
  • append in your defineConfig
  optimizeDeps: {
    exclude: ["pictures-operator"]
  },
1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago