# @idot-digital/image-convert-lib

> Libary for image converion with iDot apis!

Latest version **1.2.6** (published 2023-05-04) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @idot-digital/image-convert-lib
pnpm add @idot-digital/image-convert-lib
yarn add @idot-digital/image-convert-lib
bun add @idot-digital/image-convert-lib
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2023-05-04 |
| First published | 2021-03-25 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 17.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | idotdigital |
| Maintainers | der-grosse, luiskugel |

## Links

- npm: https://www.npmjs.com/package/@idot-digital/image-convert-lib
- npm.io page: https://npm.io/package/@idot-digital/image-convert-lib

## Dependencies (2)

- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Recent versions

- 1.2.6 (latest) — 2023-05-04
- 1.2.5 — 2021-09-16
- 1.2.4 — 2021-09-16
- 1.2.3 — 2021-09-16
- 1.2.2 — 2021-09-16
- 1.2.1 — 2021-09-16
- 1.2.0 — 2021-09-16
- 1.1.0 — 2021-07-17
- 1.0.2 — 2021-03-25
- 1.0.1 — 2021-03-25
- 1.0.0 — 2021-03-25

## README

## Image Conversion Library

Mit dieser Library kann man Bilder komprimieren, skallieren und in neue Formate umwandeln.

Supportete Input Formate:

1. JPG/JPEG
2. PNG
3. TIFF
4. WEBP
5. GIF

Supportete Output Formate:

1. JPG/JPEG
2. WEBP
3. JP2

---

Benutzung
Zur Benutzung wird ein APIKey benötigt, bitte wenden Sie sich hierzu an die Geschäftsführung von iDot digital.

```
const IMAGE = await fs.readFile("./image.png");

const ic = new ImageConverter("putAPIKeyHere");

const CONPRESSED_IMAGE = await ic.imgToWEBP(JPEG, 1000);

await fs.writeFile("./image.webp", CONPRESSED_IMAGE);
```

Es stehen follgende Funktionen zur Verfügung:

1. `imgToWEBP(buffer, width)`
2. `imgToJPG(buffer, width)`
3. `pngToJPG(buffer, width)`
4. `imgToJP2(buffer, width, convertioApiKey)`

pngToJPG(buffer, width) ist dabei bei PNG Bildern vorzuziehen, da es kleinere Dateien generiert.

Bei imgToJP2() wird der Service Convertio genutzt wird, daher muss ein [zusätzlicher ApiKey](https://developers.convertio.co/) angegeben werden.

---
_Source: https://npm.io/package/@idot-digital/image-convert-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
