
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
deca-image-tools
Advanced tools
A lightweight TypeScript library for image processing operations, offering a variety of filters, transformations including edge detection, blur effects, color manipulation, and image transformations.
npm install deca-image-tools
The edgeDetect function applies Sobel edge detection to an image, converting it to grayscale and highlighting edges:
import { edgeDetect } from 'deca-image-tools';
// Assuming you have an ImageData object from a canvas
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
// Apply edge detection
const edgedImage = edgeDetect(imageData);
// Draw the result back to canvas
ctx.putImageData(edgedImage, 0, 0);
The gaussianBlur function applies a Gaussian blur effect to smooth the image:
import { gaussianBlur } from 'deca-image-tools';
// Apply Gaussian blur with default radius
const blurredImage = gaussianBlur(imageData);
// Or specify a custom radius
const customBlurredImage = gaussianBlur(imageData, 2);
The library provides several color manipulation functions:
import { colorize, invertColors, adjustBrightness } from 'deca-image-tools';
// Apply a red tint
const color = { r: 255, g: 0, b: 0 };
const colorizedImage = colorize(imageData, color);
// Invert colors
const invertedImage = invertColors(imageData);
// Adjust brightness (factor > 1 brightens, < 1 darkens)
const brightenedImage = adjustBrightness(imageData, 1.5);
The library includes functions for geometric transformations:
import { rotateImage, skewImage } from 'deca-image-tools';
// Rotate image by 45 degrees
const rotatedImage = rotateImage(imageData, 45);
// Skew image horizontally and vertically
const skewedImage = skewImage(imageData, 0.2, 0.1);
The library provides functionality to save processed images:
import { saveImage } from 'deca-image-tools';
// Save the processed image to a file
await saveImage(imageData, 'output.png');
Detects edges in an image using the Sobel operator.
Parameters:
imageData: ImageData object containing the source imageReturns:
Applies a Gaussian blur effect to the image.
Parameters:
imageData: ImageData object containing the source imageradius: Optional blur radius (default: 1)Returns:
Applies a sharpening filter to the image.
Parameters:
imageData: ImageData object containing the source imageReturns:
Adjusts the brightness of an image.
Parameters:
imageData: ImageData object containing the source imagefactor: Brightness adjustment factor (>1 brightens, <1 darkens)Returns:
Applies a color tint to an image.
Parameters:
imageData: ImageData object containing the source imagecolor: Object containing RGB values (0-255) for the tint colorReturns:
Inverts the colors of an image.
Parameters:
imageData: ImageData object containing the source imageReturns:
Rotates an image by the specified angle.
Parameters:
imageData: ImageData object containing the source imagedegrees: Rotation angle in degreesReturns:
Applies horizontal and vertical skewing to an image.
Parameters:
imageData: ImageData object containing the source imageskewX: Horizontal skew factorskewY: Vertical skew factorReturns:
Saves an image to a file.
Parameters:
imageData: ImageData object to savefilePath: Path where the image should be savedReturns:
deca-image-tools/
├── src/
│ └── index.ts # Main source code
├── dist/ # Compiled output
│ ├── index.js
│ └── index.d.ts
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
└── README.md # Documentation
git clone https://github.com/yourusername/deca-image-tools.git
cd deca-image-tools
npm install
npm run build - Compiles the TypeScript codenpm test - Runs the test suitenpm run lint - Runs ESLint for code qualitynpm run format - Formats code using PrettierThe package supports all modern browsers that implement the Canvas API:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Please make sure to:
MIT
Tom Tarpey (decagondev)
For support, please open an issue in the GitHub repository or contact the maintainers.
FAQs
A lightweight TypeScript library for image processing operations
The npm package deca-image-tools receives a total of 1 weekly downloads. As such, deca-image-tools popularity was classified as not popular.
We found that deca-image-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.