# gulp-image-scramble

> Gulp module for image-scramble

Latest version **1.0.4** (published 2015-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-image-scramble
pnpm add gulp-image-scramble
yarn add gulp-image-scramble
bun add gulp-image-scramble
```

## 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.4 |
| Published | 2015-11-08 |
| First published | 2015-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Andre Caetano |
| Maintainers | webcaetano |
| Keywords | gulp, gulpjs, gulp-plugin, image, image-scramble, protection |

## Links

- npm: https://www.npmjs.com/package/gulp-image-scramble
- Repository: https://github.com/webcaetano/gulp-image-scramble
- Issues: https://github.com/webcaetano/gulp-image-scramble/issues
- npm.io page: https://npm.io/package/gulp-image-scramble

## Dependencies (2)

- [through2](https://npm.io/package/through2.md) ^2.0.0
- [image-scramble](https://npm.io/package/image-scramble.md) ^2.2.2

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2015-11-08
- 1.0.3 — 2015-11-08
- 1.0.2 — 2015-11-07
- 1.0.1 — 2015-11-02
- 1.0.0 — 2015-11-02

## README

# Gulp Image Scramble

GulpJS module for image-scramble with seed

[![npm version](https://img.shields.io/npm/v/gulp-image-scramble.svg?style=flat-square)](https://www.npmjs.com/package/gulp-image-scramble) 
[![Build Status](https://img.shields.io/travis/webcaetano/gulp-image-scramble.svg?style=flat-square)](https://travis-ci.org/webcaetano/gulp-image-scramble) 
[![npm donwloads](https://img.shields.io/npm/dt/gulp-image-scramble.svg?style=flat-square)](https://www.npmjs.com/package/gulp-image-scramble) 

Scramble/Unscramble Images

Very useful for protect canvas spritesheets.

### Example

#### Scramble (Server-Side)
![](http://i.imgur.com/4oReaij.png)

#### Unscramble (Client-Side)
![](http://i.imgur.com/AwfN1Gq.png)

### Usage Example

```javascript
var imgScramble = require('gulp-image-scramble');

gulp.src(mainFile)
.pipe(imgScramble({
	seed:'Kappa',
	sliceSize:5
}))
.pipe(gulp.dest('./dist'))
```

## Options

#### seed
- Seed to shuffle in same sequence

#### sliceSize
- size of each slice

### Installation 

```
npm install gulp-image-scramble
```


## UnsrcambleImg (Client-Side)

#### Installation
```
bower install unscramble-img
```

#### Usage 

```javascript
// unscrambleImg(src,sliceSize,seed)

var canvas = unscrambleImg(img,sliceSize,'Kappa');
```

#### Phaser Example

```javascript
var bmp = unscrambleImg(img,sliceSize,'Kappa',game.add.bitmapData(img.width,img.height));
var sprite = game.add.sprite(0, 0, bmp);
```

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