pxls

WebJar for pxls

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

pxls
Последняя версия

Последняя версия

2.3.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

pxls
WebJar for pxls
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/dy/pxls

Скачать pxls

Имя Файла Размер
pxls-2.3.2.pom
pxls-2.3.2.jar 8 KB
pxls-2.3.2-sources.jar 22 bytes
pxls-2.3.2-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/pxls/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>pxls</artifactId>
    <version>2.3.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/pxls/
implementation 'org.webjars.npm:pxls:2.3.2'
// https://jarcasting.com/artifacts/org.webjars.npm/pxls/
implementation ("org.webjars.npm:pxls:2.3.2")
'org.webjars.npm:pxls:jar:2.3.2'
<dependency org="org.webjars.npm" name="pxls" rev="2.3.2">
  <artifact name="pxls" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='pxls', version='2.3.2')
)
libraryDependencies += "org.webjars.npm" % "pxls" % "2.3.2"
[org.webjars.npm/pxls "2.3.2"]

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.webjars.npm : is-browser jar [2.1.0,3)
org.webjars.npm : is-buffer jar [2.0.3,3)
org.webjars.npm : arr-flatten jar [1.1.0,2)
org.webjars.npm : flip-pixels jar [1.0.2,2)
org.webjars.npm : compute-dims jar [1.1.0,2)
org.webjars.npm : to-uint8 jar [1.4.1,2)

Модули Проекта

Данный проект не имеет модулей.

pxls unstable Build Status

Take in custom pixels container, return normalized 4-channel Uint8Array with pixels. Detects float/int input pixels, handles Infinities, unfolds structures.

npm install pxls

var pxls = require('pxls')
var ndarray = require('ndarray')

pxls([[0,0,0], [1,1,1]]) // <uint8 0,0,0,255, 255,255,255,255>
pxls([0, 1], 1) // <uint8 0,0,0,255, 255,255,255,255>
pxls([0,0,0, 1,1,1], [2,1]) // <uint8 0,0,0,255, 255,255,255,255>
pxls(new Ndarray([0,1], [2,1]) // <uint8 0,0,0,255, 255,255,255,255>
pxls(new Ndarray([0,0,0,1,1,1], [2,1,3]) // <uint8 0,0,0,255, 255,255,255,255>

let pixels = pxls(arr, shape|step?)

Takes input actual pixels container arr and returns 4 channels flat Uint8Array pixels with layout [r,g,b,a, r,g,b,a, r,g,b,a, ...].

arr can be an Array of Arrays, TypedArray, Ndarray, ImageData or DOM container Image, Video, ImageBitmap, Canvas2D, Context2D, WebGLContext.

1-channel input is mapped as grayscale [v,v,v,255, v,v,v,255]. 3-channel input fills last channel with 255 [r,g,b,255, r,g,b,255].

shape can describe the shape of input array, eg. [100,100,3] or [10,10].

step optionally can define input number of channels in flat array, that is detected automatically for nested/ndarrays.

See also

License

(c) 2018 Dmitry Yv. MIT License

Версии библиотеки

Версия
2.3.2