Huge News!Announcing our $40M Series B led by Abstract Ventures.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 - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

src/wuffs-v0.4.c

6

index.d.ts

@@ -48,3 +48,7 @@ /** Constant used in PNG encoding methods. */

export interface DecodeOptions {
premultipled: boolean;
}
export function encodePNG(width: number, height: number, data: Buffer, options?: PngConfig): Promise<Buffer>;
export function decodePNG(data: Buffer): Promise<DecodedImageData>;
export function decodePNG(data: Buffer, options?: DecodeOptions): Promise<DecodedImageData>;

7

index.js

@@ -23,9 +23,10 @@ const bindings = require('./build/Release/ag_images.node');

exports.decodePNG = function (buffer) {
exports.decodePNG = function (buffer, options) {
return new Promise((resolve, reject) => {
bindings.decodePNG(buffer, (error, data, width, height) => {
const premultiplied = options?.premultiplied || false;
bindings.decodePNG(buffer, premultiplied, (error, data, width, height) => {
if (error) {
reject(error);
} else {
resolve({ data, width, height });
resolve({ data, width, height, premultiplied });
}

@@ -32,0 +33,0 @@ })

{
"name": "ag-images",
"description": "Library for loading and saving PNG files",
"version": "2.1.1",
"version": "2.2.0",
"main": "index.js",

@@ -30,4 +30,4 @@ "browser": "browser.js",

"dependencies": {
"@types/node": "^14.11.2",
"nan": "nodejs/nan",
"@types/node": "20.9.4",
"nan": "2.18.0",
"node-pre-gyp": "^0.15.0"

@@ -34,0 +34,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc