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

@jimp/js-jpeg

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-jpeg - 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 @@

10

dist/commonjs/index.d.ts

@@ -5,6 +5,14 @@ import JPEG from "jpeg-js";

}
export interface DecodeJpegOptions {
useTArray?: false;
colorTransform?: boolean;
formatAsRGBA?: boolean;
tolerantDecoding?: boolean;
maxResolutionInMP?: number;
maxMemoryUsageInMB?: number;
}
export default function jpeg(): {
mime: "image/jpeg";
encode: (bitmap: import("@jimp/types").Bitmap, { quality }?: JPEGOptions) => Buffer;
decode: (data: Buffer) => JPEG.BufferRet & {
decode: (data: Buffer, options?: DecodeJpegOptions) => JPEG.BufferRet & {
comments?: string[];

@@ -11,0 +19,0 @@ };

2

dist/commonjs/index.js

@@ -12,5 +12,5 @@ "use strict";

encode: (bitmap, { quality = 100 } = {}) => jpeg_js_1.default.encode(bitmap, quality).data,
decode: (data) => jpeg_js_1.default.decode(data),
decode: (data, options) => jpeg_js_1.default.decode(data, options),
};
}
//# sourceMappingURL=index.js.map

@@ -5,6 +5,14 @@ import JPEG from "jpeg-js";

}
export interface DecodeJpegOptions {
useTArray?: false;
colorTransform?: boolean;
formatAsRGBA?: boolean;
tolerantDecoding?: boolean;
maxResolutionInMP?: number;
maxMemoryUsageInMB?: number;
}
export default function jpeg(): {
mime: "image/jpeg";
encode: (bitmap: import("@jimp/types").Bitmap, { quality }?: JPEGOptions) => Buffer;
decode: (data: Buffer) => JPEG.BufferRet & {
decode: (data: Buffer, options?: DecodeJpegOptions) => JPEG.BufferRet & {
comments?: string[];

@@ -11,0 +19,0 @@ };

@@ -6,5 +6,5 @@ import JPEG from "jpeg-js";

encode: (bitmap, { quality = 100 } = {}) => JPEG.encode(bitmap, quality).data,
decode: (data) => JPEG.decode(data),
decode: (data, options) => JPEG.decode(data, options),
};
}
//# sourceMappingURL=index.js.map
{
"name": "@jimp/js-jpeg",
"version": "1.4.0",
"version": "1.5.0",
"repository": "jimp-dev/jimp",

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

"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",
"@vitest/browser": "^2.0.5",

@@ -57,4 +57,4 @@ "eslint": "^9.9.1",

"dependencies": {
"@jimp/core": "1.4.0",
"@jimp/types": "1.4.0",
"@jimp/core": "1.5.0",
"@jimp/types": "1.5.0",
"jpeg-js": "^0.4.4"

@@ -67,3 +67,3 @@ },

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

@@ -8,2 +8,11 @@ import JPEG from "jpeg-js";

export interface DecodeJpegOptions {
useTArray?: false;
colorTransform?: boolean;
formatAsRGBA?: boolean;
tolerantDecoding?: boolean;
maxResolutionInMP?: number;
maxMemoryUsageInMB?: number;
}
export default function jpeg() {

@@ -14,4 +23,4 @@ return {

JPEG.encode(bitmap, quality).data,
decode: (data) => JPEG.decode(data),
decode: (data, options?: DecodeJpegOptions) => JPEG.decode(data, options),
} satisfies Format<"image/jpeg">;
}

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