New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ag-images

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-images

Library for loading and saving PNG files

2.3.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

ag-images

Library for loading and saving PNG files

npm install ag-images

# for compatibility with Node < 20, use npm install ag-images@^1.0.0
// main functions
export function encodePNG(width: number, height: number, data: Buffer, options?: PngConfig): Promise<Buffer>;
export function decodePNG(data: Buffer): Promise<DecodedImageData>;

export interface DecodedImageData {
	width: number;
	height: number;
	data: Buffer;
}

export interface PngConfig {
	compressionLevel?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
	filters?: number;
	palette?: Uint8ClampedArray;
	backgroundIndex?: number;
	resolution?: number;
}

// filters constants
export const PNG_NO_FILTERS: number;
export const PNG_ALL_FILTERS: number;
export const PNG_FILTER_NONE: number;
export const PNG_FILTER_SUB: number;
export const PNG_FILTER_UP: number;
export const PNG_FILTER_AVG: number;
export const PNG_FILTER_PAETH: number;

FAQs

Package last updated on 13 Jan 2024

Did you know?

Socket

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.

Install

Related posts