# image-scramble

> Image Scramble with Seed

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

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2015-11-08 |
| First published | 2015-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 26 |
| Author | Andre Caetano |
| Maintainers | webcaetano |
| Keywords | scramble, image, scramble, image, image, shuffle, shuffle, safety, safety, image, protect |

## Links

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

## Dependencies (4)

- [jimp](https://npm.io/package/jimp.md) git://github.com/webcaetano/jimp.git#4b3944c6f15cd4f0c7e9f6eb09df9ee0d7275a52
- [async](https://npm.io/package/async.md) ^1.5.0
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [shuffle-seed](https://npm.io/package/shuffle-seed.md) ^1.1.5

## 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

- 2.2.2 (latest) — 2015-11-08
- 2.2.1 — 2015-11-07
- 2.2.0 — 2015-11-07
- 2.0.4 — 2015-11-02
- 2.0.3 — 2015-10-31
- 2.0.2 — 2015-10-31
- 2.0.0 — 2015-10-31
- 1.0.3 — 2015-10-31
- 1.0.2 — 2015-10-31
- 1.0.1 — 2015-10-31
- 0.0.1 — 2015-10-29

## README

# Image-scramble

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


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('image-scramble');


imgScramble({
	image:'test/sample2.png', // source
	seed:'Kappa', // seed
	sliceSize:5, // slice size
	dest:'test/sample2_crop.png' // dest
},function(err){
	
})
```

## Options

#### image
- Path to image source Or Valid Buffer

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

#### sliceSize
- size of each slice

#### dest
- Destination of scrambled image

#### buffer <optional>
- Return image as buffer

### Installation 

```
npm install 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);
```

## Gulp plugin

[gulp-image-scramble](https://github.com/webcaetano/gulp-image-scramble)

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