image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
16 lines • 450 B
JavaScript
import { ColorUint8 } from './color-uint8.js';
export class ColorRgb8 extends ColorUint8 {
constructor(r, g, b) {
const data = new Uint8Array([r, g, b]);
super(data);
}
static from(other) {
const data = new Uint8Array([
other.getChannel(0),
other.getChannel(1),
other.getChannel(2),
]);
return new ColorUint8(data);
}
}
//# sourceMappingURL=color-rgb8.js.map