# flip-pixels

> Flip pixel data after readPixels

Latest version **1.0.2** (published 2018-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install flip-pixels
pnpm add flip-pixels
yarn add flip-pixels
bun add flip-pixels
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-10-23 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | dy |
| Maintainers | dfcreative, dy |
| Keywords | readPixels, webgl, gl, stackgl, pixels |

## Links

- npm: https://www.npmjs.com/package/flip-pixels
- Repository: https://github.com/dy/flip-pixels
- Homepage: https://github.com/dy/flip-pixels#readme
- Issues: https://github.com/dy/flip-pixels/issues
- npm.io page: https://npm.io/package/flip-pixels

## Recent versions

- 1.0.2 (latest) — 2018-10-23
- 1.0.1 — 2018-09-24
- 1.0.0 — 2018-09-24

## README

[![Build Status](https://travis-ci.org/dy/flip-pixels.svg?branch=master)](https://travis-ci.org/dy/flip-pixels)

Flip pixels after `gl.readTexture`:

```js
var flip = require('flip-pixels')

var w = gl.drawingBufferWidth;
var h = gl.drawingBufferHeight
var pixels = new Uint8Array(w * h * 4);
gl.readPixels(0, 0, w, h, gl.RGBA, gl.UNSIGNED_BYTE, pixels);

flip(pixels, w, h)
```

Based on [this question](https://stackoverflow.com/questions/41969562/how-can-i-flip-the-result-of-webglrenderingcontext-readpixels).

See also [clip-pixels](https://ghub.io/clip-pixels).

---
_Source: https://npm.io/package/flip-pixels · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
