Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadComplete (file) {
// Draw the image
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx);
FlipHorizontal(imageData);
ctx.clearRect(0, 0, 320, 200);
PutImageData(ctx, imageData);
}
loadComplete (file) {
// Draw the image
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx);
FlipVertical(imageData);
ctx.clearRect(0, 0, 320, 200);
PutImageData(ctx, imageData);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
MeanRemoval(imageData);
PutImageData(ctx, imageData, 256, 0);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
Emboss(imageData);
PutImageData(ctx, imageData, 256, 0);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
Distort(imageData, 0.5, 0.5);
PutImageData(ctx, imageData, 256, 0);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
EmbossSubtle(imageData);
PutImageData(ctx, imageData, 256, 0);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
EdgeDetectDark(imageData);
PutImageData(ctx, imageData, 256, 0);
}
loadComplete (file) {
const ctx = GetContext(this.canvas);
ctx.drawImage(file.data, 0, 0);
const imageData = GetImageData(ctx, 0, 0, 256, 256);
EdgeDetect(imageData);
PutImageData(ctx, imageData, 256, 0);
}
export function write () {
if (!this.imageData)
{
return;
}
return PutImageData(
this.context,
this.imageData,
this.offset.x,
this.offset.y,
this.tl.x,
this.tl.y,
this.br.x - this.tl.x,
this.br.y - this.tl.y
);
}