tom-weatherhead/thaw-image-processing.ts

View on GitHub
README.md

Summary

Maintainability
Test Coverage
# thaw-image-processing.ts
Raster image processing functions implemented in TypeScript

Obligatory BadgeFest:

[![build status][build-status-badge-image]][build-status-url]
[![npm version][npm-version-badge-image]][npm-version-url]
[![latest tag][latest-tag-badge-image]][latest-tag-url]
[![npm total downloads][npm-total-downloads-badge-image]][npm-total-downloads-url]
[![watchers][watchers-badge-image]][watchers-url]
[![stars][stars-badge-image]][stars-url]
[![forks][forks-badge-image]][forks-url]
[![repo dependents][repo-dependents-badge-image]][repo-dependents-url]
[![pkg dependents][pkg-dependents-badge-image]][pkg-dependents-url]
[![commits][commits-badge-image]][commits-url]
[![last commit][last-commit-badge-image]][last-commit-url]
[![types][types-badge-image]][types-url]
[![install size][install-size-badge-image]][install-size-url]
[![known vulnerabilities][known-vulnerabilities-badge-image]][known-vulnerabilities-url]
[![lines of code][lines-of-code-badge-image]][lines-of-code-url]
[![technical debt][technical-debt-badge-image]][technical-debt-url]
[![maintainability][maintainability-badge-image]][maintainability-url]
[![test coverage][test-coverage-badge-image]][test-coverage-url]
[![tested with jest][jest-badge-image]][jest-url]
[![code style: prettier][prettier-badge-image]][prettier-url]
[![license][license-badge-image]][license-url]
[![FOSSA Status][fossa-badge-image]][fossa-badge-url]

## Features

- Written in pure TypeScript

## Installation
To install the stable version:
```
npm install --save thaw-image-processing.ts
```

## API Information

```
interface IThAWImage extends ImageData { ... }

function createThAWImage(
    width: number,
    height: number,
    bytesPerPixel?: number,
    bytesPerLine?: number,
    data?: Uint8ClampedArray
): IThAWImage { ... }
```

- compositeImageFromBuffers()
- convolveImageFromBuffer()
- desaturateRGBA() (via mapColoursInImageFromBuffer())
- flipImage() (via doAffineTransformation())
- gaussianBlurImage()
- mapColoursInImageFromBuffer()
- mirrorImage() (via doAffineTransformation())
- pixelateImage()
- resampleImage() (nearest neighbour, bilinear, and bicubic)
- rotate180DegreesFromImage()
- rotate90DegreesClockwiseFromImage()
- rotate90DegreesCounterclockwiseFromImage()

## License
[MIT](https://choosealicense.com/licenses/mit/)

[build-status-badge-image]: https://secure.travis-ci.org/tom-weatherhead/thaw-image-processing.ts.svg
[build-status-url]: https://travis-ci.org/tom-weatherhead/thaw-image-processing.ts
[npm-version-badge-image]: https://img.shields.io/npm/v/thaw-image-processing.ts.svg
[npm-version-url]: https://www.npmjs.com/package/thaw-image-processing.ts
[latest-tag-badge-image]: https://badgen.net/github/tag/tom-weatherhead/thaw-image-processing.ts
[latest-tag-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/tags
[npm-total-downloads-badge-image]: https://img.shields.io/npm/dt/thaw-image-processing.ts.svg
[npm-total-downloads-url]: https://www.npmjs.com/package/thaw-image-processing.ts
[watchers-badge-image]: https://badgen.net/github/watchers/tom-weatherhead/thaw-image-processing.ts
[watchers-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/watchers
[stars-badge-image]: https://badgen.net/github/stars/tom-weatherhead/thaw-image-processing.ts
[stars-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/stargazers
[forks-badge-image]: https://badgen.net/github/forks/tom-weatherhead/thaw-image-processing.ts
[forks-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/network/members
[repo-dependents-badge-image]: https://badgen.net/github/dependents-repo/tom-weatherhead/thaw-image-processing.ts
[repo-dependents-url]: https://badgen.net/github/dependents-repo/tom-weatherhead/thaw-image-processing.ts
[pkg-dependents-badge-image]: https://badgen.net/github/dependents-pkg/tom-weatherhead/thaw-image-processing.ts
[pkg-dependents-url]: https://badgen.net/github/dependents-pkg/tom-weatherhead/thaw-image-processing.ts
[commits-badge-image]: https://badgen.net/github/commits/tom-weatherhead/thaw-image-processing.ts
[commits-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/commits/master
[last-commit-badge-image]: https://badgen.net/github/last-commit/tom-weatherhead/thaw-image-processing.ts
[last-commit-url]: https://badgen.net/github/last-commit/tom-weatherhead/thaw-image-processing.ts
[types-badge-image]: https://badgen.net/npm/types/thaw-image-processing.ts
[types-url]: https://badgen.net/npm/types/thaw-image-processing.ts
[install-size-badge-image]: https://badgen.net/packagephobia/install/thaw-image-processing.ts
[install-size-url]: https://badgen.net/packagephobia/install/thaw-image-processing.ts
[known-vulnerabilities-badge-image]: https://snyk.io/test/github/tom-weatherhead/thaw-image-processing.ts/badge.svg?targetFile=package.json&package-lock.json
[known-vulnerabilities-url]: https://snyk.io/test/github/tom-weatherhead/thaw-image-processing.ts?targetFile=package.json&package-lock.json
[lines-of-code-badge-image]: https://badgen.net/codeclimate/loc/tom-weatherhead/thaw-image-processing.ts
[lines-of-code-url]: https://badgen.net/codeclimate/loc/tom-weatherhead/thaw-image-processing.ts
[technical-debt-badge-image]: https://badgen.net/codeclimate/tech-debt/tom-weatherhead/thaw-image-processing.ts
[technical-debt-url]: https://badgen.net/codeclimate/tech-debt/tom-weatherhead/thaw-image-processing.ts
[maintainability-badge-image]: https://api.codeclimate.com/v1/badges/954852bbd1cf2ad3c055/maintainability
[maintainability-url]: https://codeclimate.com/github/tom-weatherhead/thaw-image-processing.ts/maintainability
[test-coverage-badge-image]: https://api.codeclimate.com/v1/badges/954852bbd1cf2ad3c055/test_coverage
[test-coverage-url]: https://codeclimate.com/github/tom-weatherhead/thaw-image-processing.ts/test_coverage
[jest-badge-image]: https://img.shields.io/badge/tested_with-jest-99424f.svg
[jest-url]: https://github.com/facebook/jest
[prettier-badge-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
[prettier-url]: https://github.com/prettier/prettier
[license-badge-image]: https://img.shields.io/github/license/mashape/apistatus.svg
[license-url]: https://github.com/tom-weatherhead/thaw-image-processing.ts/blob/master/LICENSE
[fossa-badge-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftom%2Dweatherhead%2Fthaw%2Dimage%2Dprocessing.ts.svg?type=shield
[fossa-badge-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Ftom%2Dweatherhead%2Fthaw%2Dimage%2Dprocessing.ts?ref=badge_shield