1.0.14 • Published 11 months ago

pictures-operator v1.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
11 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

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.11

12 months ago

1.0.10

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago