open-index/open-npm huggingface dataset:
npm package: @image-intelligence/api-specification
Description: Swagger spec for the Image Intelligence API
Latest version: 2.6.1

# api-specifications

**Welcome to API Specifications!**

This project contains [OpenAPI](https://www.openapis.org/) specifications for the Image Intelligence API. There are currently two versions of our API ([api-v1.json](./v1/api.json) and [v2/Api.js](./v2/Api.js)). Note that V1 will be marked for deprecation soon after the release of V2. If you've just started out, please build against V2.

## Installation & Usage

```bash
npm install @image-intelligence/api-specification
```

```js
import ApiSpec from '@image-intelligence/api-specification';

console.log(ApiSpec.v1);
console.log(ApiSpec.v2);

console.log(JSON.stringify(ApiSpec.v2, null, 2));
```

## Development & Swagger

```bash
git clone git@github.com:ImageIntelligence/api-specification.git
```

When you're making changes to the API specification, it is often useful to verify the schema is valid:

```bash
npm install -g swagger-cli
```

```bash
swagger-cli help
swagger-cli validate xxx.json
```

Our JSON schema is generated from JavaScript files. To generate the schema:

```bash
node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" | jq .
node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" >! schema.json
node -e "console.log(JSON.stringify(require('./index').v2, null, 2))" | pbcopy
```

When editing the schema, perhaps you want a preview of your changes. The [Swagger Editor](https://swagger.io/swagger-editor/) can be useful here.

**Not sure what Swagger or OpenAPI is?** Check out this [article](https://swagger.io/difference-between-swagger-and-openapi/).

## Deployment

To publish a new version of api-specifications, update `"version"` in `package.json` and then create a GitHub Release.
npm package: @image-intelligence/engine-api-specification
Description: API specification for Ava Engine
Latest version: 0.14.0

# engine-api-specification

This package contains the API specifications for Ava Engine. The specifications are generated from protobuf files which define the API and compiled into JSON format.

## Installation

```bash
npm install @image-intelligence/engine-api-specification
```

## Usage

Import the NPM package and reference the relevant version you're after.

```js
import ApiSpec from '@image-intelligence/engine-api-specification';

console.log('Versions:', Object.keys(ApiSpec));

console.log(JSON.stringify(ApiSpec['v1.0.0'], null, 2));
```

## Development

1. Clone project

```bash
git clone git@github.com:ImageIntelligence/ava-engine.git
```

2. Make edits to protobufs (`./protobuf`) as required

3. To test docs compilation, trigger build script from the root of the project. This will generate a JSON file in the `./docs/specs` directory.

Note: The version number used for the file name needs to be incremented manually for now. See `./docs/scripts/compile_docs.sh`

```bash
sh ./docs/scripts/build.sh
```

## Publishing

To publish, first commit the latest JSON file in the `./docs/specs` directory. This step is necessary so we can supply the relevant API specification corresponding to each Engine version we release.

Update `./docs/index.js` to include a reference to the latest version of the API spec.

Increment the version number in `./docs/package.json` then publish package as normal.

```bash
npm publish
```
npm package: @image-kit/core
Description: A lightweight and performant image processing wrapper for the browser.
Author: Sundar Shahi Thakuri
Latest version: 2.0.9



# @image-kit/core 🖼️

A lightweight and performant image processing wrapper for the browser. Built using native browser APIs like `Canvas`, `HTMLImageElement`, and `WebCodecs`, this library provides a powerful yet minimal interface to perform real-time image transformations such as resizing, format conversion, quality tuning, and more.

## ✨ Features

* 🪶 Minimal footprint
* 💨 Fast performance via native browser APIs
* 🧩 Chainable API for better readability
* 🎨 Resize, format, sharpen, compress, and transform with ease
* 🧪 Converts final result to Blob, Base64, or ImageBitmap

---

## 📦 Installation

```bash
npm install @image-kit/core
# or
yarn add @image-kit/core
# or
pnpm add @image-kit/core
```

---

## 🚀 Usage

```ts
import { image, thumbnail } from "@image-kit/core";

const src = "https://example.com/image.jpg";
const height = 200;
const aspectRatio = 16 / 9;

const transformedImage = image(`${src}?${Date.now()}`)
  .format("auto")
  .quality(1)
  .resize(thumbnail().height(height).aspectRatio(aspectRatio))
  .sharpen(1)
  .algorithm("multistep");

const blob = await transformedImage.toBlob();
```

---

## 🔧 API Reference

### `image(src: string)`

Initializes image processing with the provided image source.

### `.format(format: 'auto' | 'jpeg' | 'webp' | 'png')`

Automatically choose optimal format or specify it manually.

### `.quality(value: number)`

Set the image quality (0-1).

### `.resize(config: ResizeConfig)`

Resize the image using configuration (supports `width`, `height`, and `aspectRatio`).

### `.sharpen(value: number)`

Sharpens the image. `1` is typically a safe default.

### `.algorithm(name: 'default' | 'multistep')`

Chooses resizing algorithm.

### `.toBlob()`

Returns a `Blob` of the transformed image.

### `.toBase64()`

Returns a base64 data URL.

### `.toImageBitmap()`

Returns an `ImageBitmap`.

---

## 🧱 Resize Utilities

### `thumbnail()`

Returns a predefined `ResizeConfig` that simplifies resizing logic for thumbnails.

Example:

```ts
resize(thumbnail().height(300).aspectRatio(16 / 9))
```

---

## 🧪 Browser Support

| Feature     | Supported Browsers                 |
| ----------- | ---------------------------------- |
| Canvas      | ✅ Chrome, Firefox, Safari, Edge    |
| WebCodecs   | ✅ Chrome, Edge (Partial in Safari) |
| ImageBitmap | ✅ Most modern browsers             |

---

## 🧠 Philosophy

> Less dependency, more browser power. Use what the platform gives you. This library is for those who want fast, predictable image processing without third-party bloat.

---

## 🤝 Contributing

Pull requests and issues are welcome! Please open a discussion if you'd like to propose a significant feature or change.

```bash
git clone https://github.com/sundarshahi/image-kit-core.git
cd image-kit-core
npm install
```

---

## 📜 License

MIT © [Sundar Shahi Thakuri](https://sundarshahithakuri.com.np)