Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@jimp/js-png

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimp/js-png - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

22

CHANGELOG.md

@@ -0,1 +1,23 @@

# v1.5.0 (Sat Sep 07 2024)
### Release Notes
#### Add support for image decoder options ([#1336](https://github.com/jimp-dev/jimp/pull/1336))
Can now have options for the underlying image codecs
![CleanShot 2024-09-07 at 15 26 41](https://github.com/user-attachments/assets/26fa1a48-f463-455c-89f9-9c99f9fcb3d1)
---
#### 🚀 Enhancement
- Add support for image decoder options [#1336](https://github.com/jimp-dev/jimp/pull/1336) ([@hipstersmoothie](https://github.com/hipstersmoothie))
#### Authors: 1
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie))
---
# v1.1.3 (Mon Sep 02 2024)

@@ -2,0 +24,0 @@

6

dist/commonjs/index.d.ts

@@ -9,2 +9,6 @@ import { PNGOptions as PNGJSOptions } from "pngjs";

};
export interface DecodePngOptions {
checkCRC?: boolean | undefined;
skipRescale?: boolean | undefined;
}
export * from "./constants.js";

@@ -15,3 +19,3 @@ export default function png(): {

encode: (bitmap: import("@jimp/types").Bitmap, { deflateLevel, deflateStrategy, filterType, colorType, inputHasAlpha, ...options }?: PNGOptions) => Buffer;
decode: (data: Buffer) => {
decode: (data: Buffer, options?: DecodePngOptions) => {
data: Buffer;

@@ -18,0 +22,0 @@ width: number;

4

dist/commonjs/index.js

@@ -44,4 +44,4 @@ "use strict";

},
decode: (data) => {
const result = pngjs_1.PNG.sync.read(data);
decode: (data, options) => {
const result = pngjs_1.PNG.sync.read(data, options);
return {

@@ -48,0 +48,0 @@ data: result.data,

@@ -9,2 +9,6 @@ import { PNGOptions as PNGJSOptions } from "pngjs";

};
export interface DecodePngOptions {
checkCRC?: boolean | undefined;
skipRescale?: boolean | undefined;
}
export * from "./constants.js";

@@ -15,3 +19,3 @@ export default function png(): {

encode: (bitmap: import("@jimp/types").Bitmap, { deflateLevel, deflateStrategy, filterType, colorType, inputHasAlpha, ...options }?: PNGOptions) => Buffer;
decode: (data: Buffer) => {
decode: (data: Buffer, options?: DecodePngOptions) => {
data: Buffer;

@@ -18,0 +22,0 @@ width: number;

@@ -27,4 +27,4 @@ import { PNG } from "pngjs";

},
decode: (data) => {
const result = PNG.sync.read(data);
decode: (data, options) => {
const result = PNG.sync.read(data, options);
return {

@@ -31,0 +31,0 @@ data: result.data,

{
"name": "@jimp/js-png",
"version": "1.4.0",
"version": "1.5.0",
"repository": "jimp-dev/jimp",

@@ -19,11 +19,11 @@ "engines": {

"dependencies": {
"@jimp/core": "1.4.0",
"@jimp/types": "1.4.0",
"@jimp/core": "1.5.0",
"@jimp/types": "1.5.0",
"pngjs": "^7.0.0"
},
"devDependencies": {
"@jimp/config-eslint": "1.4.0",
"@jimp/config-typescript": "1.4.0",
"@jimp/config-vitest": "1.4.0",
"@jimp/test-utils": "1.4.0",
"@jimp/config-eslint": "1.5.0",
"@jimp/config-typescript": "1.5.0",
"@jimp/config-vitest": "1.5.0",
"@jimp/test-utils": "1.5.0",
"@types/pngjs": "^6.0.5",

@@ -67,3 +67,3 @@ "@vitest/browser": "^2.0.5",

"module": "./dist/esm/index.js",
"gitHead": "c1b91e9007f17d0702894bd9bfab8215cff764f9"
"gitHead": "9b8d6106ef2498113ebcdddf8e6a4fae0b3cadff"
}

@@ -15,2 +15,7 @@ import { PNG, PNGOptions as PNGJSOptions } from "pngjs";

export interface DecodePngOptions {
checkCRC?: boolean | undefined;
skipRescale?: boolean | undefined;
}
export * from "./constants.js";

@@ -31,3 +36,3 @@

...options
}: PNGOptions = {},
}: PNGOptions = {}
) => {

@@ -55,4 +60,4 @@ const png = new PNG({

},
decode: (data) => {
const result = PNG.sync.read(data);
decode: (data, options?: DecodePngOptions) => {
const result = PNG.sync.read(data, options);

@@ -59,0 +64,0 @@ return {

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

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