Socket
Socket
Sign inDemoInstall

image-forge

Package Overview
Dependencies
10
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

src/generators/filters/infrared.filter.js

22

package.json
{
"name": "image-forge",
"version": "1.1.1",
"description": "A powerful tool for creating custom images from templates, automating the graphic design process",
"main": "index.js",
"version": "1.1.2",
"description": "A powerful tool for creating custom images from templates",
"main": "./src/index.js",
"type": "module",

@@ -29,6 +29,4 @@ "files": [

"lint-staged": {
"*.{js,json}": [
"npm run format",
"npm run lint"
]
"*.{js,json}": "npm run format",
"*.js": "npm run lint"
},

@@ -42,2 +40,12 @@ "config": {

"license": "MIT",
"homepage": "https://github.com/HarukaYamamoto0/image-forge",
"bugs": {
"url": "https://github.com/HarukaYamamoto0/image-forge/issues",
"email": "harukayamamotodev@gmail.com"
},
"funding": "https://www.buymeacoffee.com/harukayamamoto",
"repository": {
"type": "git",
"url": "git+https://github.com/HarukaYamamoto0/image-forge.git"
},
"keywords": [

@@ -44,0 +52,0 @@ "image",

@@ -0,10 +1,11 @@

import BaseGenerator from "../../structures/BaseGenerator.js";
import { createCanvas, loadImage } from "@napi-rs/canvas";
class GrayFilter {
constructor(imagePath) {
this.imagePath = imagePath;
class GrayFilter extends BaseGenerator {
constructor() {
super();
}
async apply() {
const image = await loadImage(this.imagePath);
const image = await loadImage(this.source);
const canvas = createCanvas(image.width, image.height);

@@ -27,3 +28,3 @@ const ctx = canvas.getContext("2d");

return canvas.encode("jpeg");
return this.encode(canvas, image);
}

@@ -30,0 +31,0 @@ }

import GrayFilter from "./generators/filters/gray.filter.js";
import InfraredFilter from "./generators/filters/infrared.filter.js";
import PixelateFilter from "./generators/filters/pixelate.filter.js";
export { GrayFilter };
export { GrayFilter, InfraredFilter, PixelateFilter };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc